# A Real-Time UWB Location and Tracking System Based on TWR-TDOA Estimation and a Simplified MPGA Layout Optimization

Authors: Yanping Zhu; Lei Huang; Jing Liu; Zhongkang Cao; Jinli Chen; Zijian Mu
Journal: Mobile Information Systems
 (2022)

---

## Abstract

This article designs and implements a 3D moving target positioning and tracking system by using ultrawideband (UWB) technology. The result of the two-way ranging by the time difference of arrival (TWR-TDOA) positioning algorithm is adopted to result in a new resolution that is to resolve the hyperbolic equations. The proposed algorithm is applied to outdoor and indoor scenarios. To minimize the effect of the sensor layout, this article proposes a simplified multi-population genetic algorithm (MPGA) to obtain the optimum distribution of anchors, which can rapidly reduce the number of search iterations. To resolve the low stability of the TDOA algorithm in outdoor and indoor scenarios, the Kalman filter algorithm is utilized to improve the stability and positioning accuracy of this system and a good simulation effect is achieved. The test results show that the system’s positioning error is far less than that of using other methods. The whole system has a feature of high precision, high stability, low complexity, and low cost.


---

## Body

## 1. Introduction

With the development of communication technology, more and more systems are designed for wireless sensor network node location. The most popular techniques are Bluetooth, ZigBee, radio-frequency identification, and an ultra-wideband (UWB) wireless position [1, 2]. Among them, UWB technology is a promising ranging method that uses an extremely narrow pulse to transmit data with a wide spectrum range and fast communication speed. A UWB wireless position and tracking communication system has the advantages of low complexity, low power consumption, and high positioning accuracy against multipath interference. It can be applied in tunnel vehicle positioning, underground personnel positioning, and indoor positioning. It also has the potential to provide the position and tracking of lunar/Mars rovers and astronauts, where satellite navigation systems (such as Beidou or GPS) are not available [2].For the location algorithms, there are traditional methods and hybrid algorithms. Received signal strength (RSS), angle of arrival (AOA), a difference of arrival (DOA), and time difference of arrival (TDOA) are four classical methods to realize the location. In recent years, a series of novel hybrid algorithms have been proposed to improve the system precision based on these four basic algorithms with new mathematical models or advanced solutions [3–5]. TDOA-UWB technology is widely developed as a hybrid positioning theory, which has superior localization performance compared with other approaches. The accuracy of most traditional TDOA-related algorithms based on the least square theory in a practical test is between 10 and 30 cm [6, 7]. Whistle, a novel TDOA localization without time synchronization is proposed by Xu et al. [8], which achieves high accuracy for 2D and 3D cases in acoustic source location framework, but this method has imperfections in energy efficiency and scalability. A UWB localization with a new A-TDOA method is designed in [9], while its precision is not accurate enough and only suitable for 2D cases. These algorithms have bottlenecks in power consumption, precision, and transmission delay.Some hybrid approaches were proposed to improve the system properties. In [10], a closed-form hybrid TDOA and AOA measurement with two observation stations in 3D space is proposed, which has high accuracy and low CRB. However, this method is only demonstrated in theoretical analysis without practical tests. A combined TDOA/TOF measurement is proposed by Mazraani et al. [11], which can achieve high accuracy and reduce power consumption, while this technique requires an accurate synchronization between anchors and tags. Based on TDOA equations, the Asymmetry Double-Sided Two-Way Ranging (ADS-TWR) algorithm and Chan-assisted Extended Kalman Filter in a 3D indoor positioning system with five anchors are used in Reference [12], which can achieve fast and high accurate localization.Recently, deep learning algorithms were widely reported to solve the location problems [13–15], such as convolutional neural networks (CNN), K-nearest neighbor (KNN) algorithms, and long short-term memory (LSTM), which bring heavy computational burdens. These new frameworks further improve the positioning accuracy, in theory, however, due to the algorithms’ complexities, the system has high requirements on the hardware platform in an actual scene.The anchor layout is another important factor in the UWB location system. Most of the previous studies are implemented in 2D plane layout positioning. Due to the complexity of indoor and outdoor scenes, 3D positioning is more practical. There are some studies on the displacement of the number of nodes in 2D/3D scenes, which focus on positioning networks [16, 17]; however, to the best of our knowledge, the minimal anchors’ layout is less studied. Considering the power consumption and the system cost, the optimum layout for fewer nodes needs to be discussed.Aiming at high positioning accuracy and favorable stability, this article proposes a new solution based on two-way ranging (TWR) TDOA and a simplified multi-population genetic algorithm (MPGA) to obtain the optimum anchor layout. Effective experiments on indoor and outdoor scenes with specific hardware systems are provided. The followings are the main contributions of this article.(1)
The distance measured by the TWR algorithm is used to calculate the distance difference between the target and the two base stations, then the hyperbolic equation is established by using the distance differences. We proposed a new method for solving TDOA equations that is easy to implement on our platform.(2)
A 3D UWB position model and platform are built to test the proposed algorithm.(3)
An optimum anchor layout is calculated by a simplified 3D MPGA.(4)
Kalman filtering is adopted to solve the instability of the TDOA algorithm in outdoor and indoor scenes.This article is organized as follows. The proposed 3D UWB model and TWR-TDOA algorithm are given in Section 2; Section 3 analyzes the existing error in the model, proposes the simplified MPGA layout algorithm, and adopts the Kalman filter to improve location precision; Section 4 outlines the hardware platform and the experimental measurement scenario settings, including the scenario tests. Section 5 gives the results and discussion. Finally, Section 6 summarizes the article and discusses the future directions.


