# UWB Indoor Localization Algorithm Using Firefly of Multistage Optimization on Particle Filter

Authors: Xiaoguo Zhang; Yujin Kuang; Haoran Yang; Hang Lu; Yuan Yang
Journal: Journal of Sensors
 (2021)

---

## Abstract

With the increasing application potential of indoor personnel positioning, ultra-wideband (UWB) positioning technology has attracted more and more attentions of scholars. In practice, an indoor positioning process often involves multipath and Non-Line-Of-Sight (NLOS) problems, and a particle filtering (PF) algorithm has been widely used in the indoor positioning research field because of its outstanding performance in nonlinear and non-Gaussian estimations. Aiming at mitigating the accuracy decreasing caused by the particle degradation and impoverishment in traditional Sequential Monte Carlo (SMC) positioning, we propose a method to integrate the firefly and particle algorithm for multistage optimization. The proposed algorithm not only enhances the searching ability of particles of initialization but also makes the particles propagate out of the local optimal condition in the sequential estimations. In addition, to prevent particles from falling into the oscillatory situation and find the global optimization faster, a decreasing function is designed to improve the reliability of the particle propagation. Real indoor experiments are carried out, and results demonstrate that the positioning accuracy can be improved up to 36%, and the number of needed particles is significantly reduced.


---

## Body

## 1. Introduction

As the public spend a growing number of their time indoors (80-90%) [1], services based on indoor location become an indispensable part of people’s life and work. However, the Global Positioning System (GPS) cannot provide fair accuracy in indoor environment tracking due to NLOS issues [2, 3]. Hence, the demand for high precision indoor positioning technology becomes increasingly urgent [4].The Indoor Positioning System (IPS) can display the location information of people or objects in an indoor environment and also grasp the location of target objects in real time [5]. With advances in sensor technologies [6] and wireless communications [7], various indoor localization methods and systems have been developed over the past years [8]. In indoor environments, positioning is mainly achieved through the use of radio and inertial navigation technologies [9]. Among them, ultra-wideband (UWB) is a new technology in the field of communication that uses pulses with a width of nanoseconds as wireless communication signals [10], which has the advantages of strong multipath resolutions, fast transmission rate, low power consumption, and high positioning accuracy [11]. Therefore, UWB is suitable for high-precision indoor positioning services [12, 13].The UWB observation problem is for the most part nonlinearity [14]. It is well known that Extended Kalman Filter (EKF) is a popular method in approaching the nonlinearity problem [15]. Nevertheless, EKF often suffers large errors and deviations in its estimates of states and variances of nonlinear stochastic systems [16]. Compared with EKF, the main advantage of PF is that it is a Monte Carlo method to find the numerical solution of the sampling process, which gets rid of the restrictive condition that the random quantity must meet the Gaussian distribution [17]. However, the resampling adopted by PF will lose particle diversity, leading to particle impoverishment [18].In recent years, the combination of swarm intelligence optimization (SIO) algorithm and PF algorithm has become one of important research trends [19]. The SIO algorithm regards particles as individuals in a biological population and adjusts the distribution of particles by simulating the movement law of biological clusters [20]. Given that the process does not discard particles with low weights, the phenomenon of particle impoverishment can be fundamentally avoided [21]. Chunming et al. aimed at the particle degradation and sample impoverishment existing in target tracking algorithm in existing wireless sensor network (WSN), introducing artificial fish swarm algorithm (AFSA) to improve the distribution state of particles in the resampling phase [22]. Cai et al. adopted a genetic algorithm to replace the resampling process and combined with the mutation and crossover stages, which improved the accuracy of filter, whereas this method has quite a few parameters and the setting of parameters has strong randomness [23]. Han et al. proposed an improved particle filter algorithm based on pigeon-inspired optimization (PIO). The algorithm combines the solving process of particle filters and guides the particles to move to the high likelihood area by the optimum process that pigeons usually fly from a far position to areas with high-fitness constantly [24]. Zhu et al. proposed an improved particle filter algorithm based on krill herd optimization, in which the induced movement, foraging motion, and physical diffusion processes of krill individuals are introduced into the particle filter to drive the particles to move towards the high likelihood region [25]. However, the improved PF algorithm based on the idea of SIO still has the problem of the blind search strategy and pays too much attention to the ability of particle exploration so that it is very difficult to balance the development ability of particle optimization in the later stage, which significantly affects the efficiency of particles moving to the high likelihood area [26]. At the equal time, there are invalid individuals in the iterative optimization process, which increases the computational redundancy of the algorithm [27].Aiming at the above problems, this paper came up with an improved firefly particle filter (IF-PF) Algorithm1. In the early stage of implementing the search strategy of our approach, the particle population is divided into several groups and a local search strategy is executed to solve the problem of target blindness. Then, all particles will carry out a global search strategy to expand the development ability, which ensures the diversity of particles. At the same time, the invalid particles will be replaced in time to reduce computational redundancy. By combining local search strategy with global search strategy, the performance of tracking algorithms can be improved with fewer particles, which raises the tracking accuracy and the tracking speed at the same time. Furthermore, the adaptive function is also added to avoid the problem that the particle oscillates in the vicinity of the optimal individual. Through applying IF-PF to the indoor UWB positioning, the experimental results show that the improved algorithm is superior to the standard particle filter and its popular variants in robustness and positioning accuracy.Algorithm 1: Pseudocode of IF-PF.
xki,wkii=1N=PFxk−1i,wk−1ii=1N,zk1.fori =1: NDrawxki~qxk∣xk−1i,zk2.  Assign the particle a weight,wki, according to Equation (3)3.end for4.fort =1: M-15.fori =1: N6.   Updatexi, Update wi7.end for8.optimization based on Local search strategy9.     Sort by weight and form groups in order10.     the position of theXw for each group is adjusted such as Equation (11)11.     Check the convergence.12.     update weight13.optimization based on Global search strategy14.fori =1: N15.      Light intensityIi at Xi is determined by (9)16.      Cluster particles and find the current best one17.      Move particle according to Equation (13)18.      Evaluate new solutions and update light intensity19.end for20   resample21.fori =1: N22.   Normalize weight according to the Equation (4)23.end for24.end forThe remainder of this paper is organized as follows. A brief introduction of PF is given in Section2. In Section 3, we describe the algorithm we proposed in detail. The experimental setting and performance evaluation of the proposed algorithm are introduced in Section 4. Finally, Section 5 concludes and introduces the future work.


