Indoor Multi-Floor 3D Target Tracking Based on the Multi-Sensor Fusion

In recent years, indoor target tracking based on pedestrian dead reckoning (PDR) and the built-in inertial sensors of smartphone has become a research hotspot in location-based services (LBS). However, indoor 3D target tracking using smartphone inertial measurement unit (IMU) mainly face challenges of error accumulation caused by the heading drift of sensors and height fluctuation caused by the instability of barometer. This paper proposes a multi-floor 3D target tracking system based on the built-in inertial sensors of smartphone. We first establish a 2D PDR movement model by raw sensor data and then 2D PDR position is corrected in real time by rebuilding the particle filter model and refining the calculation method of particle weight to reduce the accumulated errors. A height displacement measurement method based on Kalman filter and floor change detection (FCD) algorithm is proposed to extend the 2D PDR tracking to 3D space. We first skillfully use Kalman filter to fuse the data of barometer and accelerometer, after that, the FCD algorithm is proposed to evaluate and modify the output height of the Kalman filter, evaluating the floor change state and maintaining steady height. The 3D target tracking, which consists of real-time 2D trajectory information and height information, is provided to the pedestrian. Experimental results demonstrate that the proposed method based on the fusion of various technologies can effectively maintain track stability and smoothness with low cost and high positioning accuracy. Moreover, additional peripheral devices need not be arranged in advance.


I. INTRODUCTION
With the advancement of wireless communication technology and the development of smartphones, location-based services (LBS) have attracted much attention. The rapid development of the Internet of Things has driven an imperious demand for LBS [1]. Outdoor, global navigation satellite system (GNSS) such as the Global positioning system (GPS) can provide accurate location information and contribute greatly to navigation, positioning, and tracking in outdoor environments [2]. However, in indoor environments as well as urban canyons and tunnels, complex underground areas, the satellite signals are likely to be degraded by signal blockage or multipath propagation, resulting in reduced or disturbed position accuracy. Therefore, GPS-based positioning methods cannot be applied in indoor. it is necessary to develop a highly accurate and low-cost target tracking techniques for The associate editor coordinating the review of this manuscript and approving it for publication was Ding Xu . such environments, especially for localization in emergency and security applications, such as firefighter rescuing, industrial inspections, and monitor service for olds in medical care [3]. (Fig. 1).
At present, two main technological approaches are classified in the target tracking. The first approach is based on infrastructure, such as: wireless sensor network (WSN) [4], wireless fidelity (Wi-Fi) [5], [6], Bluetooth [7], ultra wideband (UWB) [8], [9], radio frequency identfication (RFID) [10], [11], geomagnetic field [12]. Although these target tracking and positioning technologies have achieved feasible positioning accuracy, they all rely on the existence of indoor infrastructure, which requires extensive time and high costs for installation and maintenance, and has certain limitations for the indoor scene of emergency rescue. For example, the localization technologies based on WiFi rely on the indoor access points (APs). However, an fingerprint database in the offline stage needs to be constructed which is normally time consuming and labor intensive, and the fingerprint database needs to be modified periodically with the environmental change, which considerably increases the maintenance cost.
The second approach is infrastructure-free tracking technique. With the rapid development of smartphone technology and micro-electro mechanical systems, most smartphones are equipped with all the necessary sensors, such as barometer, accelerometer, magnetometer, gyroscope, and pedometer. Therefore, the inertial measurement unit (IMU)-based pedestrian dead reckoning (PDR) system has become more accurate and easier to implement. In recent years, there is increasingly researches have focused on smartphone-based indoor pedestrian tracking filed [1], [13]. To obtain the position of the pedestrian, the PDR algorithm uses the smartphone's built-in inertial sensors on the basis of the kinematic characteristics of pedestrians to estimate the step length and walking direction at each detected step [14], [15]. The PDR tracking and positioning technology of wearable inertial sensor systems does not rely on any external infrastructure and additional environment information. However, this technology is relative to the previous state. The inertial data are polluted easily by various noises because the finite smartphone's IMU precision, which will lead to errors accumulate over time. Therefore, real-time correction of PDR trajectory is indispensable.
The current target tracking technology is mostly focus on 2D space, that is, single floor, and rarely measured the height of the moving target. In contemporary life, most of the buildings have multi-floors, such as railway stations, airports, and office buildings, and 2D space tracking is unsuitable for such multi-floor scenes. The 3D trajectory tracking, most of the target height is measured by a barometer. This method is simple and fast, but the built-in barometer of ordinary smartphones is easily affected by the indoor temperature and humidity, with poor stability and large error. Therefore, the barometer data must be integrated to ensure height stability.
In sum, the 3D trajectory tracking based on the builtin inertial sensor of smartphones has two main challenges: the 2D error accumulation of sensor data drift and the fluctuation of barometer height measurement. In view of the above problems, this paper proposed an indoor multi-floor 3D target tracking system based on smartphone sensors. The main work of this paper is summarized as follows: • We proposed a real-time 2D trajectory correction method to solve the problem of sensor heading drift. We first established PDR movement model by smartphone's built-in sensor data. Then, we rebuild the particle filter state process and observation model by PDR movement model. We designed a new calculation method of particle weight to obtain the final filtered value according the observation position and prediction position, that is, the final correction 2D coordinate.
• We proposed a method for indoor height measurement. Kalman filter (KF) is used to fuse the measured height of the barometer and the accelerometer to eliminate the fluctuation of the barometer. Then, we designed a floor change detection (FCD) algorithm for judging the floor change state, evaluating and modifying the height output of KF.
• We combined 2D trajectory and height information in real time to extend the smartphone-based target tracking from 2D to 3D space in an indoor multi-floor environment. The experiments have been carried out with an Android-based data collection app to verify the effectiveness and feasibility of the method. The rest of this paper is organized as follows: In section II, we describe the relevant research of indoor localization and tracking. In section III, we proposed our indoor 3D target tracking model. In section IV shows the experiments and analyses. Finally, we conclude our algorithm in section V.

II. RELATED WORKS
In this section, we first present the related method of reducing the error accumulation in 2D target tracking and then described the research of height measurement methods in indoor environment.
Due to the limitation of the precision of the smartphone's built-in sensors, it is easy to generate error accumulation, thus it requires further integration with other technology that can correct the 2D PDR position. There are mainly four methods are classified in addressing the error accumulation and improving the performance of the tracking system. The first one is wireless network feature-assisted correction. Cho and Kwon [16] mitigates the accumulated error of PDR by using received signal strength (RSS)-based localization method in line-of-sight (LOS) conditions. The method based on a wireless network improved tracking effect, but it relies on indoor APs. The second method is map-matching algorithm correction, such as indoor plan map and magnetic map. Putta et al. [13] uses gradient descent algorithm (GDA) and map to correct the heading drift caused by magnetic field perturbations. This method does not rely on indoor equipment, which is low cost and high localization accuracy. However, in consideration of access safety, the indoor map of public places is usually not open to outside. The third VOLUME 8, 2020 method is sensor-fusion correction based on filter, such as Kalman filter (KF), Extended Kalman filter (EKF) or Particle filter (PF). Poulose et al. [14] utilizes KF algorithm for sensor fusion, the study fuses the accelerometer and gyroscope data for pitch and roll estimation, and fuses magnetometer and gyroscope data for heading estimation. The study uses the complementary features of two kinds of sensors and fundamentally addressed the accumulated errors exist in PDR, experimental results showed that it achieves better performance. Qiu et al. [17] presented a stance phase detection algorithm based on accelerometer and gyroscope measurements, and an EKF is deployed to fuse inertial/magnetic sensor. Their paper achieves self-contained PDR with minimized error without aiding from other technologies, the algorithm can be applied to widely environments. However, it adopts shoe-mounted sensors, which result in it cannot be applied to the smartphone-based PDR system. Last but not least, the fourth method is machine learning algorithm correction which has been used to improve the performance in for smartphone-based indoor localization system. Shin et al. [1] presented a motion recognition-based 3D pedestrian navigation system, the motion of the pedestrian is detected by the artificial neural network (ANN) then the detected motion is utilized for PDR positioning, it means that different PDR algorithms are applied according to the recognized pattern of the pedestrian motion. Kang et al. [15] proposed hybrid multiscale convolutional and recurrent neural network (RNN) model to learn the velocity of the pedestrian and then estimated the traveled distance by velocity and time. References [1] and [15] all overcomes the limitation of the way users carry smartphone, and estimates the position regardless of any motion (walking type, smartphone orientation, shaking) performed by the users. The indoor localization based on deep learning has become a state-of-the-art method, it's more intelligent compared to the conventional technology, the accuracy to a great extent depends on the quality of the training dataset which needs to be constructed in advance.
As far as we know, most of the aforementioned research focuses on 2D positioning. Inspired by the flight altitude measured based on a barometer sensor [18], domestic and foreign researchers introduced the corresponding height measurement methods. References [1], [19], [20] all proposed a 3D indoor positioning method based on PDR using a low-cost IMU sensor system equipped with a 2D information fusion barometer to achieve the 3D trajectory tracking of pedestrians. Zhao et al. [21] proposed an algorithm for complex floor recognition based on wireless fingerprint and air pressure as a solution for elevation positioning. This method is a floor recognition technology that obtains floor information from wireless AP distribution to initialize and calibrate air pressure. Asadi et al. [22] studied a new positioning technology based on IMU. The position of IMU acceleration is estimated by double integration. An automatic threshold is proposed to recognize the walking phase. This type of 3D tracking technology is cheap, but it needs to fix the inertial sensor on the waist or the sole of the shoe. Obviously, it will considerably reduces the user experience to wear additional hardware to the human body.
In general, current indoor trajectory tracking technology often faces the difficulties in terms of cost and accessibility, and the difficulty of high estimation in the process of 2D space to 3D scene conversion. The elevation positioning technology based on the air pressure altimetry mostly utilizes other auxiliary means to realize the elevation positioning, and the accuracy needs to be improved. We proposed an indoor 3D trajectory tracking scheme based on the smartphone's self-contained sensors, it can sense floor changes in real time and ensure the stability of the same floor. Moreover, the proposed method does not need additional peripheral devices.