## 2. System Model and Theoretical Location Method

The 3D UWB model is sketched in Figure1. One tag is measured and four UWB anchors are used to reduce the system complexity and system consumption. The advantage of the system model is that the spatial information of the target can be obtained with fewer anchors [12]. To obtain the target location, firstly, the asymmetric double-sided two-way ranging algorithm is used to calculate the distance difference between the target and the two base stations, which has low requirements for system synchronization. Secondly, according to the measurement distance, the TDOA algorithm is adopted, and a new resolution for hyperbolic equations is proposed to obtain high location accuracy.Figure 1
The 3D mathematical model.


### 2.1. Double-Sided Two-Way Ranging with Three Messages

For the hardware platform, the mainstream UWB device is DW1000, which uses two-way ranging without synchronization. The traditional algorithms can be easily transplanted into this platform. According to the user manual of DW1000, the ADS-TWR algorithm with three messages is used to measure the distance. This algorithm simplifies the DS-TWR from four messages to three messages by using the reply of the first roundtrip measurement as the initiator of the second roundtrip measurement [10], which means lower power consumption. The transmission process between the tag and anchors is schematically shown in Figure 2.Figure 2
ADS-TWR with three messages.As shown in Figure2, the tag is named Device A and the anchor is named Device B. Suppose the flight of time is Tprop. After the sensor receives signals, the delay time is Treply, which is generated by transmission processing and other reasons. The roundtrip communication time between the anchor and tag is totally Tround. The full process of these three messages communication is described as follows: (a) device A sends a packet to device B, and the transmission time is Tprop; (b) device B records the time while receiving this packet; (c) device B answers in response to receiving packet after a fixed delay time Treply; (d) device A records the moment when receiving the message from Device B.It is easy to calculate the roundtrip timeTround:(1)Tround=2Tprop+Treply.Here, the time of flight (TOF) asΔToF is given by(2)ΔToF=Tround1×Tround2−Treply1×Treply2Tround1+Treply1+Tround2+Treply2.In asymmetrical double-sided two-way ranging, it is not necessary that the reply time of the two devices be synchronous, which means reducing the clock requirements of the system. Under the same information transmission, ADS-TWR can save message flow, which means saving battery power and space-time. The clock frequency errors can be controlled at the picosecond level when the quality of the crystal oscillator is not high. The most important error affecting accuracy depends on the following equation: (3)error=ΔToF×1−ka+kb2,where the actual frequency of device A is ka times the expected frequency, and the actual frequency of device B is kb times the expected frequency. ka and kb are close to 1 in the application. The TWR data are exported for positioning processing. Take the 100 m UWB communication range for an example, the TOF is around 300 ns, whereas the error time is about 6 ps, and the corresponding range error is 2 mm.


### 2.2. TDOA Algorithm

According to the system model in Figure1, suppose the coordinate of the target tag is Tx,y,z, the number of UWB anchors is M, where there is one primary sensor S0 and M−1 secondary sensors Si, their coordinates are xi,yi,zi, and i=0,1,…,M−1. Suppose the time of arrival to each station is tii=0,1,2,…,M−1. The time difference between each secondary and primary sensor is written as ΔToFi,i=1,2,…,M−1, which is determined by(4)Δri=cΔToFi.The distance differences can also be directly written as the Euclidean distance from the target to the secondary station minus the distance from the target to the primary station, which is given by(5)Δri=Di−r0,where Di=T−Si2,i=1,2,3andr0=T−S02.Then, we have(6)Δri+r02=Di2.subtracting r02 at both sides, we have(7)Δri2+2Δrir0=Di2−r02,=2xx0−xi+2yy0−yi+2zz0−zi+di2−d02,where di=Si2,i=1,2,3andd0=S02.We obtain the following equation:(8)xx0−xi+yy0−yi+zz0−zi=Δrir0+Δri2+d02−di22.There areM equations in equation (8), and we rewrite it as a matrix form, where x,y,z are unknown and li=di2−d02−Δri2/2.(9)x1−x0y1−y0z1−z0x2−x0y2−y0z2−z0⋮⋮⋮xM−x0yM−y0zM−z0xyz=−Δr1−Δr2⋮−ΔrMr0+l1l2⋮lM.LetAX=B, then(10)A=x1−x0y1−y0z1−z0x2−x0y2−y0z2−z0⋮⋮⋮xM−x0yM−y0zM−z0,B=r0C+D=r0−Δr1−Δr2⋮−ΔrM+l1l2⋮lM.According to the linear properties of linear equations, the solution ofAX=B is the summation of r0 times the solution of AX=C and the solution of AX=D. When M=3, A is a square matrix, according to the Cramer criterion, the solution is xij=Aj/A, where Aj is the determinant obtained by replacing the jth column element in a constant term. The solution is obtained as follows:(11)x=a1r0+b1,y=a2r0+b2,z=a3r0+b3,where ai is the solution of AX=C, and bi is the solution of AX=D.In equation (11), r0 is an unknown parameter. We calculate it from the following method: using the definition of r0, we get a bivariate quadratic equation about r0, as shown in equation (12):(12)Er02+2Fr0+G=0,where(13)E=a12+a22+a32−1,F=a1b1−x0+a2b2−y0+a3b3−z0,G=x0−b12+y0−b22+z0−b32.We can get the roots of this one variable quadratic equation:(14)r0=−F±F2−EGE.According to this root, the TDOA algorithm for the 3D situation has three different position results: ambiguity, precision, and loss. We need to handle these three cases differently.(1)
r0 has two roots (one of which is a false solution). From the two roots, two location positions can be obtained, which means that location ambiguity needs an increased anchor. In this algorithm, we take the real part of the conjugate complex as the root r0=−F/E.(2)
r0 has only one root, and the target position can be uniquely determined.(3)
No solution. This means the target location cannot be determined. For a moving target, we take the position and motion state of the previous time to fill the missing value.