## 2. Particle Filter

The idea of the PF is based on Monte Carlo methods, which use particle sets to represent probabilities and can be used in any form of the state space model. The core idea is to express a distribution by extracting random state particles from the posterior probability. It is a sequential importance sampling method. The main steps of PF are summarized as follows:(1)
Initializing particles and weightsAccording to the empirical information of the state quantity [28], choose a proposal distribution px0, and randomly generate a set of samples [29], namely particles: x0i~px0,i=1,⋯,N,w0i=1/N.
(2)
Importance samplingOne-step prediction based on the equation of state is shown as(1)X^k+1∣k=FX^k+LwkThe one-step forecast of the observed value is estimated as(2)Z^k+1∣k=hX^k+1∣k+vk(3)
Particle weight update and normalization(i)
Weight update:(3)wk=wk−1pZk∣XkpXk∣Xk−1qXk∣X0:k−1,Z1:k(ii)
Normalization:(4)wk+1i=wk+1i∑i=1Nwk+1i(4)
ResamplingSort the particles by weight, and replace the small-weight particles with the large-weight ones.(5)
State estimationFinally, use the updated particle set and its weight to approximate the posterior probability density of the state quantity [30]:
(5)X^k+1=∑i=1Nwk+1iX^k+1i


## 3. Proposed Algorithm

The Firefly Algorithm (FA) was first proposed by Yang in the year 2009 at Cambridge University [31], which is derived from simulating the flashing patterns and behavior of fireflies.The brightnessI of fireflies is defined as follows:
(6)I=I0×e−γrij,where I0 represent the initial brightness intensity and initial attraction, γ represents a fixed optical absorption coefficient, and r is the distance between two fireflies.The variation of attractivenessβ with the distance γ is defined by
(7)β=β0e−γr2,where β0 is the attractiveness at γ=0.The movement of low brightness fireflyi is attracted to another more attractive firefly j, which is determined by
(8)Xt+1i=Xti+β0e−γrij2Xtj−Xti+αtδ−0.5where Xit and Xjt are the position of fireflies i and j at t time, αt∈0,1 is the step size factor, and δ refers to the random factor obeying a uniform distribution in [0, 1].


### 3.1. Local Search Strategy

Considering the inherent similarity between the PF and FA, the two algorithms are combined. We regard the particles in PF as individuals in firefly population and then implement optimization iterative strategies. Since the weight of particles is easily affected by the latest observation value in UWB positioning systems, the brightness of firefly is modified according to(9)Ii=exp12R−zi−hxi2,where zi is the latest observation value, hxi is the predictive observation value of particle i, and R is the variance of the observed noise. Each particle’s brightness is only related to the latest observation as shown in Equation (9), and the brightness does not rely on the relative location of all the other particles. From Equation (9), the brightness is proportional to weight, which can better reflect the quality of particle position through the weight.In the traditional FA, all of the individuals will move toward the brightest individual. Nevertheless, in the initial stage, the ability of low-brightness individuals to move toward the brightest individual is weak, resulting in poor optimization effect. To solve this problem, a local search strategy is adopted. First of all, the particle fitness is sorted in a descending order, and the particle with the best fitness value in the particle group is recorded asl. Next, the particle population is divided into m groups, each group contains n particles, satisfying the relationship m∗n=N.During this progress, the first particle enters the first group, the second particle enters the second group, particlem goes to the mth group, particle m+1 goes to the first group, and so on until all particles are assigned. Each group has the particle with the best fitness value as l and the particle with the worst fitness value as w. Accordingly, the position of the particle Xw is adjusted as follows:
(1)
The position update ofXw is(10)Δ=r∗Xl−Xw,where r represents a random number that takes a value between 0 and 1
(2)
The position of particleXw moves from the past position to the new position as determined by the following equation:(11)Xw′=Xw+ΔcoswkΔitermax+αε,where α∈0,1 is the step size factor and ε is a random number that the Gaussian distribution Xw′ represents the new position of the updated particle. When the number of iterations is relatively small, the distance Δ is relatively large. As the number of iterations increases, the weight difference between the particle w and particle l in the group is relatively reduced. To avoid the concentration of particles around the particle l, a decreasing function is added to reduce the moving distance with a cosine characteristic.After all the groups have completed the local research, calculate the corresponding fitness value. Then, remix all particles of the group, reorder and divide the groups, and perform the local search again. Repeat the update process until the preset number of iterations is completed.


### 3.2. Global Search Strategy

After the optimization within the group is completed, we regard the particle object as a cluster and merge the cluster afterward according to the similarity in the particle weights. The process is repeated to find the cluster with the best particle weight and find the center positionXg of the cluster.Then, compute the attractivenessβ between the current particle i and the center particle g according to the equation:
(12)βk=1−β0e−γr2ig,where rig is the distance between the ith particle and the optimal the gth particle. As we can see from Equation (12), the attractiveness of the ith particle depends on the distance between the ith and gth particles. When the distance between the ith and gth particles is comparatively long, the attractiveness between them will increase. Otherwise, the attractiveness will decrease. This strategy can dynamically adjust the visible range of particles and further the search accuracy. Subsequently, position estimations can be updated according to the equation:
(13)Xt+1i=Xti+βke−γrig2Xtg−Xti+αtδ−0.5,where Xit and Xjt are the position of the firefly i and j at t time, αt∈0,1 is the step size factor, and δ refers to the random factor obeying a uniform distribution in [0, 1].According to the two optimal strategies, the particle can satisfy the right distribution stage and prevent the particle from falling into the local optimum.


## 3.1. Local Search Strategy

Considering the inherent similarity between the PF and FA, the two algorithms are combined. We regard the particles in PF as individuals in firefly population and then implement optimization iterative strategies. Since the weight of particles is easily affected by the latest observation value in UWB positioning systems, the brightness of firefly is modified according to(9)Ii=exp12R−zi−hxi2,where zi is the latest observation value, hxi is the predictive observation value of particle i, and R is the variance of the observed noise. Each particle’s brightness is only related to the latest observation as shown in Equation (9), and the brightness does not rely on the relative location of all the other particles. From Equation (9), the brightness is proportional to weight, which can better reflect the quality of particle position through the weight.In the traditional FA, all of the individuals will move toward the brightest individual. Nevertheless, in the initial stage, the ability of low-brightness individuals to move toward the brightest individual is weak, resulting in poor optimization effect. To solve this problem, a local search strategy is adopted. First of all, the particle fitness is sorted in a descending order, and the particle with the best fitness value in the particle group is recorded asl. Next, the particle population is divided into m groups, each group contains n particles, satisfying the relationship m∗n=N.During this progress, the first particle enters the first group, the second particle enters the second group, particlem goes to the mth group, particle m+1 goes to the first group, and so on until all particles are assigned. Each group has the particle with the best fitness value as l and the particle with the worst fitness value as w. Accordingly, the position of the particle Xw is adjusted as follows:
(1)
The position update ofXw is(10)Δ=r∗Xl−Xw,where r represents a random number that takes a value between 0 and 1
(2)
The position of particleXw moves from the past position to the new position as determined by the following equation:(11)Xw′=Xw+ΔcoswkΔitermax+αε,where α∈0,1 is the step size factor and ε is a random number that the Gaussian distribution Xw′ represents the new position of the updated particle. When the number of iterations is relatively small, the distance Δ is relatively large. As the number of iterations increases, the weight difference between the particle w and particle l in the group is relatively reduced. To avoid the concentration of particles around the particle l, a decreasing function is added to reduce the moving distance with a cosine characteristic.After all the groups have completed the local research, calculate the corresponding fitness value. Then, remix all particles of the group, reorder and divide the groups, and perform the local search again. Repeat the update process until the preset number of iterations is completed.


## 3.2. Global Search Strategy

After the optimization within the group is completed, we regard the particle object as a cluster and merge the cluster afterward according to the similarity in the particle weights. The process is repeated to find the cluster with the best particle weight and find the center positionXg of the cluster.Then, compute the attractivenessβ between the current particle i and the center particle g according to the equation:
(12)βk=1−β0e−γr2ig,where rig is the distance between the ith particle and the optimal the gth particle. As we can see from Equation (12), the attractiveness of the ith particle depends on the distance between the ith and gth particles. When the distance between the ith and gth particles is comparatively long, the attractiveness between them will increase. Otherwise, the attractiveness will decrease. This strategy can dynamically adjust the visible range of particles and further the search accuracy. Subsequently, position estimations can be updated according to the equation:
(13)Xt+1i=Xti+βke−γrig2Xtg−Xti+αtδ−0.5,where Xit and Xjt are the position of the firefly i and j at t time, αt∈0,1 is the step size factor, and δ refers to the random factor obeying a uniform distribution in [0, 1].According to the two optimal strategies, the particle can satisfy the right distribution stage and prevent the particle from falling into the local optimum.


## 4. Experiment Setting and Evaluation

### 4.1. Experiment Setting

The UWB hardware we use to test our approach is compliant with IEEE 802.15.4-2011 UWB standard and consists of multiple anchor node (UK100) and one mobile (tag) node (UM208). Its performance indicators are shown in Table1. The positioning experiment adopts a 2D model. The channel frequency and data rate of the UWB communication are configured to 3.8 GHz and 110 kbps, respectively, to maximize the covered area of UWB nodes. Under the configuration, the UWB anchors report ranging measurements between the anchor nodes and the mobile node at 3.5 Hz. In this paper, the experiments have been conducted in the laboratory of Southeast University with a hall that occupies an area of approximately 10×15m2. Four anchor nodes and one mobile anchor are used in this experiment. The distance between the anchor node and mobile node is measured by two-way ranging time-of-flight (TOF). All ranging measurements and timestamps are transmitted to the laptop via WIFI.Table 1
Parameter of the UWB system.
PerformanceParametersLine-of-sight ranging distance30 mOperating voltage5 VPositioning sampling rate10 HzOut power (25°C)-41.3 dBm/MHzRanging accuracy5 cmClock frequency125 MHzWe arrange the experimental environment according to Figure1. Among them, A1-A4 are anchors. We measure and record the 2d coordinate of the anchor as shown in Table 2. When four positioning base stations are installed, the UWB positioning area can cover a relatively large area, generally up to about 8 to 20 meters. In the deployment of the base station, to minimize the influence of pedestrians or other objects on the signal, the positioning system installs the positioning base stations on a chair at a certain distance from the ground and ensures that they are at the equivalent height. The IF-PF algorithm is mainly used to boost the performance of dynamic tracking; for that reason, the experimental scheme is designed as a curved path. The curved path is relatively simple, along which the experimenter walks around the whole experimental field with a moving trajectory similar to a rectangle. P1-P6 are trajectory points in the path.Figure 1
UWB anchor deployment and key points of the mobile experiment.Table 2
Position coordinates of the UWB anchors.
UWB anchorCoordinates (m,m)A1(0, 0)A2(0, 7.20)A3(4.20, 7.20)A4(4.20, 0)Table3 shows the coordinates of each point. The experimenter holds a UWB tag, walks at a normal walking speed, and starts from P1, then passes through P2, P3, P4, P5, and P6 in turn, which is shown by the red arrows in Figure 1. Throughout the calculation process, all of the initial values for the algorithms are given by the reference trajectory.Table 3
Position coordinates of the trajectory points.
Trajectory pointCoordinates (m,m)P1(1.20, 6.00)P2(3.00, 6.00)P3(3.00, 3.00)P4(3.00, 1.20)P5(1.20, 1.20)P6(1.20, 3.00)


### 4.2. Result Analysis

This section compares the tracking performances of Taylor, EKF, PF, and IF-PF under an identical path. The positioning error is defined as the distance from the estimated position to the actual position at each test point. Thex-axis error is defined in Equation (14) and the y-axis error in Equation (15).
(14)xerror=x^−x,(15)yerror=y^−y,where xerror and yerror represent the x-axis error and y-axis error, respectively, x^ is the calculated position in X direction, and x is the actual position in X direction. Similarly, y^ is the calculated position in Y direction and y is the actual position in Y direction.Figure2 shows the reference trajectory along the path and the different positioning results obtained based on the various algorithms. The trajectory formed by the green-triangle line is the solution consequence of the Taylor, the blue-star is the result of EKF, and the white-circle line is the result of PF. And the red line indicates the reference trajectory along the path, and the red-triangle line represents the result of the IF-PF. Meanwhile, the red solid circles are the positions of the four UWB anchors.Figure 2
Comparison of the tracking results of Taylor algorithm, EKF, PF, and IF-PF.It can be seen from the trajectory in Figure2 that all four algorithms can realize the positioning and tracking of the experimenter. For the reason that holding the UWB mobile node on the side of the experimenter body will bring about a large NLOS error, the positioning results of the four algorithms all deviate from the same direction. When there is another NLOS disturbance from the outside, the positioning result of Taylor and EKF algorithm will have some jump points while the IF-PF algorithm can smooth the data so that the position jump can be corrected. In comparison with the traditional PF algorithm, the overall effect of the IF-PF algorithm is close to the real motion trajectory. We can believe that the IF-PF is effective to resist the effect of outliers. To prove this effect, a trajectory point at a certain moment in the experiment is analyzed.The particle distribution in PF, FPF, and IF-PF algorithms at a certain moment is shown in Figure3. It can be seen that the particle distribution is loose due to the NLOS error. In the FPF algorithm, the particle distribution is tighter than the initial state, which is because the particle being far away from the real position can be attracted by the particle with high weight in the firefly particle filter. However, since the distance between the particle with high weight and particle with low weight is too far, the attraction is weak. IF-PF introduces a local search strategy to enhance the movement ability of particles in the initial stage. It can be seen that compared with PF and FPF, IF-PF can better resist NLOS interference and make particles closely surround the real position.Figure 3
Comparison of the particle distribution of PF, FPF, and IF-PF algorithm. (a) Particle distribution of a position calculation in PF algorithm. (b) Particle distribution of a position calculation in firefly particle filter (FPF) algorithm. (c) Particle distribution of a position calculation in IF-PF algorithm.
(a)(b)(c)Figure4 shows the time series of position errors in the x-axis and y-axis directions for the four algorithms, and the x-axis represents each sampling point. In the figure, we can see that the positioning error using our proposed algorithm is small. Furthermore, a comparison with other algorithms for range estimation shows that the average error has been significantly reduced. Comparatively speaking, IF-PF is more robust than PF, EKF, and Taylor especially when there is a large error in the observations.Figure 4
Comparison of positioning errors with each algorithm. (a) Comparison of positioning error in theY direction. (b) Comparison of positioning error in the X direction.
(a)(b)To determine the location efficiency, we have implemented the empirical cumulative distribution function (CDF) of the location error of the four algorithms, as shown in Figure5. As shown in the figure, there is a high reduction in the percentage x-axis location error of our IF-PF at CDF of 0.3, 0.4, and 0.5 compared with the other algorithms.Figure 5
Cumulative distribution function (CDF) with different algorithms. (a) Comparison of CDF in theY direction. (b) Comparison of CDF in X direction.
(a)(b)To quantitatively evaluate the performance of the improved algorithm, four performance metrics (the average error, minimum error, maximum error, and standard deviation of error) are defined as follows:(16)e¯=1n∑i=1nei,(17)emin=mine1,e2,⋯,en,(18)emax=maxe1,e2,⋯,en(19)eσ=1n∑i=1nei−e¯2,where e¯, emin, emax, and eσ are the average error, minimum error, maximum error, and standard deviation of the error, respectively. As shown in Table 4, it can be seen that the maximum positioning errors in the x-axis and y-axis are 0.3229 m and 0.3333 m, respectively, when the IF-PF is used. As a comparison, the maximum positioning errors in the x-axis and y-axis can reach 0.5723 m and 0.4850 m, respectively, when the PF is applied, and the error of 70% in IF-PF is less than 0.2 m; that is, under the given conditions, IF-PF can control the error within 0.17 m, while that of PF is 0.28 m, EKF exceeds 0.32 m, Taylor is 0.33 m. We can find that the average positioning accuracy of the IF-PF algorithm reaches about 0.17 m, which is about 36% higher than PF, about 44% higher than EKF, and about 45% higher than Taylor. The positioning accuracies are different. Furthermore, the IF-PF algorithm is less susceptible to NLOS.Table 4
Statistical test results of four algorithms.
x-axisy-axise¯meminmemaxmeσme¯meminmemaxmeσmTaylor0.40480.00011.03740.01470.25660.03931.85340.0520EKF0.35910.00830.74350.00980.28090.02611.09170.0273PF0.32140.04630.57230.00870.237600.48500.0109IF-PF0.20500.05590.32290.00330.152500.33330.0048As can be seen from Table4, the average error can well reflect the positioning accuracy of each algorithm. Consequently, the average error can be selected as precision measure of the corresponding algorithm. Then, the positioning accuracy of the two algorithms under different particle numbers is analyzed, as shown in Table 5.Table 5
Comparison of estimation accuracy.
Particle numberx-axis error (m)y-axis error (m)PFIF-PFPFIF-PF2500.78170.23360.49950.22183500.31030.21070.31030.16044500.30900.20500.24310.1525It can be seen from Table5 that with the increase of the number of particles, the average error of both algorithms shows a decreasing trend, which is consistent with the theory that the more particles the algorithm has, the higher the estimation accuracy will be. When the number of particles increases from 250 to 450, the accuracy of PF is improved more obviously than that of IF-PF. However, when the particle number is 250, the positioning error of IF-PF is lower than that of PF when the particle number is 450. This is because although the increase in the number of particles improves the positioning accuracy, the resampling adopted by PF will lose particle diversity, leading to particle impoverishment. In contrast, the IF-PF algorithm introduces multistage optimization strategies to improve the particle distribution state, increase the number of effective particles, weaken the sample impoverishment problem, and greatly reduce the number of required particles. In summary, the IF-PF algorithm proposed in this paper has higher comprehensive efficiency.


## 4.1. Experiment Setting

The UWB hardware we use to test our approach is compliant with IEEE 802.15.4-2011 UWB standard and consists of multiple anchor node (UK100) and one mobile (tag) node (UM208). Its performance indicators are shown in Table1. The positioning experiment adopts a 2D model. The channel frequency and data rate of the UWB communication are configured to 3.8 GHz and 110 kbps, respectively, to maximize the covered area of UWB nodes. Under the configuration, the UWB anchors report ranging measurements between the anchor nodes and the mobile node at 3.5 Hz. In this paper, the experiments have been conducted in the laboratory of Southeast University with a hall that occupies an area of approximately 10×15m2. Four anchor nodes and one mobile anchor are used in this experiment. The distance between the anchor node and mobile node is measured by two-way ranging time-of-flight (TOF). All ranging measurements and timestamps are transmitted to the laptop via WIFI.Table 1
Parameter of the UWB system.
PerformanceParametersLine-of-sight ranging distance30 mOperating voltage5 VPositioning sampling rate10 HzOut power (25°C)-41.3 dBm/MHzRanging accuracy5 cmClock frequency125 MHzWe arrange the experimental environment according to Figure1. Among them, A1-A4 are anchors. We measure and record the 2d coordinate of the anchor as shown in Table 2. When four positioning base stations are installed, the UWB positioning area can cover a relatively large area, generally up to about 8 to 20 meters. In the deployment of the base station, to minimize the influence of pedestrians or other objects on the signal, the positioning system installs the positioning base stations on a chair at a certain distance from the ground and ensures that they are at the equivalent height. The IF-PF algorithm is mainly used to boost the performance of dynamic tracking; for that reason, the experimental scheme is designed as a curved path. The curved path is relatively simple, along which the experimenter walks around the whole experimental field with a moving trajectory similar to a rectangle. P1-P6 are trajectory points in the path.Figure 1
UWB anchor deployment and key points of the mobile experiment.Table 2
Position coordinates of the UWB anchors.
UWB anchorCoordinates (m,m)A1(0, 0)A2(0, 7.20)A3(4.20, 7.20)A4(4.20, 0)Table3 shows the coordinates of each point. The experimenter holds a UWB tag, walks at a normal walking speed, and starts from P1, then passes through P2, P3, P4, P5, and P6 in turn, which is shown by the red arrows in Figure 1. Throughout the calculation process, all of the initial values for the algorithms are given by the reference trajectory.Table 3
Position coordinates of the trajectory points.
Trajectory pointCoordinates (m,m)P1(1.20, 6.00)P2(3.00, 6.00)P3(3.00, 3.00)P4(3.00, 1.20)P5(1.20, 1.20)P6(1.20, 3.00)