III. SYSTEM MODEL
The system architecture of the multi-floor 3D target tracking system based on smart phone built-in inertial sensors is shown in Fig. 2. First, the acceleration in the vertical direction is obtained by the accelerometer, and the step length is estimated by the acceleration data. The number of steps and the rotation angle of each step are obtained by the pedometer and the direction sensor. Second, the target's 2D space walking track is obtained by the PDR algorithm, and the improved PF algorithm is used to modify the 2D track. In addition, the preliminary height displacement of each step of the target is estimated using KF fusing the sensor data of the accelerometer and the barometer in real time. Subsequently, the FCD algorithm is utilized to modify the height of KF output and obtain the final height information. Finally, 2D trajectory and height information are combined to output multi-floor 3D trajectory.

A. TWO-DIMENSIONAL TRAJECTORY TRACKING ALGORITHM BASED ON PDR AND PARTICLE FILTER(PDR_PF)
PDR is a relative positioning technique based on the known user's initial position [23], and the starting position(x 0 , y 0 ) of the target is known. According to the azimuth angle and the stride length d, the position information of the next step (x 1 , y 1 ) is calculated by using the formula. In this way, the position information of the target in step k can be calculated by iterative calculation. The calculation formula is as follows (1): where, θ i and d i (i = 1, 2, . . . , k) are the direction angle and stride length of step i, respectively.
In PDR, the step length, step number, and heading are the main factors that affect the accuracy of position estimation. The absolute heading angle can be obtained because the smartphone's own direction sensor integrates two types of sensor data (accelerometer and magnetometer). Therefore, the direction angle of the target in this paper is calculated 36838 VOLUME 8, 2020 according to the direction sensor in the mobile phone. The steps can be obtained by detecting the peak or valley of acceleration sine wave because the acceleration of human body has the characteristics of periodic sine wave when walking. The internal sensor of mobile phone is limited by its own cost, volume and accuracy. The data collected by acceleration sensor contains a lot of noise. In this paper, a low-pass filter is used to filter the acceleration data and to remove the noise irrelevant to step detection. And then, the method of peak detection and zero crossing detection [23] is used to record the steps. At present, the commonly used pedestrian step estimation methods are: constant step model, motion machinery model [24], linear model [25], nonlinear model [26], ANN model [27]. Among these method, non-linear model use only one parameter so that easy to implement and to use real-time estimation algorithm. and a mature Weinberg [28] algorithm is employed to estimate the step length. Thus, the step length estimated by (2): where S is the step length, k is the model coefficient and is affected by the length of the pedestrian's leg, and a max and a min are the maximum and minimum acceleration values obtained in gait detection respectively. The motion model of pedestrian walking indoors does not conform to Gaussian distribution, PF is based on Bayesian inference and importance sampling, and it is suitable for dealing with complex nonlinear and non-Gaussian estimation problems. Therefore, this paper uses the PF algorithm to track the motion trajectory of the target. PF involves three important parameters: observation value, prediction value and filter value. In this paper, all three parameters are position coordinates. In other words, these values can be also called observation position, prediction position and filter position respectively. Observation position, which is the position coordinate obtained from the PDR motion model based on the built-in sensors of smart phone, generally, this value is obtained by external observable variables, but it is not accurate enough; Prediction value is based on the average position of randomly generated particles; Filter value is also called estimated value, which is the value obtained after filter optimization according to filter algorithm, that is, the position after the correction. The main idea of PF is to use a set of random particles to represent the state of the process, and calculate the weight of the particle based on the deviation between the particle and the observed value. The rule for adding weights is, for particles with high trust, the weights added to them are relatively large; otherwise, the added weights are relatively small. The PF set used in this paper is set to X set = {x 1 , x 2 , · · · , x n }, also called the sample set, and the number of particles in the set is n.
In the PF algorithm, the prediction value of the filter is obtained by calculating the mean of the set of particles.
The PF algorithm calculates the weight of particles according to the deviation between particles and observations. The accuracy of observations directly affects the weight calculation of particles, thus affecting the accuracy of target positioning. In our work, The PDR algorithm is employed to model the motion state of the target personnel by using related sensors embedded in the smart phone. The established motion model is brought into the state equation and the observation equation of the PF, and the measured values in the state and observation equations are updated in real time on the basis of the measured information. The state equation of the PF algorithm combining PDR is (4): where (x k , y k ) represents the position coordinate of the k th step, l (k+1) represents the step size of the k + 1 th step, θ k+1 represents the direction value of the particle, and Q is the process noise. VOLUME 8, 2020 In the PF algorithm, the state of particles in the previous moment is introduced into the state equation to estimate the state of particles in the next moment. Owing to the existence of Gaussian noise, a Gaussian distance appears between observation position, prediction position, and each particle. The distance difference determines the credibility of particles. The smaller the distance, the greater the credibility. The algorithm of this study allocates the weight of particles according to the observation and prediction positions. On the basis of the distribution form of weights, the algorithm proposed in this paper adjusts the particle weight calculation and particle selection so that the particles can cover the real value. The improved particle weight calculation method is as shown in (5)(6)(7): where w gi is the weight of the particles obtained from the observations, d g is the Euclidean distance between the observation position and the particle; And w yi is the weight of the particles obtained from the predicted value, d y is the Euclidean distance between the estimated position and the particle, σ is the measurement noise, and h is the gain coefficient.
Resampling of particles is used to remove low-weight particles, retaining and copying high-weight particles to obtain the desired true state X (k). The resulting average is calculated from the distribution of particle weight to obtain the final filtered value. The weighted mean of the particles is calculated as shown in (8): where w i is the weight of the i th particle. (x i , y i ) is the position of the i th particle, (x,ŷ) is the final correction coordinate.

B. HEIGHT ESTIMATION ALGORITHM OF KALMAN FILTER AND MULTI-SENSOR FUSION (KF_FCD)
The smartphone's built-in barometer is susceptible to the atmospheric environment, but it is insensitive to the target motion noise. The accelerometer is on the contrary. KF is an algorithm that uses the linear system state equation to estimate the state of the system. It is applicable to linear, discrete, and finite-dimensional systems with low delay and high precision. Generally speaking, KF is essentially a data fusion algorithm, which can fuse data from different sensors and different units, and obtaining a more accurate target measurement value. In this paper, KF is used to fuse the barometer and the accelerometer to estimate the target height, achieve the complementary advantages of the two, and improve the measurement accuracy of indoor moving target height, but a few abnormal height fluctuations are still observed. Therefore, based on the height of KF output, the FCD algorithm is proposed to modify the height of KF output. The algorithm can effectively maintain the stability of the same floor height and further improve the measurement accuracy.

1) FLOOR CHANGE DETECTION ALGORITHM
The upper and lower limits of the allowable change in the height difference are Th up and Th low , respectively. The height difference between the current step and the previous N step is obtained, the height difference is compared with the upper and lower limit values, the target height change state (going upstairs/downstairs, walking on flat ground) is determined, the height value of the abnormal fluctuation is corrected to the maximum extent, and the corrected height is placed as an output. The algorithm can maintain the stability of the same floor height without affecting the height measurement of the upper and lower floors. The FCD of the algorithm is described as Algorithm 1. if diff <= Th low then 10: update h flat =H origin [i]; 11: isFloorChange = flase; 12: add H flat to H FCD [i]; 13: end if 14: if Th low < diff &&isFloorChange == true then 15: add H origin [i] to H FCD [i]; 16: end if 17: if Th low < diff &&diff < Th up && isFloorChange == flase then 18: add h flat to H FCD [i]; 19: end if 20: end for 21: return H FCD ;

2) KALMAN FILTER BASED DATA FUSION PROCESS
According to the physics speed-displacement formula, as shown in (9). This paper chooses the displacement, velocity, and acceleration in the vertical direction as the state parameters, and chooses the measured value of the barometer as the observation. Q represents process noise and R represents sensor measurement noise.
where d k , v k , and a k are the displacement, velocity, and acceleration at time k, respectively, and T is the sampling frequency. From (9), the KF state vector X k , the system transition matrix F, and the system state equation can be obtained as shown in (10)(11)(12): In the earth's gravity field, the atmospheric pressure decreases with increasing height [25]. The relationship between the target altitude and air pressure is as follows: where h is the height of the target m; P is the air pressure value of the observation point; P o is the standard air pressure, and its value is 1013.25hpa. The height calculated according to this formula is the absolute height. In indoor environment, the air pressure value is easily affected by the characteristics of meteorological environment and the sensor's limited accuracy, As shown in the in Fig. 3, the maximum pressure fluctuation value of the built-in barometer of smartphone on the same floor is up to 27Pa, which is 2.267m by using (13). The fluctuation of the air pressure directly is expected to result in the unavailability of the height data. For 3D tracking, the measured atmospheric in the initial stage is invoked as a reference for conversion from pressure into height. In this way, the relative height of the target can be obtained by (14): where, h is the height m of the target, h init is the height measured according to the air pressure value of the initial position, and h is the height difference between the two positions.
The system observation matrix H and the observation equation Z k obtained by fusing the barometer and the accelerometer are as shown in the (15)(16), where h k represents the relative height, a k is the z-axis accelerometer from in the navigation coordinate system.
The steps of the height measurement algorithm based on KF and FCD are as follows: 1) Kalman Filter prediction process From the system state equation, a one-step predicted value of the state of the system can be obtained as shown in (17), where X k represents the estimated value, The prediction error covariance matrix is in Eq. (18): 2) Kalman Filter status update process The Kalman Filter gain is as shown in Eq. (19), Status update:TheX k value is the latest state estimator of the KF, which is the fusion barometer and accelerometer filter value.X Filter error covariance update:

3) FCD correction
The height H origin of the KF output is corrected by the FCD algorithm, and a new height H FCD is output.

IV. EXPERIMENTS AND RESULTS
In this paper, a Xiaomi 8 smartphone is used as the experimental equipment, and the proposed method is tested in the three-story experimental building of our university. We use developed independently Android Software for data collection. The collected data are stored in the smartphone, and then transmitted to the server through the wireless network. The Matlab platform is used to analyze and address the data. Two walking paths are scheduled for the experiment. As showed in the in Fig. 4(a) is a 2D path, and Fig. 4(b) is a 3D path. The length of a circle in the 2D test area is 58.2m. The first, second,and third floors of 3D experimental floor are 4.3m, 2.64m, and 2.48m high, respectively. During walking, the experimenter walked indoors with a smartphone in his VOLUME 8, 2020  hand, keeping the smartphone parallel to the ground and aiming at the front. The initial number of particles of the particle filter is set to 100. The sampling frequency of the sensor is 25 Hz, and the average step length is 0.525 m.

A. TWO DIMENSIONAL TRAJECTORY CORRECTION TEST
To verify the effectiveness of the 2D trajectory correction method (PDR_PF), the experimenter walked according to the path shown in Fig. 4(a). The number of recording steps is 64, and two data processing schemes are designed in the experiment:(a) obtain the original data of the smartphone built-in sensor for PDR solution and (b) use PF to modify the data of the sensor. The 2D estimated trajectories of the two experimental schemes are shown in the Fig. 5. Fig. 5(a) shows the track before correction, and Fig. 5(b) shows the track after PDR_PF correction. The figure and TABLE 1 show that the PF effectively corrects the 2D trajectory, especially the corner. The average error is reduced from 1.58 m to 0.64 m, and the positioning accuracy is improved by 59%. Results show that the positioning accuracy of the PF is considerably improved in the entire walking process, and the heading drift is effectively suppressed.  Fig. 6 shows the height estimation of the three different height measurement schemes for the target in the process of multifloor movement according to the path shown in Fig. 4(b). Red is the real height, and blue is the measurement height. Fig. 7 shows the error of three height detection schemes. Firstly, due to the extreme instability of the barometer, the measurement height is irregular when the height measurement is performed by the built-in barometer of the smartphone. The maximum error reaches 1.7693 m. In scheme(b), the KF is utilized to fuse the barometer and the accelerometer to measure the height, the height fluctuation is obviously reduced, and the measurement accuracy is obviously improved. TABLE 2 shows that compared with scheme(a), the average error and the maximum error are reduced by 56% and 69%, respectively, and the measurement accuracy is improved by 50% relative to the accuracy of the medium error. Scheme(c), based on the scheme(b), the FCD algorithm is used to correct the height of the KF output. The average error is only 0.1085m, the measurement accuracy is improved by 29%, and the average error and the maximum error are reduced by 44%. These results indicate that the stability and accuracy of the height measurement algorithm based on KF and FCD are improved, which is superior to other height measurement schemes.

