Next Article in Journal
Strain Decay Monitoring and Analytical Prediction of RC Columns Using Brillouin Optical Technology and Time-Dependent Deterioration Factor
Previous Article in Journal
Visual Localization Domain for Accurate V-SLAM from Stereo Cameras
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Double Extended Kalman Filter Algorithm for Weakening Non-Line-of-Sight Errors in Complex Indoor Environments Based on Ultra-Wideband Technology

1
School of Instrument Science and Engineering, Southeast University, Nanjing 210096, China
2
Advanced SoC and IoT Technology Laboratory (ASITLAB), Shanghai University, Shanghai 200444, China
3
Key Laboratory of Specialty Fiber Optics and Optical Access Networks, Shanghai University, Shanghai 200444, China
*
Author to whom correspondence should be addressed.
Sensors 2025, 25(3), 740; https://doi.org/10.3390/s25030740
Submission received: 3 December 2024 / Revised: 8 January 2025 / Accepted: 13 January 2025 / Published: 26 January 2025
(This article belongs to the Section Navigation and Positioning)

Abstract

:
In complex indoor environments, target tracking performance is impacted by non-line-of sight (NLOS) noises and other measurement errors. In order to fix NLOS errors, a double extended Kalman filter (DEKF) algorithm is proposed, which refers to a kind of cascaded structure composed of two Kalman filters. In the proposed algorithm, the first filter is a classic Kalman filter (KF) and the second is an extended Kalman filter (EKF). Time of arrival (TOA) measurements collected by multiple stationary ultra-wideband (UWB) sensors are used. The residual errors between the measured TOA and that of the first KF are predicted, and the covariance of the first KF is adjusted correspondingly. Then, we use the estimated distance state of the first KF as a measurement vector for the second EKF in order to obtain a smoother observation. One of the advantages of the proposed algorithm is that it is able to perform target tracking with good accuracy even without or with only one LOS TOA measurement for a period of time without prior information about the NLOS noise, which may be difficult to obtain in practical applications. Another advantage is that the accuracy does not greatly decrease when NLOS noises exist for a long period of time. Finally, the proposed DEKF can maintain the high-precision positioning characteristics in both the constant velocity (CV) model and the constant acceleration (CA) model in the LOS/NLOS environment. Our simulation and experimental results show that the proposed algorithm performs much better than other algorithms in SOTA, particularly in severe mixed LOS/NLOS environments.

1. Introduction

With the development of wireless communication technology, the demand for location-based services (LBSs) is rapidly increasing [1,2,3,4,5]. Currently, there are several technologies for indoor positioning, such as Bluetooth Low Energy (BLE) [6,7,8], WiFi [9,10,11], Radio Frequency Identification (RFID) [12,13,14], and Impulse Radio–Ultra Wideband (IR-UWB) [15,16,17,18]; IR-UWB is superior to the others with its centimeter positioning accuracy in complex indoor environments.
The UWB signals are impacted by multipath effects, which may lead to great measurement errors, especially in NLOS environments. The algorithm proposed in [19] keeps the LOS pseudo-measurement results, discarding the NLOS ones, and calculates the average of all the selected LOS measurements. The limitation of this tracking algorithm is that, when there is no LOS BaseStation within a period of time, the estimation of states can only rely on predictions. The Kalman filter and its enhancements, such as EKF, cubature Kalman filter (CKF), unscented Kalman filter (UKF), adaptive Kalman filter (AKF), or particle filter (PF), are used [20,21,22,23,24,25,26,27] to reduce NLOS noise-introduced errors in complex indoor environments [28,29]. To reduce measurement errors, forms of extended KF (EKF) with robust estimation, such as M-estimation and fuzzy-tuning M-estimation EKF, were proposed in [30]. However, the above filtering technologies are still limited by their accuracy, especially in complex LOS and NLOS mixture conditions. A time-of-flight (ToF)-based NLOS indoor tracking method incorporating adaptive ranging error mitigation techniques is presented in [31]. However, due to its high computational complexity, it is difficult to appropriately apply this method to scenarios with high real-time requirements. The classification of LOS and NLOS conditions using deep learning (DL) models was mentioned in [32]. However, the study does not discuss the performance of the model in complex indoor environments in detail. Deep-learning-based NLOS/LOS classification methods for indoor positioning systems were also mentioned in [33]. However, the training of deep learning models requires a large amount of data support, and it may be a challenge to obtain enough labeled data in some indoor environments.
In order to further improve target tracking performance in complex LOS and NLOS mixture conditions, a double Kalman filter with a residual classification and covariance adjustment (RCCA) algorithm is proposed to mitigate NLOS-introduced errors. In this algorithm, two Kalman filters are cascaded, where the first filter is a KF and the second is an EKF. The RCCA process is applied on the KF system, whose states are distances and velocities. Residual classification means that the residuals between the first KF’s observed measurements and its system predictions are calculated, and then, the covariance of the first KF system is adjusted for the Kalman gain according to the error ranges. After that, the distance vectors are used as measurements of the second EKF, and the estimated variance of the first KF is input as the measurement covariance. This completes the RCCA process.
The remainder of this article is organized as follows. In Section 2, we introduce the system framework of this methodology. In Section 3, we discuss the residual classification and variance adjustment process. Section 4 presents the details of the DEKF algorithm. In Section 5, the simulation results are shown and experimental verification is carried out. Finally, Section 6 presents the conclusions.

2. System Model

2.1. Extended Kalman Filter Modeling