## 2.1. Double-Sided Two-Way Ranging with Three Messages

For the hardware platform, the mainstream UWB device is DW1000, which uses two-way ranging without synchronization. The traditional algorithms can be easily transplanted into this platform. According to the user manual of DW1000, the ADS-TWR algorithm with three messages is used to measure the distance. This algorithm simplifies the DS-TWR from four messages to three messages by using the reply of the first roundtrip measurement as the initiator of the second roundtrip measurement [10], which means lower power consumption. The transmission process between the tag and anchors is schematically shown in Figure 2.Figure 2
ADS-TWR with three messages.As shown in Figure2, the tag is named Device A and the anchor is named Device B. Suppose the flight of time is Tprop. After the sensor receives signals, the delay time is Treply, which is generated by transmission processing and other reasons. The roundtrip communication time between the anchor and tag is totally Tround. The full process of these three messages communication is described as follows: (a) device A sends a packet to device B, and the transmission time is Tprop; (b) device B records the time while receiving this packet; (c) device B answers in response to receiving packet after a fixed delay time Treply; (d) device A records the moment when receiving the message from Device B.It is easy to calculate the roundtrip timeTround:(1)Tround=2Tprop+Treply.Here, the time of flight (TOF) asΔToF is given by(2)ΔToF=Tround1×Tround2−Treply1×Treply2Tround1+Treply1+Tround2+Treply2.In asymmetrical double-sided two-way ranging, it is not necessary that the reply time of the two devices be synchronous, which means reducing the clock requirements of the system. Under the same information transmission, ADS-TWR can save message flow, which means saving battery power and space-time. The clock frequency errors can be controlled at the picosecond level when the quality of the crystal oscillator is not high. The most important error affecting accuracy depends on the following equation: (3)error=ΔToF×1−ka+kb2,where the actual frequency of device A is ka times the expected frequency, and the actual frequency of device B is kb times the expected frequency. ka and kb are close to 1 in the application. The TWR data are exported for positioning processing. Take the 100 m UWB communication range for an example, the TOF is around 300 ns, whereas the error time is about 6 ps, and the corresponding range error is 2 mm.


## 2.2. TDOA Algorithm

According to the system model in Figure1, suppose the coordinate of the target tag is Tx,y,z, the number of UWB anchors is M, where there is one primary sensor S0 and M−1 secondary sensors Si, their coordinates are xi,yi,zi, and i=0,1,…,M−1. Suppose the time of arrival to each station is tii=0,1,2,…,M−1. The time difference between each secondary and primary sensor is written as ΔToFi,i=1,2,…,M−1, which is determined by(4)Δri=cΔToFi.The distance differences can also be directly written as the Euclidean distance from the target to the secondary station minus the distance from the target to the primary station, which is given by(5)Δri=Di−r0,where Di=T−Si2,i=1,2,3andr0=T−S02.Then, we have(6)Δri+r02=Di2.subtracting r02 at both sides, we have(7)Δri2+2Δrir0=Di2−r02,=2xx0−xi+2yy0−yi+2zz0−zi+di2−d02,where di=Si2,i=1,2,3andd0=S02.We obtain the following equation:(8)xx0−xi+yy0−yi+zz0−zi=Δrir0+Δri2+d02−di22.There areM equations in equation (8), and we rewrite it as a matrix form, where x,y,z are unknown and li=di2−d02−Δri2/2.(9)x1−x0y1−y0z1−z0x2−x0y2−y0z2−z0⋮⋮⋮xM−x0yM−y0zM−z0xyz=−Δr1−Δr2⋮−ΔrMr0+l1l2⋮lM.LetAX=B, then(10)A=x1−x0y1−y0z1−z0x2−x0y2−y0z2−z0⋮⋮⋮xM−x0yM−y0zM−z0,B=r0C+D=r0−Δr1−Δr2⋮−ΔrM+l1l2⋮lM.According to the linear properties of linear equations, the solution ofAX=B is the summation of r0 times the solution of AX=C and the solution of AX=D. When M=3, A is a square matrix, according to the Cramer criterion, the solution is xij=Aj/A, where Aj is the determinant obtained by replacing the jth column element in a constant term. The solution is obtained as follows:(11)x=a1r0+b1,y=a2r0+b2,z=a3r0+b3,where ai is the solution of AX=C, and bi is the solution of AX=D.In equation (11), r0 is an unknown parameter. We calculate it from the following method: using the definition of r0, we get a bivariate quadratic equation about r0, as shown in equation (12):(12)Er02+2Fr0+G=0,where(13)E=a12+a22+a32−1,F=a1b1−x0+a2b2−y0+a3b3−z0,G=x0−b12+y0−b22+z0−b32.We can get the roots of this one variable quadratic equation:(14)r0=−F±F2−EGE.According to this root, the TDOA algorithm for the 3D situation has three different position results: ambiguity, precision, and loss. We need to handle these three cases differently.(1)
r0 has two roots (one of which is a false solution). From the two roots, two location positions can be obtained, which means that location ambiguity needs an increased anchor. In this algorithm, we take the real part of the conjugate complex as the root r0=−F/E.(2)
r0 has only one root, and the target position can be uniquely determined.(3)
No solution. This means the target location cannot be determined. For a moving target, we take the position and motion state of the previous time to fill the missing value.


## 3. Deviation Error Analysis and Improved Algorithms

The core of the TDOA algorithm is associated with the difference between the primary anchor and the secondary anchor. First, the derivation of the difference is expressed as(16)dr=Hdu+ds,where dr=dΔr1dΔr2⋯dΔr4T,H=x−x1/ri−x−x0/r0y−y1/ri−y−y0/r0z−z1/ri−z−z0/r0x−x2/ri−x−x0/r0y−y2/ri−y−y0/r0z−z2/ri−z−z0/r0⋮⋮⋮x−xM/ri−x−x0/r0y−yM/ri−y−y0/r0z−zM/ri−z−z0/r0, du=dxdydzTds=k1−k0k2−k0⋯kM−k0T,ki=x−xi/ridxi+y−yi/ridyi+z−zi/ridzi,i=1,2,…,M.Making use of equation (16), one can get a tag position error vector:(17)du=H−1dr−ds.Based on this equation, the accuracy of the tag position is correlative with the sensor distribution and the measurement error. In the following part, the accuracy of the TDOA algorithm will be improved in both aspects.


### 3.1. Optimized Distribution Based on a Simplified MPGA

The different sensor placement strategies influence the geometric dilution of precision (GDOP) of the target positioning. The GDOP can be expressed as [18](18)GDOP=traceP,where P=HTH−1HTMHHTH−1, M=σr12+σs2σs2σs2σr22+σs2⋯σs2⋯σs2⋮⋮σs2σs2⋮⋮⋯σrM2+σs2. The variance of the location error is σs2, and the variance of the measurement error is σri2i=1,2,…,M.When the GDOP of the located target is the smallest, the distribution can reach the best condition. This article adopts the MPGA to find the best anchor layout whose GDOP of the space is nearly optimal.In this part,AVERGDOP is treated as the average GDOP of one plane whose height is h.(19)AVERGDOPh=1N×K∑i=0N∑j=0KGDOPxi,yj,h,i=1,2,…,N,j=1,2,…,K.The genetic algorithm searches for the best result by producing subsequent generations from a random population with genetic operators. Compared with the genetic algorithm, MPGA uses more populations to produce individual fitness as a multi-population crossover [19]. Whole space-wide searching brings a huge amount of computation, whereas one horizontal plane searching can greatly reduce computing and has similar precision. Data statistics via MATLAB simulation show that the amount of simplified calculation is reduced by 70% compared with the traditional search algorithms. In this part, this simplified MPGA method is adopted to calculate the optimal layout.The detailed process of this simplified MPGA for optimized distribution is shown in Algorithm 1, whereX2×12 represents the range matrix of the given space, h is the height of the measured plane, MAXGEN limits maximum iteration times, and N has the information on the population size. In addition, the probability rate of the crossover is Pc and the probability rate of the mutation is Pm.Algorithm 1: The distribution of anchors is optimized via simplified MPGA.
Input:X2×12 (the range matrix of the given space), h (the height of the measured plane), MAXGEN (maximum iteration times), N (the population size), Pc (the crossover rate), Pm (the mutation probability)Output:Ax (the anchor coordinates)(1)
generation=0;(2)
Initialize the populations and generate plenty of random coordinatesAx in each population according to X2×12;(3)
Evaluate the fitness values via equation (19) and all chromosomes are ranked according to the fitness values;(4)
whilegeneration<MAXGEN(5)
fori←1 to N(6)
Calculate the fitness of individuals inpopulationi according to X2×12;(7)
Select the better chromosomes as parents that have the more fitness values;(8)
Cross the chosen parents to produce new offspring at a probability ofPc;(9)
Mutate the new offspring at a probability ofPm;(10)
Calculate the fitness of the individual in the offspring;(11)
Reinserts offspring in thepopulationi;(12)
end(13)
fori←1 to N(14)
ifi=N(15)
Replace the worst chromosome inpopulation1 with the best one in populationN;(16)
else(17)
Replace the worst chromosome inpopulationi+1 with the best one in populationi;(18)
end(19)
end(20)
Select the best individual in each population as the elite population;(21)
Select all the converted chromosomes to find the minimum value and to reassemble the chromosomes;(22)
If the new minimum value is less than the old one(23)
generation=generation+1;(24)
Save the new minimum value and updateAx according to the new chromosomes;(25)
end(26)
endAt the beginning of each experiment, the algorithm can be used to ensure the minimum value of the average GDOP in the measured range. In this MPGA algorithm, the population sizeN is set as 10 and the maximum iteration time MAXGEN is set as 5. The crossover rate Pc is one value between 0.7 and 0.9. The mutation probability is a random value between 0.001 and 0.05. Considering the convenience of placement and calculation, the anchors are set on either side of the scene and one anchor is fixed in the condition of the algorithm.The following experiment is designed to test the efficiency of the optimized distribution based on simplified MPGA. Leth=80,Genmax=10 and X2×12=000047000470004700000495470370495470370495470370. Table 1 gives the GDOP of random positions at the height of 80 cm and compares the results with simplified MPGA and unoptimized distribution separately.Table 1
GDOP value for different anchors.
Point (cm)GDOPOptimized distributionUnoptimized distribution(100, 100, 80)1.69872.7863(50, 60, 110)1.84523.0972(300, 360, 10)1.6425155.2138Here we can see that, if anchors are set at the positions located by the MPGA, the GDOP can be reduced largely. This means the optimized distribution can decrease the deviation of measured data. Thus, this proposed MPGA can effectively decrease the sensor distribution error caused by the system.


### 3.2. Kalman Filter

The TDOA is unstable in the positioning process, resulting in a measurement error. To resolve this problem, we use the Kalman filter to improve the stability and precision of positioning. Kalman filtering can achieve the best tracking performance when dealing with a target that has a measurement equation and motion equation that are linear and a process noise that obeys Gaussian distribution [20]. When there is no solution in the TDOA algorithm, for the target position and motion state at the previous time, the constant velocity (CV) model is used to fill in the missing position. The CV model is given as(20)Xk+1=FkXk+Wk,(21)Zk+1=Hk+1Xk+1+Vk+1.The state equation is given by equation (20): X(k) is the state vector, which is an N-dimensional column vector. Here, N = 9; F(k) is called the state transition matrix, W(k) is the process noise, and its covariance matrix is Q(k), which is an N × N matrix in this system. Equation (21) is the measurement equation: Z(k) is called the measurement vector and is the M-dimensional column vector (M = 3). H(k) is the measurement matrix and V(k) is the measurement noise. The idea of the filling method is to estimate the missing position by using the state transition matrix and measurement matrix, i.e., the last measured value correction process is removed while using the Kalman filter.The initial test state of the system can be obtained by using the two-point difference method for initialization:(22)X^1|1=x^1|1x˙^1|1=Z1Z1−Z0T.The covariance matrix of the initial test state error is as follows:(23)p1|1=rrTrT2rT2.After initialization, the Kalman filter can start working from the timek=2. The standard deviation of the measured range data is calculated by(24)σ^m=1N∑k=1Nrtk−Xtk2.The data is collected from the four base stations, and the moving model is the CV. The TDOA data are further processed by the Kalman filter. Figure3 shows the estimations of the position of Chan-EKF [12], TWR-TDOA, and TWR-TDOA-KF algorithm when the tag moves with a speed of 0.2 m/s under the 3D coordinates. The algorithm and simulation environment are implemented with MATLAB. The simulator implements the process of positioning in the condition of one tag and four anchors. The tag moves on the straight line ((0,0,0) m to (4,4,4) m). Four anchors adopt the proposed MPGA optimal layout. The test records measurement results 20 times.Figure 3
Experimental position estimation of three algorithms under 3D coordinates when tag moving on a straight line.The root means square error (RMSE) is employed in Figure4 to measure the accuracy of position in different conditions of noise standard deviation. The RMSE can be calculated by the following equation:(25)RMSE=Exk−x2+yk−y2+zk−z2,where x,y,z represents the actual position of the tag and xk,yk,zk represents the estimated location of the tag.Figure 4
RMSE of localization by Chan-EKF, TWR-TDOA, TWR-TDOA-KF, Optimized TWR-TDOA, and Optimized TWR-TDOA-KF, whenδ = 4 cm, δ = 6 cm, and δ = 8 cm.It can be concluded that the TWR-TDOA-KF algorithm has better performance than the TWR-TDOA algorithm and the Chan-EKF. In addition, the optimized algorithms have better performance than the unoptimized algorithms. More accurately, for three different noise standard deviations, the average RMSE of the optimized TWR-TDOA-KF algorithm is lower than the Chan-EKF by 1.67 cm, lower than the TWR-TDOA-EKF by 1.03 cm. And the average RMSE of the TWR-TDOA-KF is lower than TWR-TDOA by 1.51 cm.


## 3.1. Optimized Distribution Based on a Simplified MPGA

The different sensor placement strategies influence the geometric dilution of precision (GDOP) of the target positioning. The GDOP can be expressed as [18](18)GDOP=traceP,where P=HTH−1HTMHHTH−1, M=σr12+σs2σs2σs2σr22+σs2⋯σs2⋯σs2⋮⋮σs2σs2⋮⋮⋯σrM2+σs2. The variance of the location error is σs2, and the variance of the measurement error is σri2i=1,2,…,M.When the GDOP of the located target is the smallest, the distribution can reach the best condition. This article adopts the MPGA to find the best anchor layout whose GDOP of the space is nearly optimal.In this part,AVERGDOP is treated as the average GDOP of one plane whose height is h.(19)AVERGDOPh=1N×K∑i=0N∑j=0KGDOPxi,yj,h,i=1,2,…,N,j=1,2,…,K.The genetic algorithm searches for the best result by producing subsequent generations from a random population with genetic operators. Compared with the genetic algorithm, MPGA uses more populations to produce individual fitness as a multi-population crossover [19]. Whole space-wide searching brings a huge amount of computation, whereas one horizontal plane searching can greatly reduce computing and has similar precision. Data statistics via MATLAB simulation show that the amount of simplified calculation is reduced by 70% compared with the traditional search algorithms. In this part, this simplified MPGA method is adopted to calculate the optimal layout.The detailed process of this simplified MPGA for optimized distribution is shown in Algorithm 1, whereX2×12 represents the range matrix of the given space, h is the height of the measured plane, MAXGEN limits maximum iteration times, and N has the information on the population size. In addition, the probability rate of the crossover is Pc and the probability rate of the mutation is Pm.Algorithm 1: The distribution of anchors is optimized via simplified MPGA.
Input:X2×12 (the range matrix of the given space), h (the height of the measured plane), MAXGEN (maximum iteration times), N (the population size), Pc (the crossover rate), Pm (the mutation probability)Output:Ax (the anchor coordinates)(1)
generation=0;(2)
Initialize the populations and generate plenty of random coordinatesAx in each population according to X2×12;(3)
Evaluate the fitness values via equation (19) and all chromosomes are ranked according to the fitness values;(4)
whilegeneration<MAXGEN(5)
fori←1 to N(6)
Calculate the fitness of individuals inpopulationi according to X2×12;(7)
Select the better chromosomes as parents that have the more fitness values;(8)
Cross the chosen parents to produce new offspring at a probability ofPc;(9)
Mutate the new offspring at a probability ofPm;(10)
Calculate the fitness of the individual in the offspring;(11)
Reinserts offspring in thepopulationi;(12)
end(13)
fori←1 to N(14)
ifi=N(15)
Replace the worst chromosome inpopulation1 with the best one in populationN;(16)
else(17)
Replace the worst chromosome inpopulationi+1 with the best one in populationi;(18)
end(19)
end(20)
Select the best individual in each population as the elite population;(21)
Select all the converted chromosomes to find the minimum value and to reassemble the chromosomes;(22)
If the new minimum value is less than the old one(23)
generation=generation+1;(24)
Save the new minimum value and updateAx according to the new chromosomes;(25)
end(26)
endAt the beginning of each experiment, the algorithm can be used to ensure the minimum value of the average GDOP in the measured range. In this MPGA algorithm, the population sizeN is set as 10 and the maximum iteration time MAXGEN is set as 5. The crossover rate Pc is one value between 0.7 and 0.9. The mutation probability is a random value between 0.001 and 0.05. Considering the convenience of placement and calculation, the anchors are set on either side of the scene and one anchor is fixed in the condition of the algorithm.The following experiment is designed to test the efficiency of the optimized distribution based on simplified MPGA. Leth=80,Genmax=10 and X2×12=000047000470004700000495470370495470370495470370. Table 1 gives the GDOP of random positions at the height of 80 cm and compares the results with simplified MPGA and unoptimized distribution separately.Table 1
GDOP value for different anchors.
Point (cm)GDOPOptimized distributionUnoptimized distribution(100, 100, 80)1.69872.7863(50, 60, 110)1.84523.0972(300, 360, 10)1.6425155.2138Here we can see that, if anchors are set at the positions located by the MPGA, the GDOP can be reduced largely. This means the optimized distribution can decrease the deviation of measured data. Thus, this proposed MPGA can effectively decrease the sensor distribution error caused by the system.


## 3.2. Kalman Filter

The TDOA is unstable in the positioning process, resulting in a measurement error. To resolve this problem, we use the Kalman filter to improve the stability and precision of positioning. Kalman filtering can achieve the best tracking performance when dealing with a target that has a measurement equation and motion equation that are linear and a process noise that obeys Gaussian distribution [20]. When there is no solution in the TDOA algorithm, for the target position and motion state at the previous time, the constant velocity (CV) model is used to fill in the missing position. The CV model is given as(20)Xk+1=FkXk+Wk,(21)Zk+1=Hk+1Xk+1+Vk+1.The state equation is given by equation (20): X(k) is the state vector, which is an N-dimensional column vector. Here, N = 9; F(k) is called the state transition matrix, W(k) is the process noise, and its covariance matrix is Q(k), which is an N × N matrix in this system. Equation (21) is the measurement equation: Z(k) is called the measurement vector and is the M-dimensional column vector (M = 3). H(k) is the measurement matrix and V(k) is the measurement noise. The idea of the filling method is to estimate the missing position by using the state transition matrix and measurement matrix, i.e., the last measured value correction process is removed while using the Kalman filter.The initial test state of the system can be obtained by using the two-point difference method for initialization:(22)X^1|1=x^1|1x˙^1|1=Z1Z1−Z0T.The covariance matrix of the initial test state error is as follows:(23)p1|1=rrTrT2rT2.After initialization, the Kalman filter can start working from the timek=2. The standard deviation of the measured range data is calculated by(24)σ^m=1N∑k=1Nrtk−Xtk2.The data is collected from the four base stations, and the moving model is the CV. The TDOA data are further processed by the Kalman filter. Figure3 shows the estimations of the position of Chan-EKF [12], TWR-TDOA, and TWR-TDOA-KF algorithm when the tag moves with a speed of 0.2 m/s under the 3D coordinates. The algorithm and simulation environment are implemented with MATLAB. The simulator implements the process of positioning in the condition of one tag and four anchors. The tag moves on the straight line ((0,0,0) m to (4,4,4) m). Four anchors adopt the proposed MPGA optimal layout. The test records measurement results 20 times.Figure 3
Experimental position estimation of three algorithms under 3D coordinates when tag moving on a straight line.The root means square error (RMSE) is employed in Figure4 to measure the accuracy of position in different conditions of noise standard deviation. The RMSE can be calculated by the following equation:(25)RMSE=Exk−x2+yk−y2+zk−z2,where x,y,z represents the actual position of the tag and xk,yk,zk represents the estimated location of the tag.Figure 4
RMSE of localization by Chan-EKF, TWR-TDOA, TWR-TDOA-KF, Optimized TWR-TDOA, and Optimized TWR-TDOA-KF, whenδ = 4 cm, δ = 6 cm, and δ = 8 cm.It can be concluded that the TWR-TDOA-KF algorithm has better performance than the TWR-TDOA algorithm and the Chan-EKF. In addition, the optimized algorithms have better performance than the unoptimized algorithms. More accurately, for three different noise standard deviations, the average RMSE of the optimized TWR-TDOA-KF algorithm is lower than the Chan-EKF by 1.67 cm, lower than the TWR-TDOA-EKF by 1.03 cm. And the average RMSE of the TWR-TDOA-KF is lower than TWR-TDOA by 1.51 cm.


## 4. Hardware Platform and Measurement Scenario

The system measurement model is shown in Figure5. The hardware part is composed of a single-chip microcomputer and a UWB communication module. In our system, only the primary anchor is connected to the upper PC through a USB data cable, and the secondary anchors are wireless communication. ADS-TWR ranging and wireless data transmission are applied between the tag and the anchors through the UWB communication module. After measuring the distance, the secondary anchors transmit the data to the anchor, and then the primary anchor transmits the data to the upper computer through a USB to calculate the target position. Here, we use the optimum anchors’ distribution based on the proposed simplified MPGA algorithm. For the internal hardware module structure of the tag and anchors, we adopt the DWM1000 system. Time error is on the nanosecond level and the typical update rate is 3.5 Hz. This system has a feature of low cost, high ranging accuracy, high positioning accuracy, and fast ranging speed, and the serial port of hardware is very robust. Compared with the traditional ranging mode, the power consumption is much lower [21].Figure 5
The system measurement model.


### 4.1. An Outdoor Scenario

The layout of our outdoor experiment scenario is shown in Figure6(a), and it is implemented in cropland. Anchor 1 is connected to the PC as the primary device, and anchors 2, 3, and 4 are secondary devices. In this experiment, h=80, Genmax=10, and X2×12=000047000470004700000495470370495470370495470370. After calculating by the simplified MPGA, anchor 1 is set as (0,0,0), and the other anchors are set as (0,470,370), (490, 0,370), and (495,470,0), respectively.Figure 6
The outdoor scene and test results. (a) Outdoor cropland experiment scene. (b) Comparison of location and tracking results with the real trajectory.
(a)(b)In this section, the experimenter debugs the positioning system from the midpoint between anchor 3 and anchor 4 to the midpoint of anchor 1 and anchor 2 by holding the tag at a constant velocity of 0.8 m/s. We use the Link PG system to get the mobile data and then process these data by our proposed method. The results are shown in Figure6(b). The true trajectory of the target’s motion is illustrated with the blue line at the top. The positioning result is depicted with the red dots. The result processed with the Kalman filter is plotted with a yellow line, which is the final location trajectory. It shows that the Kalman filter put the scattered anchor point trace into a smooth tracking curve, and the anchor point trace deviating from the real trajectory is corrected to a certain extent.


### 4.2. Indoor Scenario

The GPS signals cannot penetrate buildings and are not able to work indoors. In this part, we designed an indoor position experiment. The setup is shown in Figure7(a), which is a room with a length of 640 cm, a width of 430 cm, and a height of 374 cm. The moving target tracks the blue rectangular on the desk, which has a height of 80 cm. Anchor 1 is the primary sensor and the others are the secondary sensors.Figure 7
Indoor testing environment and results. (a) Indoor moving target positioning scene. (b) Comparison of location and tracking results with real trajectory.
(a)(b)In the experiment,h=80, Genmax=10, and X2×12=000040000400004000000500400370500400370500400370. After running the MPGA, anchor 1 is set as (0,0,0) and the other anchors are set as (500, 0,370), (500,400,0), (0,400,370), respectively. In this indoor experiment, by using the proposed algorithm, the 3D comparison between the positioning results and the real trajectory is shown in Figure 7(b). It should be mentioned that the electromagnetic interference from GPS and WiFi may affect the measurement accuracy.


## 4.1. An Outdoor Scenario