C. THREE DIMENSIONS TARGET TRACKING TEST
In order to verify the performance of the indoor 3D target tracking system proposed in this paper, the experimenter walked according to the 3D route shown in Fig. 4(b), and the number of steps recorded was 400. Two comparison schemes are proposed: (a) PDR+Baro: PDR calculation and height measurement are carried out with the original data of the smartphone's built-in sensors; (b) PDR_PF+KF_FCD: The proposed 3D indoor target tracking method in this paper.
The experimental tracks of the two multi-floor target tracking schemes are shown in Fig. 8 Red is the real path and blue is the estimated trajectory. As shown in Fig. 8 (a), the estimated trajectory of Scheme (a) is chaotic and seriously offset, Thus, obtaining a complete track is almost impossible. As shown in Fig. 8 (b), the estimated trajectory is almost consistent with the real path, the height fluctuation is basically eliminated, and the track is relatively stable and smooth. The results of further analysis are displayed in Fig. 9. and TABLE 3. In scheme (a), due to the heading drift of the sensor, the error of the 3D estimated trajectory using PDR and barometer accumulates over time, and the maximum error is as high as 11.641m; By contrast, in scheme (b), the trajectory of PDR is modified by the PF in 2D space, and the height of KF output is modified by the FCD algorithm. Thus, the average error is reduced from 6.383 m to 0.544 m, and the positioning accuracy is greatly improved. In sum, the proposed multi-floor trajectory tracking scheme can effectively reduce the error accumulation, eliminate the height fluctuation, have high accuracy and strong stability, and obviously affect in the long walking process.   In recent years, many scholars at home and abroad have carried out research on indoor pedestrian trajectory tracking, and many outstanding research results are worthy of attention. However, the positioning accuracy cannot directly evaluate the performance of the system because of the differences in system design scheme, experimental scene, experimental equipment, and walking trajectory. Some comparisons are shown in Table 4. However, compared with the current stateof-the-art methods, our proposed method has the following advantages: (1) Compared with the target tracking method based on WiFi wireless network in [16], [29], [30], our target tracking system does not rely on indoor infrastructure, has low cost, wider application scenarios, and is suitable for more complex indoor environment.
(2) Compared with the sensor-based 2D plane trajectory scheme in [13]- [15], [31], [32], we expand the 2D trajectory tracking of pedestrian indoor to 3D space successfully; Compared with the 3D trajectory in [1], [22], our experimental path is more complex, and the error analysis of each step of the trajectory is carried out. The complex experimental path introduces more challenges to our algorithms, but the result is more reliable and robust.
(3) In our research, we not only use KF to fuse the builtin accelerometer and barometer but also proposed the FCD algorithm to modify the height of KF fusion further. Compared with the direct use of barometer in [1], [19], [20], [33], our height estimation method is more accurate and less error.

V. CONCLUSION AND FUTURE WORK
In this paper, a multi-floor 3D target tracking system (PDR_PF+KF_FCD) based on the built-in sensors of smartphones is proposed. On the basis of the error accumulation characteristics of PDR, this paper uses the improved particle filter algorithm to modify the PDR trajectory, greatly reducing the accumulated error of PDR and improving the positioning accuracy. A height estimation algorithm combining KF and FCD algorithm in an indoor environment is proposed. KF integrates the accelerometer and the barometer to realize complementary advantages, improve height estimation accuracy, and reduce height fluctuation. The FCD algorithm realizes floor change detection, effectively maintains the stability of the same floor height, and basically eliminates height abnormal fluctuation. Experimental results demonstrate that the average error is only 0.544 m, it apparently improves the stability and accuracy of indoor multi-floor trajectory tracking. Such an algorithm is a self-contained, cost-effective, and easy-to-use positioning solution. The proposed system will be used in various applications for smartphone-based indoor target tracking.
In future work, firstly, we will consider adding an ANNbased motion detection mechanism to recognize the target's motion (jogging, walking, and running); Secondly, consider subjects carrying a smartphone in different ways, such as pocket or bag, to prevent carrying restrictions; Lastly, taking elevators and escalators into account in height estimation. CUIJUN