A system containing one target and M stationary UWB anchors is considered in this section. For generality, the constant acceleration (CA) model is used, so the state of target can be defined as follows:
X k = [ x k , y k , z k , x ˙ k , y ˙ k , z ˙ k , x ¨ k , y ¨ k , z ¨ k ] T ,
where [ x k , y k , z k ] T is the coordinate of the target, [ x ˙ k , y ˙ k , z ˙ k ] T is the velocity of the target, [ x ¨ k , y ¨ k , z ¨ k ] T is the acceleration of the target, and k stands for the present moment. The stationary UWB anchors are located at X i U = [ x i U , y i U , z i U ] T , i = 1 , , M . In order to simplify the analysis, a constant velocity (CV) model is used for formula derivation, which is essentially equivalent to the CA model with acceleration equal to zero. Thus, the state of the target is defined as follows:
X k = [ x k , y k , z k , x ˙ k , y ˙ k , z ˙ k ] T ,
The measured distances between the target and the anchors are calculated using the received time of flight (TOF), which is expressed as Z k = c · TOF k , c = 3 × 10 8 (m/s). The state evolution model of the EKF system is as follows:
X k = A X k 1 + w k ,
Z k = h ( X k ) + v k ,
where A is the transition matrix of the states in the CV model:
A = 1 0 0 T s 0 0 0 1 0 0 T s 0 0 0 1 0 0 T s 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 ,
where T s is the observation time of the system and h ( X k ) = [ h 1 ( X k ) , , h M ( X k ) ] T is a non-linear transfer function of state and measurement, where h i ( X k ) = ( x k x i U ) 2 + ( y k y i U ) 2 + ( z k z i U ) 2 . The essence of EKF is to transform the non-linear case into a locally linear case. For non-linear functions, the properties of derivatives can be exploited for local linearization by a Jacobian matrix. The Jacobian can be obtained by taking the partial derivative with respect to each dimension of h i ( X k ) . It is shown below:
H k = x k x 1 U h 1 ( X k ) y k y 1 U h 1 ( X k ) z k z 1 U h 1 ( X k ) 0 0 0 x k x M U h M ( X k ) y k y M U h M ( X k ) z k z M U h M ( X k ) 0 0 0
The non-linear function h i ( X k ) does not contain [ x ˙ k , y ˙ k , z ˙ k ] T , and thus, the right-hand side of the matrix is an M × 3 zero matrix.
In (3), w k is a process noise vector with a covariance matrix Q k x . In (4), v k is a measurement noise vector with a covariance matrix R k x , which is determined by the measurement accuracy of the anchors. As for the value of Q x , which is mentioned in [34], it takes different values in different models. In the CV model, it is defined as follows according to [34]:
Q x = Φ s 1 T s 3 3 I 3 T s 2 2 I 3 T s 2 2 I 3 T s I 3 .
where Φ s 1 is the spectrum density of the process noise for the KF system and I 3 is a 3 × 3 unit matrix.
The iterative computation process for the EKF system is as follows [20,35,36]:
X ^ k | k 1 = A X ^ k 1 ,
P ^ k | k 1 x = A P ^ k 1 x A T + Q k x ,
K k x = P ^ k | k 1 x H k T ( H k P ^ k | k 1 x H k T + R k x ) 1 ,
X ^ k = X ^ k | k 1 + K k x ( Z k h ( X ^ k | k 1 ) ) ,
P ^ k x = ( I K k x H k ) P ^ k | k 1 x .
Equations (8) and (9) are update equations from the k 1 state to the k state, and (10), (11), and (12) are measurement update equations. P ^ k 1 x is the error covariance matrix of X ^ k 1 , A is the state transition matrix, Q k x is the process noise covariance matrix, R k x is the measurement noise covariance matrix, H k is the measurement transition matrix, Z k is the measurement matrix, and the weighting matrix K k x is generally referred to as the Kalman gain matrix.

2.2. Measurement Error Modeling

Generally, measurement errors are made of measurement noise and NLOS noise, where measurement noise is modeled by Gaussian white noise determined by measured anchors. NLOS noise is caused by reflected, refracted, or multipath transmission signals. The measurement error modeling is as follows:
ρ k , i = ρ ˙ k , i + n k , i + w k , i , i = 1 , , M .
where ρ k , i is the measured distance between the target and anchor i, ρ ˙ k , i is the real distance, n k , i is the measurement noise, and w k , i is the NLOS noise. The NLOS noise is usually modeled with a uniform distribution, mean-shifted Gaussian distribution, or exponential distribution [19,30,36]. In the modeling, we assume a uniformly distributed NLOS noise in the following constraints for simplicity, although there are other methods for describing the NLOS noise, such as the Markov process. For a mixed LOS/NLOS environment, the probability density function of η i is defined as:
p ( η i ) = ( 1 ε i ) p LOS ( n i ) + ε i p NLOS ( w i ) ,
where η i = n i + w i is defined as in (13), ε i is the proportion of NLOS errors at anchor i, p LOS ( n i ) is zero mean Gaussian distributed, and p NLOS ( w i ) is mean-shifted Gaussian distributed. The mixed LOS/NLOS model is implemented using a two-state Markov process, which is the same as that mentioned in [19,36,37,38]. The state transition is shown in Figure 1.
The transition probability matrix of the Markov process is:
1 α α β 1 β ,
where α is the probability of transition from state LOS to NLOS and β is the probability of transition from state NLOS to LOS. ε i is related to α and β by:
ε i = α α + β .
The proportion of LOS and NLOS noise can be adjusted by the values of α and β , and there are several sets of values that satisfy one ε i . Table 1 shows one possible combination.

3. Residual Classification and Covariance Adjustment