The layout of our outdoor experiment scenario is shown in Figure6(a), and it is implemented in cropland. Anchor 1 is connected to the PC as the primary device, and anchors 2, 3, and 4 are secondary devices. In this experiment, h=80, Genmax=10, and X2×12=000047000470004700000495470370495470370495470370. After calculating by the simplified MPGA, anchor 1 is set as (0,0,0), and the other anchors are set as (0,470,370), (490, 0,370), and (495,470,0), respectively.Figure 6
The outdoor scene and test results. (a) Outdoor cropland experiment scene. (b) Comparison of location and tracking results with the real trajectory.
(a)(b)In this section, the experimenter debugs the positioning system from the midpoint between anchor 3 and anchor 4 to the midpoint of anchor 1 and anchor 2 by holding the tag at a constant velocity of 0.8 m/s. We use the Link PG system to get the mobile data and then process these data by our proposed method. The results are shown in Figure6(b). The true trajectory of the target’s motion is illustrated with the blue line at the top. The positioning result is depicted with the red dots. The result processed with the Kalman filter is plotted with a yellow line, which is the final location trajectory. It shows that the Kalman filter put the scattered anchor point trace into a smooth tracking curve, and the anchor point trace deviating from the real trajectory is corrected to a certain extent.


## 4.2. Indoor Scenario

The GPS signals cannot penetrate buildings and are not able to work indoors. In this part, we designed an indoor position experiment. The setup is shown in Figure7(a), which is a room with a length of 640 cm, a width of 430 cm, and a height of 374 cm. The moving target tracks the blue rectangular on the desk, which has a height of 80 cm. Anchor 1 is the primary sensor and the others are the secondary sensors.Figure 7
Indoor testing environment and results. (a) Indoor moving target positioning scene. (b) Comparison of location and tracking results with real trajectory.
(a)(b)In the experiment,h=80, Genmax=10, and X2×12=000040000400004000000500400370500400370500400370. After running the MPGA, anchor 1 is set as (0,0,0) and the other anchors are set as (500, 0,370), (500,400,0), (0,400,370), respectively. In this indoor experiment, by using the proposed algorithm, the 3D comparison between the positioning results and the real trajectory is shown in Figure 7(b). It should be mentioned that the electromagnetic interference from GPS and WiFi may affect the measurement accuracy.


## 5. Results and Analysis

For indoor and outdoor environments, effective measurement experiments are carried out. The RMSE between the actual position and the estimated location is evaluated. The RMSE of the outdoor scene is shown in Figure8(a), and the error result for the indoor scene is calculated, as shown in Figure 8(b).Figure 8
The RMSE curves for the outdoor and indoor systems. (a) The system positions RMSE for the outdoor scene. (b) Position measurement RMSE for the indoor scene.
(a)(b)The average RMSE of the position error for the outdoor environment is 9.8 cm, and the average position error is about 11.21 cm for the indoor scene. The indoor error is larger than that in the outdoor environment, which may be caused by adjacent frequency electromagnetic interferences. Combining the outdoor and indoor scenarios, the whole-system RMSE error for 3D moving targets is around 10 cm.Comparison based on localization accuracy and the implemented localization approach between the proposed technique and other reported algorithms is listed in Table2. The technique proposed in this article has the best accuracy performance when the new TWR-TDOA solution and layout optimization are applied, and the advantage is that it can be adapted to different environments.Table 2
Comparisons among different UWB position systems.
SystemAlgorithmAccuracy (cm)Ubisense [22]AOA, TDOA15–20Zebra [23]TDOA30Sewio [24]TDOA30–50Asynchronous [25]TDOA15.2Sync-free [26]TDOA20.4This articleTWR-TDOA-KF10


## 6. Conclusion and Discussion

The system presented in this article successfully demonstrated the target positioning and tracking process for a moving target in 3D UWB indoor and outdoor scenes. The idea of the system is to use ranging to realize positioning. After obtaining the distance between the target and the base station, the proposed TDOA algorithm is used for the positioning solution. We also discuss which factors affect the theory’s accuracy. An optimum layout with low complexity based on the 3D MPGA is used to reduce the error in positioning accuracy. Single horizontal plane searching can greatly reduce computing and has similar precision to whole space searching. The hardware of the proposed system uses a UWB communication to realize the data transmission between the measured target and the base station and then realizes the distance measurement. This is an important step to getting the original data. Indoor and outdoor experiments are provided. If only the new TWR-TDOA solution is adopted, it has poor stability. Kalman filter algorithm is used to solve the problems related to fuzzy and missing subjects of TDOA positioning in the indoor and outdoor experiments, which has better location results. Our proposed system has better precision than mainstream algorithms. Due to the limited experimental conditions, the error test of the system is not very accurate. If the stepping motor is used to simulate and analyze the moving target in actual scenes, the system error can be further reduced. In this design, the Kalman filter is selected to filter the TDOA positioning results when tracking the target. In fact, this method has the problem of filter divergence, that is, when the target motion state does not meet the filter setting, the Kalman filter results will deviate and accumulate gradually. This problem can be improved by some specific algorithms for tracking maneuvering targets, such as the Singer algorithm, Interactive Multi-Model algorithm, and so on.



---

*Source: 1194169-2022-07-31.xml*