## 4.2. Result Analysis

This section compares the tracking performances of Taylor, EKF, PF, and IF-PF under an identical path. The positioning error is defined as the distance from the estimated position to the actual position at each test point. Thex-axis error is defined in Equation (14) and the y-axis error in Equation (15).
(14)xerror=x^−x,(15)yerror=y^−y,where xerror and yerror represent the x-axis error and y-axis error, respectively, x^ is the calculated position in X direction, and x is the actual position in X direction. Similarly, y^ is the calculated position in Y direction and y is the actual position in Y direction.Figure2 shows the reference trajectory along the path and the different positioning results obtained based on the various algorithms. The trajectory formed by the green-triangle line is the solution consequence of the Taylor, the blue-star is the result of EKF, and the white-circle line is the result of PF. And the red line indicates the reference trajectory along the path, and the red-triangle line represents the result of the IF-PF. Meanwhile, the red solid circles are the positions of the four UWB anchors.Figure 2
Comparison of the tracking results of Taylor algorithm, EKF, PF, and IF-PF.It can be seen from the trajectory in Figure2 that all four algorithms can realize the positioning and tracking of the experimenter. For the reason that holding the UWB mobile node on the side of the experimenter body will bring about a large NLOS error, the positioning results of the four algorithms all deviate from the same direction. When there is another NLOS disturbance from the outside, the positioning result of Taylor and EKF algorithm will have some jump points while the IF-PF algorithm can smooth the data so that the position jump can be corrected. In comparison with the traditional PF algorithm, the overall effect of the IF-PF algorithm is close to the real motion trajectory. We can believe that the IF-PF is effective to resist the effect of outliers. To prove this effect, a trajectory point at a certain moment in the experiment is analyzed.The particle distribution in PF, FPF, and IF-PF algorithms at a certain moment is shown in Figure3. It can be seen that the particle distribution is loose due to the NLOS error. In the FPF algorithm, the particle distribution is tighter than the initial state, which is because the particle being far away from the real position can be attracted by the particle with high weight in the firefly particle filter. However, since the distance between the particle with high weight and particle with low weight is too far, the attraction is weak. IF-PF introduces a local search strategy to enhance the movement ability of particles in the initial stage. It can be seen that compared with PF and FPF, IF-PF can better resist NLOS interference and make particles closely surround the real position.Figure 3
Comparison of the particle distribution of PF, FPF, and IF-PF algorithm. (a) Particle distribution of a position calculation in PF algorithm. (b) Particle distribution of a position calculation in firefly particle filter (FPF) algorithm. (c) Particle distribution of a position calculation in IF-PF algorithm.
(a)(b)(c)Figure4 shows the time series of position errors in the x-axis and y-axis directions for the four algorithms, and the x-axis represents each sampling point. In the figure, we can see that the positioning error using our proposed algorithm is small. Furthermore, a comparison with other algorithms for range estimation shows that the average error has been significantly reduced. Comparatively speaking, IF-PF is more robust than PF, EKF, and Taylor especially when there is a large error in the observations.Figure 4
Comparison of positioning errors with each algorithm. (a) Comparison of positioning error in theY direction. (b) Comparison of positioning error in the X direction.
(a)(b)To determine the location efficiency, we have implemented the empirical cumulative distribution function (CDF) of the location error of the four algorithms, as shown in Figure5. As shown in the figure, there is a high reduction in the percentage x-axis location error of our IF-PF at CDF of 0.3, 0.4, and 0.5 compared with the other algorithms.Figure 5
Cumulative distribution function (CDF) with different algorithms. (a) Comparison of CDF in theY direction. (b) Comparison of CDF in X direction.
(a)(b)To quantitatively evaluate the performance of the improved algorithm, four performance metrics (the average error, minimum error, maximum error, and standard deviation of error) are defined as follows:(16)e¯=1n∑i=1nei,(17)emin=mine1,e2,⋯,en,(18)emax=maxe1,e2,⋯,en(19)eσ=1n∑i=1nei−e¯2,where e¯, emin, emax, and eσ are the average error, minimum error, maximum error, and standard deviation of the error, respectively. As shown in Table 4, it can be seen that the maximum positioning errors in the x-axis and y-axis are 0.3229 m and 0.3333 m, respectively, when the IF-PF is used. As a comparison, the maximum positioning errors in the x-axis and y-axis can reach 0.5723 m and 0.4850 m, respectively, when the PF is applied, and the error of 70% in IF-PF is less than 0.2 m; that is, under the given conditions, IF-PF can control the error within 0.17 m, while that of PF is 0.28 m, EKF exceeds 0.32 m, Taylor is 0.33 m. We can find that the average positioning accuracy of the IF-PF algorithm reaches about 0.17 m, which is about 36% higher than PF, about 44% higher than EKF, and about 45% higher than Taylor. The positioning accuracies are different. Furthermore, the IF-PF algorithm is less susceptible to NLOS.Table 4
Statistical test results of four algorithms.
x-axisy-axise¯meminmemaxmeσme¯meminmemaxmeσmTaylor0.40480.00011.03740.01470.25660.03931.85340.0520EKF0.35910.00830.74350.00980.28090.02611.09170.0273PF0.32140.04630.57230.00870.237600.48500.0109IF-PF0.20500.05590.32290.00330.152500.33330.0048As can be seen from Table4, the average error can well reflect the positioning accuracy of each algorithm. Consequently, the average error can be selected as precision measure of the corresponding algorithm. Then, the positioning accuracy of the two algorithms under different particle numbers is analyzed, as shown in Table 5.Table 5
Comparison of estimation accuracy.
Particle numberx-axis error (m)y-axis error (m)PFIF-PFPFIF-PF2500.78170.23360.49950.22183500.31030.21070.31030.16044500.30900.20500.24310.1525It can be seen from Table5 that with the increase of the number of particles, the average error of both algorithms shows a decreasing trend, which is consistent with the theory that the more particles the algorithm has, the higher the estimation accuracy will be. When the number of particles increases from 250 to 450, the accuracy of PF is improved more obviously than that of IF-PF. However, when the particle number is 250, the positioning error of IF-PF is lower than that of PF when the particle number is 450. This is because although the increase in the number of particles improves the positioning accuracy, the resampling adopted by PF will lose particle diversity, leading to particle impoverishment. In contrast, the IF-PF algorithm introduces multistage optimization strategies to improve the particle distribution state, increase the number of effective particles, weaken the sample impoverishment problem, and greatly reduce the number of required particles. In summary, the IF-PF algorithm proposed in this paper has higher comprehensive efficiency.


## 5. Conclusions

This paper takes the particle filter algorithm applied in indoor UWB positioning as the research topic. Targeting the problem of significant positioning error caused by particle impoverishment in the conventional Monte Carlo positioning method, the IF-PF algorithm is proposed which is applied in indoor UWB positioning. In this algorithm, the local and global strategies are used to make the particles move to the high likelihood region adaptively before weight updating, avoiding the problem of particle impoverishment caused by a large number of low-weight particles being replaced by high-weight particles, thereby improving the quality of the particles. The problem of particle impoverishment is effectively weakened. Therefore, the IF-PF algorithm has significantly reduced requirements for the number of particles under the same positioning accuracy. Test results show that our method can achieve better and more stable positioning performance by comparison with the original positioning algorithm, and the positioning accuracy reaches about 0.17 m. A future work will concentrate on adding NLOS ranging modeling to improve positioning accuracy across the board.



---

*Source: 1383767-2021-12-15.xml*