For the first Kalman filter of the two cascaded filters, the distances between the target and the anchors as well as their variation rates of measurement are state variables of KF:
Y k = [ ρ 1 , k , , ρ M , k , ρ ˙ 1 , k , , ρ ˙ M , k ] T .
where Y k is the KF state vector in the k-th iteration, ρ i , k is the measured distance between the i-th anchor and the target in the k-th iteration, and ρ ˙ i , k is the rate of change in the measured distance.
After calculating the prediction of the states, a residual obtained between measurement and prediction is shown below:
d k = | Z k T Y ^ k | k 1 | ,
where Z k is a set of measurements collected by several stationary UWB anchors and T is a transition matrix between state and observation.
T = I M 0 M .
Then, the range of the obtained residual is classified as follows:
d k { 0 < m a x ( d k ) < μ 1 (20a) μ 1 m a x ( d k ) < μ 2 (20b) μ 2 m a x ( d k ) < μ 3 (20c) (20d) μ N 3 m a x ( d k ) < μ N 2 (20e) μ N 2 m a x ( d k ) < μ N 1 (20f) μ N 1 m a x ( d k ) < μ N (20g)
where μ N > μ N 1 > > μ 3 > μ 2 > μ 1 and N is the number of range groups. The classification criteria are based on the order of μ ’s magnitude, and the choice of the first parameter μ 1 in (20a) is based on the LOS measured noise covariance, which is determined by the UWB ranging accuracy. When the LOS measured noise is Gaussian distributed with ( μ , σ ) = ( 0 m , 0.1 m ) , the cumulative distribution function (CDF) is defined as [39]:
F ( a ) = P ( X a ) .
When a = 0.375, F(a) = 0.9999. This value is already very close to 1. When a is greater than 0.7, the sensitivity to noise is reduced. Therefore, 0.5 is selected as the value of μ 1 after many tests. The choice of this value can be adjusted accordingly. Other classifications are based on the fixed value region. Therefore, the region in (20) can be set:
d k { 0 < m a x ( d k ) < 0.5 0.5 < m a x ( d k ) < 1 1 < m a x ( d k ) < 10 10 < m a x ( d k ) < 20 20 < m a x ( d k ) < 30 30 < m a x ( d k ) < 40 40 < m a x ( d k ) < 50
After obtaining the residual range, the expectation of the squared residuals is defined as:
D k = E [ d k d k T ] = T G P ^ k 1 y G T T T + T Q k y T T + R k y ,
where G is a transition matrix of states defined as:
G = I M T s I M 0 M I M ,
According to the characteristic of expectations, when the random variable X is in a uniform distribution, the expectation of the squared variable is:
E ( X 2 ) = a b X 2 b a dX = b 2 + a b + b 2 3 .
where a and b are the lower and upper bound of X , respectively.
Therefore, when the residual d k is in a uniform distribution, the expectation of the squared residual D k = d i a g ( [ b 2 + a b + a 2 3 ] ) . In (20), the range of d k has been already classified, and thus, the corresponding D k is calculated by (25). Then, according to (23), the following equation is obtained:
T Q k y T T + R k y = D k T G P ^ k 1 y G T T T ,
where T G P ^ k 1 y G T T T can be calculated through the last-time estimation. Q k y is generally not adjusted greatly, and the adjustment range is 0 1 . The parameter λ is defined as the adjustment factor of Q k y , which is defined as:
λ k , j = N j N .
where N is the number of range groups and j is the group to which it belongs.
When the residual d k is large, which means that the observed value contains a large noise component, the final estimate is biased toward the predicted value, so Q k y needs to be reduced. Similarly, when the residual d k is small, the final estimate is biased towards the observed value, and Q k y needs to be increased. The adjustment for Q k y is shown below:
Q k y = λ k , j · Q 0 y ( λ k , j = N j N ) .
After the adjustment of Q k y in (28), R k y can be adjusted according to (26). Thus, residual classification and covariance adjustment are accomplished. One of the advantages of RCCA is that it does not require the detection and discrimination of LOS/NLOS measurements. The other advantage is that NLOS measurements can be retained, which is an indicator of the presence of NLOS interference for a long time. The flowchart of RCCA is shown in Figure 2.

4. Double Extended Kalman Filter Based on RCCA

In this section, residual classification and covariance adjustment (RCCA) is applied to the double extended Kalman filter, which is constructed by concatenating a KF and an EKF.
The main principle of RCCA is that the predicted value is obtained via a conventional filtering process through KF, and then, the residual between the predicted value and value (from the anchors) is obtained. The interval is classified according to the size of the residual, and the corresponding covariance matrix and observation noise covariance matrix are adjusted. Then, the results filtered by the KF are used as the input to the second EKF, which is used as the observation value and observation noise matrix of the EKF. The first-stage KF adjusts the covariance matrix through residual classification, to obtain more accurate observations for the second-stage EKF for further processing. The architecture of the overall system is shown in Figure 3.
First, for the pre-stage KF, the iteration calculation process of the KF is shown below:
1. Prediction:
Y ^ k | k 1 = G Y ^ k 1 ,
d k = | Z k T Y ^ k | k 1 | ,
d k classification ,
Q k y = λ k , j · Q 0 y ( λ k , j = N j N ) ,
P k y = G P k 1 y G T + Q k y ,
2. RCCA:
R k y = D k T G P ^ k 1 y G T T T T Q k y T T ,
3. Estimation:
K k y = P ^ k | k 1 y T T ( T P ^ k | k 1 y T T + R k y ) 1 ,
Y ^ k = Y ^ k | k 1 + K k y d k ,
P ^ k y = ( I K k y T ) P ^ k | k 1 y .
Then, for the latter EKF, the iteration process of the EKF is shown below:
1. Prediction
X ^ k | k 1 = A X ^ k 1 ,
P ^ k | k 1 x = A P ^ k 1 x A T + Q k x ,
2. Estimation
R k x = T P ^ k y T T ,
K k x = P ^ k | k 1 x H k T ( H k P ^ k | k 1 x H k T + R k x ) 1 ,
Z k = T Y ^ k ,
X ^ k = X ^ k | k 1 + K k x ( Z k h ( X ^ k | k 1 ) ) ,
P ^ k x = ( I K k x H k ) P ^ k | k 1 x .
where the measurements Z k and the measured covariance matrix R k x in the EKF system are based on the KF, and are calculated in (42) and (40). Z k is not the measurement from the anchors; instead, it is the estimation from the KF. The estimation error variance of the KF is selected as the corresponding EKF measurement covariance matrix R k x . The design uses more accurate distance values as the observations of the EKF, and the estimated state error variance decreases with iterations, which is in line with the trend of decreasing measurement error covariance. The double extended Kalman filter based on RCCA is summarized in Algorithm 1, and the flowchart is shown in Figure 4.
Algorithm 1 Double-layer extended-Kalman filter algorithm.
  • Input:
  • KF: The initial state (distance, rate of change for distance) of target Y 0 and the corresponding estimation error variance matrix P 0 y , the initial covariance Q 0 y for Kalman filter process noise ensured by experiments, the measurements Z k of all distances between M stationary anchors and target.
  • EKF: The initial state (position, velocity, acceleration) of the target X 0 and the corresponding estimation error variance matrix P 0 x , the initial covariance Q 0 x for Extended Kalman filter process noise.
  • The pre-set threshold μ 1 for the first group classification in (20a).
  • For  k = 1 : times
  • First Kalman filter with RCCA:
    - Calculate the prediction state Y ^ k | k 1
    - Calculate the residual of prediction and measurements d k using (18)
    - Judge the range of d k using (22)
    - Adjust the Q k y using (28)
    - Calculate the prediction variance P ^ k | k 1 y using (33)
    - Calculate the R k y using (26)
    - Bring the adjusted Q k y and R k y into (35) to obtain Kalman gain K k y of first KF
    - Output the distance state T Y ^ k and the estimation error variance T P ^ k y T T .
  • Second Extended Kalman filter:
    - Calculate the prediction state and covariance X ^ k | k 1 and P ^ k | k 1 x
    - Obtain the first KF’s output distance state as observation of second EKF Z k = T Y ^ k , and the estimation error variance as measurement covariance R k x = T P ^ k y T T
    - Calculate the Kalman gain K k x of second EKF
    - Update the state X ^ k and output
    - Update the estimation error variance P ^ k x and output.
  • End For
  • Output:  X ^ k , P ^ k x

5. Simulation Results and Experimental Verification

5.1. Simulation Environments and Settings

The simulation was carried out with MATLAB R2021b on a PC. The EKF, IMED-KF [19], M-REKF [30], and proposed DEKF algorithms were tested and compared under the CV and CA models. There are five stationary UWB anchors located at [ x 1 U , y 1 U , z 1 U ] = [ 2 m , 7 m , 1 m ] , [ x 2 U , y 2 U , z 2 U ] = [ 12 m , 7 m , 2 m ] , [ x 3 U , y 3 U , z 3 U ] = [ 7 m , 12 m , 3 m ] , [ x 4 U , y 4 U , z 4 U ] = [ 7 m , 2 m , 5 m ] , and [ x 5 U , y 5 U , z 5 U ] = [ 7 m , 7 m , 7 m ] . The simulation was performed with 100 Monte Carlo experiments with a time step of 0.01 s. The duration of each experiment was 10 s. The measurement noise was set to have a Gaussian distribution with ( μ m , σ m ) = ( 0 m , 0.1 m ) , and the threshold of the first interval was defined as μ 1 , i = 0.5 ,   i = 1 , , M , where M = 5 is the number of anchors. The NLOS noise was modeled with a uniform distribution. The initial state of the second EKF was X 0 = [ 2 m , 2 m , 2 m , 0.4 m / s , 0.4 m / s , 0.4 m / s , 0.02 m / s , 0.02 m / s , 0.02 m / s ] T , and the initial state error variance P 0 x for the EKF was d i a g ( [ 0.1 , 0.1 , 0.1 , 0.01 , 0.01 , 0.01 , 0.005 , 0.005 , 0.005 ] ) . The distances in the initial state of the first KF were calculated by the initial target position and the anchor positions with h i ( X k ) = ( x k x i U ) 2 + ( y k y i U ) 2 + ( z k z i U ) 2 , and the variation rate of the distances v d , 0 was set to be 0.1 m / s . The initial state error variance for the KF was defined as P 0 y = d i a g ( [ 0.1 , , 0.1 , 0.01 , , 0.01 ] ) .
As mentioned in Section 2.2, uniformly distributed noise was chosen as the NLOS noise model. The NLOS noise model is described in Figure 5, where the black blocks represent the occupied time of the NLOS noise with U ( 0 , 10 m ) uniformly distributed noise, and the white blocks represent the occupied time in the LOS environment. Both the NLOS and LOS environments also have Gaussian measurement noise with ( μ m , σ m ) = ( 0 m , 0.1 m ) . The LOS/NLOS noise distribution for the five anchors in 1000 iteration times is shown in Figure 5.

5.2. Performance Metrics

The root mean squared error (RMSE) [39] is used to evaluate the accuracy of positioning, and it is defined as:
R M S E k = 1 L l = 1 L ( X l , k X ^ l , k ) T ( X l , k X ^ l , k ) .
where L is the number of Monte Carlo trials.
In addition, the Cramer–Rao lower bound (CRLB) [40,41,42] is also used as a metric for algorithm performance. Here, the Posterior CRLB (PCRLB) is used as the metric for X k estimation; it is defined as:
E [ ( X k X ^ k ) ( X k X ^ k ) T ] J k 1 = PCRLB k ,
where J k is the Fisher information matrix:
J k = [ A J k 1 1 A T + Q k 1 ] 1 + H k T R k 1 H k .
The cumulative distribution function (CDF), which is defined in (21), is also taken into account in the evaluation of target tracking accuracy.

5.3. Simulation Results

For generality, the CA model was used in the simulations, as shown in Figure 6, in which the RMSE and CDF of different filtering results are presented in the environment where the noise of all five anchors contains LOS only. In the LOS environment, EKF and the proposed DEKF can have a steady-ranging accuracy within 10 cm, while IMED-KF and M-REKF diverge during iteration. Using the two-state Markov chain described in Section 2.2 as the NLOS/LOS environment simulation model, four different scenarios, S1–S4, were set, and the NLOS noise distribution of the five anchors in different scenarios is as follows:
S1:
ε = [ 0.1 , 0 , 0 , 0 , 0 ] ,
S2:
ε = [ 0 , 0.25 , 0 , 0.25 , 0 ] ,
S3:
ε = [ 0 , 0.25 , 0.1 , 0.75 , 0 ] ,
S4:
ε = [ 0.25 , 0.25 , 0.25 , 0.25 , 0.25 ] .
Figure 6. CA model: (a) RMSE comparison in LOS environment; (b) CDF comparison in LOS environment.
Figure 6. CA model: (a) RMSE comparison in LOS environment; (b) CDF comparison in LOS environment.
Sensors 25 00740 g006
In scenario S4, the results in the CA model present different outcomes, as shown in Figure 7. In the CA model, the RMSE of IMED-KF grows fast during iteration, and M-REKF also tends to increase with a smaller slope. On the contrary, the proposed DEKF is stable within 5 cm, and EKF is stable with a meter-level RMSE. The simulation results illustrate that IMED-KF and M-REKF in the CA motion model diverge much more easily, leading to an inaccurate result. However, the proposed DEKF is stable and highly accurate in the CA model. The tracking RMSE results in the LOS and S1–S4 environments for the CA model are illustrated in Table 2. It can be seen that DEKF can remain stable and have a much more accurate range when the environment changes, while EKF, IMED-KF, and M-REKF are far from accurate.

5.4. Experimental Verification of the Algorithm

In order to test the performance of the proposed algorithm in a complex indoor environment, an experimental environment was built in our office using a UWB module, including four anchors and one target. The office area is about 46 m 2   ( 4.76 × 9.63 m ) , and there were many people and some equipment in the office when these experiments were carried out, as shown in Figure 8.
The DEKF, EKF, and IMED-KF algorithms are used for performance comparison. As shown in Figure 9a, red lines and red dots represent the position and trajectory of the target, and green dots represent stationary points. Blue points represent the anchors, and their coordinates are B S 1 ( 0.20 , 1.68 ) m , B S 2 ( 4.45 , 1.68 ) m , B S 3 ( 0.20 , 7.15 ) m , and B S 4 ( 4.45 , 6.18 ) m . The anchor height was set to 1.7 m to aid us in building the experimental environment in the lab, such as adding metal sheets to block the anchors for NLOS occurrence in tracking experiments. Figure 9b shows the test track in the indoor office environment.
The dashed line in Figure 9a shows the motion of the target. The target performs a 3 m reciprocating motion. Its x-axis remains the same, while the y-axis is displaced up to 6 m .
Figure 10 illustrates the RMSE values of several algorithms mentioned in the previous section for the LOS environment and the four NLOS cases. The RMSEs of these algorithms in the LOS environment are very close, under 10 cm, which means that the three algorithms are all accurate enough to achieve real-time tracking. In the four NLOS environment cases, the RMSEs of the three algorithms are relatively small, and the RMSE of DEKF is the smallest.
Figure 11 shows the RMSEs of each algorithm when changing the number of anchors subject to NLOS interference from one to two. When the target returns from the other side of the track, an NLOS anchor is added for a duration of about half the experiment time. The RMSE of EKF and IMD-KF increases rapidly at half time, while DEKF remains stable when the number of NLOS anchors increases.
For the CA model, the results in the LOS and NLOS situations are shown in Table 3. Among the three algorithms, IMED-KF cannot obtain a stable and accurate result in this motion model, whereas the proposed DEKF and EKF can track the target in a relatively accurate way. In the LOS environment, DEKF and EKF can reach high accuracy with values close to each other. When the number of NLOS anchors increases, EKF tracks the target more and more inaccurately, especially in the 4-NLOS situation. However, the RMSE of DEKF can remain stable when the environment become severe, with an average RMSE from 17 cm to 26 cm.

6. Conclusions

This article proposes a double extended Kalman filter algorithm in order to fix the weakening effect on tracking accuracy when the measurements have NLOS and measuring noises. The preceding Kalman filter with a residual classification and covariance adjustment (RCCA) module was designed to smooth the distance input and can adjust the Kalman gain in time as the observations change. Then, the states of the preceding KF into the next EKF as the distance observations change. The experimental results demonstrate that the algorithm presented in this paper exhibits high accuracy under both CV and CA models. It can achieve centimeter-level accuracy in LOS/NLOS environments, specifically, an accuracy within 4 cm in LOS and within 10 cm in NLOS, and it converges at a faster speed than its counterparts according to the results of numerous simulations. Using the proposed algorithm, target tracking will be performed quite accurately when the LOS measurements are diminished near to zero. In addition, the accuracy will not decrease significantly when severe NLOS errors lasting a long time occur, as verified by the simulation and experimental results.

Author Contributions

Methodology, S.X.; Software, Q.L.; Resources, Q.W.; Writing—original draft, K.C.; Writing—review & editing, M.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Ministry of Science and Technology of China through the National Key Research and Development Program of Chinaunder Grant 2019YFB2204500.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Abbas, R.; Michael, K.; Michael, M.G. The Regulatory Considerations and Ethical Dilemmas of Location-Based Services (LBS): A Literature Review. Inf. Technol. People 2014, 27, 2–20. [Google Scholar] [CrossRef]
  2. Zou, D.; Meng, W.; Han, S.; He, K.; Zhang, Z. Toward Ubiquitous LBS: Multi-Radio Localization and Seamless Positioning. IEEE Wirel. Commun. 2016, 23, 107–113. [Google Scholar] [CrossRef]
  3. Niu, B.; Zhu, X.; Chi, H.; Li, H. Pseudo-Location Updating System for privacy-preserving location-based services. China Commun. 2013, 10, 1–12. [Google Scholar] [CrossRef]
  4. Sun, H.; Dong, M.; Chu, B.; Ao, M.; Chen, C.; Gu, S. Multi-Level High Precision LBS Architecture Based on GNSS CORS Network, A Case Study of HNCORS. IEEE Access 2019, 7, 185042–185054. [Google Scholar] [CrossRef]
  5. Choudhury, N.; Matam, R.; Mukherjee, M.; Lloret, J. LBS: A Beacon Synchronization Scheme with Higher Schedulability for IEEE 802.15.4 Cluster-Tree-Based IoT Applications. IEEE Internet Things J. 2019, 6, 8883–8896. [Google Scholar] [CrossRef]
  6. Ye, H.; Yang, B.; Long, Z.; Dai, C. A Method of Indoor Positioning by Signal Fitting and PDDA Algorithm Using BLE AOA Device. IEEE Sens. J. 2022, 22, 7877–7887. [Google Scholar] [CrossRef]
  7. Ye, F.; Chen, R.; Guo, G.; Peng, X.; Liu, Z.; Huang, L. A Low-Cost Single-Anchor Solution for Indoor Positioning Using BLE and Inertial Sensor Data. IEEE Access 2019, 7, 162439–162453. [Google Scholar] [CrossRef]
  8. Yu, Y.; Chen, R.; Chen, L.; Zheng, X.; Wu, D.; Li, W.; Wu, Y. A Novel 3-D Indoor Localization Algorithm Based on BLE and Multiple Sensors. IEEE Internet Things J. 2021, 8, 9359–9372. [Google Scholar] [CrossRef]
  9. Xue, M.; Sun, W.; Yu, H.; Tang, H.; Lin, A.; Zhang, X.; Zimmermann, R. Locate the Mobile Device by Enhancing the WiFi-Based Indoor Localization Model. IEEE Internet Things J. 2019, 6, 8792–8803. [Google Scholar] [CrossRef]
  10. Wang, F.; Feng, J.; Zhao, Y.; Zhang, X.; Zhang, S.; Han, J. Joint Activity Recognition and Indoor Localization with WiFi Fingerprints. IEEE Access 2019, 7, 80058–80068. [Google Scholar] [CrossRef]
  11. Own, C.M.; Hou, J.; Tao, W. Signal Fuse Learning Method with Dual Bands WiFi Signal Measurements in Indoor Positioning. IEEE Access 2019, 7, 131805–131817. [Google Scholar] [CrossRef]
  12. Huang, C.H.; Lee, L.H.; Ho, C.C.; Wu, L.L.; Lai, Z.H. Real-Time RFID Indoor Positioning System Based on Kalman-Filter Drift Removal and Heron-Bilateration Location Estimation. IEEE Trans. Instrum. Meas. 2015, 64, 728–739. [Google Scholar] [CrossRef]
  13. Yu, H.Y.; Chen, J.J.; Hsiang, T.R. Design and Implementation of a Real-Time Object Location System Based on Passive RFID Tags. IEEE Sens. J. 2015, 15, 5015–5023. [Google Scholar] [CrossRef]
  14. Scherhäufl, M.; Pichler, M.; Stelzer, A. UHF RFID Localization Based on Evaluation of Backscattered Tag Signals. IEEE Trans. Instrum. Meas. 2015, 64, 2889–2899. [Google Scholar] [CrossRef]
  15. Kim, J.E.; Choi, J.H.; Kim, K.T. Robust Detection of Presence of Individuals in an Indoor Environment Using IR-UWB Radar. IEEE Access 2020, 8, 108133–108147. [Google Scholar] [CrossRef]
  16. Bottigliero, S.; Milanesio, D.; Saccani, M.; Maggiora, R. A Low-Cost Indoor Real-Time Locating System Based on TDOA Estimation of UWB Pulse Sequences. IEEE Trans. Instrum. Meas. 2021, 70, 5502211. [Google Scholar] [CrossRef]
  17. Silva, B.; Hancke, G.P. IR-UWB-Based Non-Line-of-Sight Identification in Harsh Environments: Principles and Challenges. IEEE Trans. Ind. Inform. 2016, 12, 1188–1195. [Google Scholar] [CrossRef]
  18. Luo, Y.; Law, C.L. Indoor Positioning Using UWB-IR Signals in the Presence of Dense Multipath with Path Overlapping. IEEE Trans. Wirel. Commun. 2012, 11, 3734–3743. [Google Scholar] [CrossRef]
  19. Yi, L.; Razul, S.G.; Lin, Z.; See, C.M. Target Tracking in Mixed LOS/NLOS Environments Based on Individual Measurement Estimation and LOS Detection. IEEE Trans. Wirel. Commun. 2014, 13, 99–111. [Google Scholar] [CrossRef]
  20. Liu, J.; Guo, G. Vehicle Localization During GPS Outages with Extended Kalman Filter and Deep Learning. IEEE Trans. Instrum. Meas. 2021, 70, 7503410. [Google Scholar] [CrossRef]
  21. Jiancheng, F.; Sheng, Y. Study on Innovation Adaptive EKF for In-Flight Alignment of Airborne POS. IEEE Trans. Instrum. Meas. 2011, 60, 1378–1388. [Google Scholar] [CrossRef]
  22. Jia, G.; Huang, Y.; Zhang, Y.; Chambers, J. A Novel Adaptive Kalman Filter with Unknown Probability of Measurement Loss. IEEE Signal Process. Lett. 2019, 26, 1862–1866. [Google Scholar] [CrossRef]
  23. Guangcai, W.; Xu, X.; Zhang, T. M-M Estimation-Based Robust Cubature Kalman Filter for INS/GPS Integrated Navigation System. IEEE Trans. Instrum. Meas. 2021, 70, 1–11. [Google Scholar] [CrossRef]
  24. Pak, J.M.; Ahn, C.K.; Shmaliy, Y.S.; Lim, M.T. Improving Reliability of Particle Filter-Based Localization in Wireless Sensor Networks via Hybrid Particle/FIR Filtering. IEEE Trans. Ind. Inform. 2015, 11, 1089–1098. [Google Scholar] [CrossRef]
  25. Ahwiadi, M.; Wang, W. An Adaptive Particle Filter Technique for System State Estimation and Prognosis. IEEE Trans. Instrum. Meas. 2020, 69, 6756–6765. [Google Scholar] [CrossRef]
  26. Fisch, A.T.M.; Eckley, I.A.; Fearnhead, P. Innovative and Additive Outlier Robust Kalman Filtering with a Robust Particle Filter. IEEE Trans. Signal Process. 2022, 70, 47–56. [Google Scholar] [CrossRef]
  27. Ullah, I.; Shen, Y.; Su, X.; Esposito, C.; Choi, C. A Localization Based on Unscented Kalman Filter and Particle Filter Localization Algorithms. IEEE Access 2020, 8, 2233–2246. [Google Scholar] [CrossRef]
  28. Hao, Z.; Li, B.; Dang, X. An improved Kalman filter positioning method in NLOS environment. China Commun. 2019, 16, 84–99. [Google Scholar] [CrossRef]
  29. Ke, W.; Wu, L. Mobile Location with NLOS Identification and Mitigation Based on Modified Kalman Filtering. Sensors 2011, 11, 1641–1656. [Google Scholar] [CrossRef] [PubMed]
  30. Ho, T.J. Robust Localization in Cellular Networks via Reinforced Iterative M-Estimation and Fuzzy Adaptation. IEEE Trans. Wirel. Commun. 2022, 21, 4269–4281. [Google Scholar] [CrossRef]
  31. Olejniczak, A.; Blaszkiewicz, O.; Cwalina, K.K.; Rajchowski, P.; Sadowski, J. LOS and NLOS identification in real indoor environment using deep learning approach. Digit. Netw. 2023, 10, 1305–1312. [Google Scholar] [CrossRef]
  32. Wang, G.; Li, S.; Cheng, P.; Vucetic, B.; Li, Y. ToF-Based NLoS Indoor Tracking with Adaptive Ranging Error Mitigation. IEEE Trans. Signal Process. 2024, 72, 4855–4870. [Google Scholar] [CrossRef]
  33. Jiang, C.; Shen, J.; Chen, S.; Chen, Y.; Liu, D.; Bo, Y. UWB NLOS/LOS Classification Using Deep Learning Method. IEEE Commun. Lett. 2020, 24, 2226–2230. [Google Scholar] [CrossRef]
  34. Zarchan, P. Progress in Astronautics and Aeronautics: Fundamentals of Kalman Filtering: A Practical Approach; Aiaa: Reston, VA, USA, 2005; Volume 208. [Google Scholar]
  35. Reif, K.; Unbehauen, R. The extended Kalman filter as an exponential observer for nonlinear systems. IEEE Trans. Signal Process. 1999, 47, 2324–2328. [Google Scholar] [CrossRef]
  36. Cui, W.; Li, B.; Zhang, L.; Meng, W. Robust Mobile Location Estimation in NLOS Environment Using GMM, IMM, and EKF. IEEE Syst. J. 2019, 13, 3490–3500. [Google Scholar] [CrossRef]
  37. Yi, L.; Razul, S.G.; Lin, Z.; See, C.M. Target tracking in mixed LOS/NLOS environments based on individual TOA measurement detection. In Proceedings of the 2010 IEEE Sensor Array and Multichannel Signal Processing Workshop, Jerusalem, Israel, 4–7 October 2010; pp. 153–156. [Google Scholar] [CrossRef]
  38. Cao, B.; Wang, S.; Ge, S.; Ma, X.; Liu, W. A Novel Mobile Target Localization Approach for Complicate Underground Environment in Mixed LOS/NLOS Scenarios. IEEE Access 2020, 8, 96347–96362. [Google Scholar] [CrossRef]
  39. Flueratoru, L.; Wehrli, S.; Magno, M.; Lohan, E.S.; Niculescu, D. High-Accuracy Ranging and Localization with Ultrawideband Communications for Energy-Constrained Devices. IEEE Internet Things J. 2022, 9, 7463–7480. [Google Scholar] [CrossRef]
  40. Shikur, B.Y.; Weber, T. Posterior CRLB for tracking a mobile station in NLOS multipath environments. In Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, Vancouver, BC, Canada, 26–31 May 2013; pp. 5175–5179. [Google Scholar] [CrossRef]
  41. Huang, J.; Wan, Q. The CRLB for WSNs location estimation in NLOS environments. In Proceedings of the 2010 International Conference on Communications, Circuits and Systems (ICCCAS), Chengdu, China, 28–30 July 2010; pp. 83–86. [Google Scholar] [CrossRef]
  42. Zhao, Y.; Fan, X.; Xu, C.Z.; Li, X. ER-CRLB: An Extended Recursive Cramér–Rao Lower Bound Fundamental Analysis Method for Indoor Localization Systems. IEEE Trans. Veh. Technol. 2017, 66, 1605–1618. [Google Scholar] [CrossRef]
Figure 1. Markov process for LOS/NLOS transition.
Figure 1. Markov process for LOS/NLOS transition.
Sensors 25 00740 g001
Figure 2. RCCA computational flowchart.
Figure 2. RCCA computational flowchart.
Sensors 25 00740 g002
Figure 3. DEKF system framework diagram.
Figure 3. DEKF system framework diagram.
Sensors 25 00740 g003
Figure 4. DEKF algorithm computational flowchart.
Figure 4. DEKF algorithm computational flowchart.
Sensors 25 00740 g004
Figure 5. NLOS model distribution.
Figure 5. NLOS model distribution.
Sensors 25 00740 g005
Figure 7. CA model: (a) RMSE comparison in LOS/NLOS environment S4; (b) CDF comparison in LOS/NLOS environment S4.
Figure 7. CA model: (a) RMSE comparison in LOS/NLOS environment S4; (b) CDF comparison in LOS/NLOS environment S4.
Sensors 25 00740 g007
Figure 8. The environment of the test office.
Figure 8. The environment of the test office.
Sensors 25 00740 g008
Figure 9. (a) Trajectory in indoor office environment. (b) Test track in indoor office environment.
Figure 9. (a) Trajectory in indoor office environment. (b) Test track in indoor office environment.
Sensors 25 00740 g009
Figure 10. CV model: (a) RMSE in the LOS situation; (b) RMSE in four NLOS situations.
Figure 10. CV model: (a) RMSE in the LOS situation; (b) RMSE in four NLOS situations.
Sensors 25 00740 g010
Figure 11. CV model: RMSE after change from 1 to NLOS to 2-NLOS.
Figure 11. CV model: RMSE after change from 1 to NLOS to 2-NLOS.
Sensors 25 00740 g011
Table 1. Scaling factor of NLOS noise.
Table 1. Scaling factor of NLOS noise.
ε i α β
0.10.010.09
0.250.020.06
0.50.050.05
0.750.060.02
Table 2. CA model: positioning result comparison in LOS and S1–S4.
Table 2. CA model: positioning result comparison in LOS and S1–S4.
Noise SituationTracking Results: Average RMSE/m
DEKFEKFIMED-KFM-REKF
LOS0.0220.0170.1812.227
S10.0230.2280.2322.245
S20.0270.9263.3852.327
S30.0521.4538.6472.408
S40.0541.86811.9342.467
Table 3. Positioning test result comparison in CA model.
Table 3. Positioning test result comparison in CA model.
NLOS NumberTracking Results/m
DEKFEKF
LOStrackingtracking
RMSE m a x = 0.33 RMSE m a x = 0.53
RMSE a v g = 0.17 RMSE a v g = 0.18
1-NLOStrackingtracking
RMSE m a x = 0.37 RMSE m a x = 0.69
RMSE a v g = 0.18 RMSE a v g = 0.27
2-NLOStrackingtracking
RMSE m a x = 0.39 RMSE m a x = 0.71
RMSE a v g = 0.18 RMSE a v g = 0.34
3-NLOStrackingtracking
RMSE m a x = 0.54 RMSE m a x = 0.89
RMSE a v g = 0.24 RMSE a v g = 0.41
4-NLOStrackingtracking
RMSE m a x = 0.61 RMSE m a x = 255.48
RMSE a v g = 0.26 RMSE a v g = 53.56
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xu, S.; Liu, Q.; Lin, M.; Wang, Q.; Chen, K. A Double Extended Kalman Filter Algorithm for Weakening Non-Line-of-Sight Errors in Complex Indoor Environments Based on Ultra-Wideband Technology. Sensors 2025, 25, 740. https://doi.org/10.3390/s25030740

AMA Style

Xu S, Liu Q, Lin M, Wang Q, Chen K. A Double Extended Kalman Filter Algorithm for Weakening Non-Line-of-Sight Errors in Complex Indoor Environments Based on Ultra-Wideband Technology. Sensors. 2025; 25(3):740. https://doi.org/10.3390/s25030740

Chicago/Turabian Style

Xu, Sheng, Qianyun Liu, Min Lin, Qing Wang, and Kaile Chen. 2025. "A Double Extended Kalman Filter Algorithm for Weakening Non-Line-of-Sight Errors in Complex Indoor Environments Based on Ultra-Wideband Technology" Sensors 25, no. 3: 740. https://doi.org/10.3390/s25030740

APA Style

Xu, S., Liu, Q., Lin, M., Wang, Q., & Chen, K. (2025). A Double Extended Kalman Filter Algorithm for Weakening Non-Line-of-Sight Errors in Complex Indoor Environments Based on Ultra-Wideband Technology. Sensors, 25(3), 740. https://doi.org/10.3390/s25030740

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop