Keywords

1 Introduction

With the rapid development of automatic driving technologies in metro and high-speed train, the location information of the train plays an important role in safety driving [1]. Up to now, how to promote the accuracy of outdoor localization for safety driving is still an open hotspot.

UWB is a promising localization technology in outdoor scenarios and has a significant advantage in localization accuracy, such as 10–30 cm errors in some cases [2]. As we all know, the typical methods of UWB localization mainly include angle-of-arrival (AOA), time-of-arrival (TOA), time-difference-of-arrival (TDOA) and their hybrids [3]. Since an antenna array is required to installing on each node for AOA algorithm, TOA and TDOA have low-price advantages in practice. However, the ranging results in TOA and TDOA can be affected by the non-line-of-sight propagation (NLOS) when the transmission path is blocked by metal or large obstacles and a slight ranging error will cause a large position error. In this paper, we focus on the LOS/NLOS detection with the TOA localization.

Regarding NLOS detection, its methods can be classified into two types: determining with the statistical characteristics of UWB pulses, utilizing ranging information and training the classification model via machine learning (ML). Among them, the energy statistics of the direct-path signal and its statistics of delay were analyzed in [4] to identify the channel. Then, Lin Liu utilized the ranging information sufficiently and incorporated the geometric constraints within maximum likelihood to detect NLOS [5]. Besides, in order to improve the detection accuracy, convolutional neural networks (CNN), k-nearest neighbors (KNN), support vector machine (SVM) and other ML methods were introduced to distinguish LOS from NLOS channels [6, 7]. Based on ML algorithm, the statistical distribution of Gaussian noise and generalized Gaussian noise were analyzed to improve the accuracy of NLOS channel identification [8].

Compared with detection by the pulse and ranging information, the classification model has a great advantage on detection accuracy at the cost of higher complexity and longer training time [9, 10]. Hence, this paper will propose an ML algorithm for NLOS detection with UWB anchors deployment along a narrow path, which makes full use of UWB ranging information and determines LOS/NLOS by a threshold. Based on the ranging information, we firstly construct an equation to estimate the NLOS ranging error for the single-path blocking, and in the case of the multi-path blocked, an iterative algorithm for multiple-ranging errors estimation is proposed. Then, an error-tetrahedron method is introduced and the volume of the tetrahedron is calculated. Finally, based on statistical method, the appropriate thresholds are set to determine whether the NLOS transmission is present or not. Through the proposed algorithm, the LOS/NLOS can be identified with high accuracy and low computational complexity.

2 Problem Statement

In the train localization system, anchors are deployed along a narrow path to realize wireless localization and its architecture is illustrated in Fig. 1. As one can see, the anchors alternatively communicate with the tag and their distances can be calculated by time of flight (TOF). Then, each anchor sends their ranging results to the primary anchor connected with a computer. The following part of this Section will take a brief review on the TOA algorithm and NLOS-related scenarios.

Fig. 1
An illustration represents the architecture of the U W B localizing system. It indicates the interactions of primary and secondary U W B anchors. The primary is denoted as 1, while the secondary anchors are labeled from 2 to 6. Anchor 1 is connected to the T O A position solution.

The architecture of UWB localizing system

Assuming that the transmission rate of electromagnetic wave is \(c\) and the propagation time between the i-th anchor and the tag is \(t_{i}\), the corresponding distance is

$$d_{i} = ct_{i} .$$
(1)

Considering both measurement noise and the NLOS range error, the ranging model in LOS/NLOS case can be represented as:

$$\tilde{r}_{i} = \left\{ {\begin{array}{*{20}c} {r_{i} ,} \\ {r_{i} + l_{i} ,} \\ \end{array} \begin{array}{*{20}c} {LOS} \\ { NLOS} \\ \end{array} } \right.$$
(2)

where

$$r_{i} = d_{i} + n_{i} .$$
(3)

Here, the errors caused by measurement noise and NLOS are represented by \(n_{i}\) and \(l_{i}\), respectively. We assume \(n_{i} \sim N\left( {0,\sigma^{2} } \right)\) and \(l_{i} \sim N\left( {\mu_{i} ,\sigma_{i}^{2} } \right)\) with the positive mean \(\mu_{i}\) of the NLOS error.

Let \(S_{i} = \left( {x_{i} ,y_{i} ,z_{i} } \right)^{T}\) be the coordinate of the i-th anchor and the coordinate of the tag is donated as \(X = \left( {x,y,z} \right)^{T}\). In the Cartesian coordinate system, the distance between the tag and \(n\) anchors can be represented as:

$$\left\{ {\begin{array}{*{20}c} {\left( {x_{1} - x} \right)^{2} + \left( {y_{1} - y} \right)^{2} + \left( {z_{1} - z} \right)^{2} = r_{1}^{2} } \\ {\left( {x_{2} - x} \right)^{2} + \left( {y_{2} - y} \right)^{2} + \left( {z_{2} - z} \right)^{2} = r_{2}^{2} } \\ {\begin{array}{*{20}c} \vdots \\ {\left( {x_{n} - x} \right)^{2} + \left( {y_{n} - y} \right)^{2} + \left( {z_{n} - z} \right)^{2} = r_{n}^{2} } \\ \end{array} } \\ \end{array} } \right..$$
(4)

Each equation minus the i-th row in Eq. (4), and we can get

$$A_{i} X = B_{i}$$
(5)

where the observation matrix and the constant vector are

$$A_{1} = 2\left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {x_{12} } \\ {x_{13} } \\ \end{array} } & {\begin{array}{*{20}c} {y_{12} } \\ {y_{13} } \\ \end{array} } & {\begin{array}{*{20}c} {z_{12} } \\ {z_{13} } \\ \end{array} } \\ \vdots & \vdots & \vdots \\ {x_{1n} } & {y_{1n} } & {z_{1n} } \\ \end{array} } \right) or A_{i} = 2\left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {x_{i1} } \\ {x_{i2} } \\ \end{array} } & {\begin{array}{*{20}c} {y_{i1} } \\ {y_{i2} } \\ \end{array} } & {\begin{array}{*{20}c} {z_{i1} } \\ {z_{i2} } \\ \end{array} } \\ \vdots & \vdots & \vdots \\ {x_{in} } & {y_{in} } & {z_{in} } \\ \end{array} } \right)\left( {i \ne 1} \right)$$
(6)
$$B_{1} = \left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {r_{2}^{2} - r_{1}^{2} - k_{2} + k_{1} } \\ {r_{3}^{2} - r_{1}^{2} - k_{3} + k_{1} } \\ \end{array} } \\ \vdots \\ {r_{n}^{2} - r_{1}^{2} - k_{n} + k_{1} } \\ \end{array} } \right) or B_{i} = \left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {r_{1}^{2} - r_{i}^{2} - k_{1} + k_{i} } \\ {r_{2}^{2} - r_{i}^{2} - k_{2} + k_{i} } \\ \end{array} } \\ \vdots \\ {r_{n}^{2} - r_{i}^{2} - k_{n} + k_{i} } \\ \end{array} } \right)\left( {i \ne 1} \right).$$
(7)

Here, we donate \(x_{mn} = x_{m} - x_{n}\), \(y_{mn} = y_{m} - y_{n}\), \(z_{mn} = z_{m} - z_{n}\), \(\left( {m \ne n} \right)\) and \(k_{m} = x_{m}^{2} + y_{m}^{2} + z_{m}^{2}\). Then, Eq. (5) can be solved by least square (LS) method as:

$$X = A_{i}^{ + } B_{i}$$
(8)

where donate \(A_{i}^{ + }\) as the pseudo inverse of \(A_{i}\), i.e., \(A_{i}^{ + } = \left( {A_{i}^{T} A_{i} } \right)^{ - 1} A_{i}^{T}\). When the anchors are deployed along a narrow path, the condition number of matrix \(A_{i}\) will be large and a slight ranging error will cause a significant interference on localization precision. Hence, in this paper, we focus on LOS/NLOS detection in the case of deploying anchors along a narrow path.

3 LOS/NLOS Detection Algorithm

In this Section, we will propose a LOS/NLOS detection algorithm. In the case of NLOS blocking of single path between one anchor and the tag, the ranging equation with NLOS error will be established to solve error estimations. When NLOS exists between multiple anchors and the tag, an iterative method is introduced to estimate each ranging error alternatively. At last, in the absence of a proper solution for the ranging equation [see Eq. (4)], the error-tetrahedron method is used to identify LOS/NLOS.

3.1 Single Path LOS/NLOS Detection

As we can see from Eq. (7), the ranging results (i.e., \(r_{i}\)) in the equation appears in the form of square, so the error in vector \(B_{i}\) caused by the NLOS ranging error can be represented as:

$$\varepsilon_{i} = \tilde{r}_{i}^{2} - r_{i}^{2} = 2l_{i} r_{i} + l_{i}^{2} .$$
(9)

which is determined by the NLOS error \(l_{i}\) and the LOS distance \(r_{i}\).

Assume that the NLOS occlusion occurs in the i-th path. The localization equation of Eq. (5) can be rewritten as:

$$A_{i} \tilde{X} = \left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {r_{1}^{2} - r_{i}^{2} - k_{1} + k_{i} - \varepsilon_{i} } \\ {r_{2}^{2} - r_{i}^{2} - k_{2} + k_{i} - \varepsilon_{i} } \\ \end{array} } \\ \vdots \\ {r_{n}^{2} - r_{i}^{2} - k_{n} + k_{i} - \varepsilon_{i} } \\ \end{array} } \right) = B_{i} - \varepsilon_{i} \left( {\begin{array}{*{20}c} 1 \\ 1 \\ {\begin{array}{*{20}c} \vdots \\ 1 \\ \end{array} } \\ \end{array} } \right)$$
(10)

where the estimated coordinate of the tag under the NLOS scenario is denoted as \(\tilde{X}\) and the LS solution is solved as:

$$\tilde{X} = X - \varepsilon_{i} e_{i} .$$
(11)

Here, we denote the vector \(e_{i} = A_{i}^{ + } \left( {1, 1, \ldots ,1} \right)^{T}\) to simplify the solution. Then, the range distance between the estimated results in Eq. (11) and the location of the i-th anchor can be calculated as:

$$r_{i\_cal}^{2} = \left( {\tilde{X} - S_{i} } \right)^{T} \left( {\tilde{X} - S_{i} } \right).$$
(12)

Substituting Eq. (11) into Eq. (12), we can obtain

$$r_{i\_cal}^{2} = \tilde{r}_{i}^{2} - \varepsilon_{i} + \varepsilon_{i}^{2} e_{i}^{T} e_{i} - 2\varepsilon_{i} e_{i}^{T} \left( {\tilde{X} - S_{i} + \varepsilon_{i} e_{i} } \right).$$
(13)

Hence, the error in vector \(B_{i}\) caused by the NLOS ranging error can be calculated as:

$$\varepsilon_{i} = \frac{{ - \left[ {1 + 2e_{i}^{T} \left( {\tilde{X} - S_{i} } \right)} \right] \pm \sqrt {\left[ {1 + 2e_{i}^{T} \left( {\tilde{X} - S_{i} } \right)} \right]^{2} - 4e_{i}^{T} e_{i} \left( {r_{i\_cal}^{2} - \tilde{r}_{i}^{2} } \right)} }}{{2e_{i}^{T} e_{i} }}.$$
(14)

Then, the NLOS ranging error can be estimated as:

$$\hat{l}_{i} = \tilde{r}_{i} - \sqrt {\tilde{r}_{i}^{2} - \varepsilon_{i} } .$$
(15)

During the process of NLOS detection, each path is assumed as blocked alternatively and the parameter \(\varepsilon_{i}\) and the corresponding \(\hat{l}_{i}\) are calculated. Comparing with a threshold \(Th\) (i.e., 5 cm), the NLOS path can be determined if

$${\text{max}}\{ \hat{l}_{i} \} \ge Th.$$
(16)

3.2 Multipath LOS/NLOS Detection

For multiple NLOS paths, we propose an iterative method to continuously estimate the error elements in vector \(B_{i}\). The localization equation in Eq. (10) can be rewritten as:

$$A_{i} \tilde{X} = \left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {r_{1}^{2} - r_{i}^{2} - k_{1} + k_{i} - \varepsilon_{i} + \varepsilon_{1} } \\ {r_{2}^{2} - r_{i}^{2} - k_{2} + k_{i} - \varepsilon_{i} + \varepsilon_{2} } \\ \end{array} } \\ \vdots \\ {r_{n}^{2} - r_{i}^{2} - k_{n} + k_{i} - \varepsilon_{i} + \varepsilon_{n} } \\ \end{array} } \right) = B_{i} + \varphi_{i}$$
(17)

where the form of the iterative vector corresponds to matrix \(A_{i}\) as:

$$\varphi_{1} = \left( {\begin{array}{*{20}c} {\varepsilon_{2} - \varepsilon_{1} } \\ {\varepsilon_{3} - \varepsilon_{1} } \\ {\begin{array}{*{20}c} \vdots \\ {\varepsilon_{n} - \varepsilon_{1} } \\ \end{array} } \\ \end{array} } \right) or \text{ } \varphi_{i} = \left( {\begin{array}{*{20}c} {\varepsilon_{1} - \varepsilon_{i} } \\ {\varepsilon_{2} - \varepsilon_{i} } \\ {\begin{array}{*{20}c} \vdots \\ {\varepsilon_{n} - \varepsilon_{i} } \\ \end{array} } \\ \end{array} } \right),\left( {i \ne 1} \right).$$
(18)

Then we can update the error elements in vector \(B_{i}\) caused by the NLOS ranging error as:

$$\varepsilon_{i} = \tilde{r}_{i}^{2} - r_{i\_cal}^{2} - \left( {A_{i}^{ + } \varphi_{i} } \right)^{T} \left( {A_{i}^{ + } \varphi_{i} } \right) + 2\left( {A_{i}^{ + } \varphi_{i} } \right)^{T} \left( {\tilde{X} - S_{i} } \right)$$
(19)

until their variations are less than a threshold \(tol > 0\). Besides, an upper bound of times is also adopted to terminate the iteration. After the iterative method stopped, the parameter \(\varepsilon_{i}\) and the corresponding \(\hat{l}_{i}\) are calculated finally.

3.3 LOS/NLOS Detection Based on Tetrahedron Volume

Considering the case of no solution available from Eq. (13), we propose an error-tetrahedron volume method to determine whether the wireless channel is blocked or not. We assume four anchors available as an example, and select three anchors of them alternatively to solve out the coordinates of the tag [see Eq. (8)], expressed as \(X_{Si} = \left( {x_{Si} ,y_{Si} ,z_{Si} } \right)^{T}\). We connect the four solutions in Cartesian space and obtain a tetrahedron \(X_{S1} - X_{S2} X_{S3} X_{S4}\) as shown in Fig. 2.

Fig. 2
A diagram denotes 4 intersecting circles labeled S 1, S 2, S 3, and S 4. A tetrahedron is highlighted at the center around the intersecting points. The points in the tetrahedron are X s 1, X s 2, X s 3, and X s 4.

The diagram of the error tetrahedron

Generally, in the LOS environment, the four coordinates in Fig. 2, are closer while they are far away from each other in the NLOS environment. As a result, the volume of the tetrahedron can be set as a key parameter. With vertex coordinates, the tetrahedron volume can be calculated by

$$v_{{X_{S1} X_{S2} X_{S3} X_{S4} }} = \frac{1}{6}\left| {\begin{array}{*{20}c} {x_{S1S2} } & {y_{S1S2} } & {z_{S1S2} } \\ {x_{S1S3} } & {y_{S1S3} } & {z_{S1S3} } \\ {x_{S1S4} } & {y_{S1S4} } & {z_{S1S4} } \\ \end{array} } \right|$$
(20)

where denote \(x_{SmSn} = x_{Sm} - x_{Sn}\), \(y_{SmSn} = y_{Sm} - y_{Sn}\), \(z_{SmSn} = z_{Sm} - z_{Sn}\), \(\left( {m \ne n} \right)\). As a result, when there is no solution available in Eq. (13), LOS/NLOS can be detected by comparing Eq. (20) with a threshold.

4 Simulation Results

In this Section, we evaluate the performance of LOS/NLOS detection in term of the probability of detection and compare the proposed algorithm with the maximum likelihood detection method [5]. Assume the anchors and the tag are placed in a narrow path region with size \(5\,{\text{m}} \times 800\,{\text{m}} \times 1\,{\text{m}}\) to simulate the train localization along the track. Generally, the probability of detection is influenced by the mean value of the NLOS error and the number of anchors. Therefore, in this Section, we analyze such two factors’ impact on the performance of the proposed algorithm. Assume the average NLOS error ranges from 0.1 to 1 m with an interval of 0.1 m and the variances of ranging error and NLOS error are both 4cm2, the simulation results of the probability of detection under 5–8 anchors localization are shown in the Fig. 3.

Fig. 3
Four line graphs of probability detection versus N L O S error mean denote the increasing trend of 2 lines representing the maximum likelihood detection algorithm and proposed detection algorithm. Graphs B and C denote both lines align at the end.

The probability of detection under various NLOS error mean and the number of anchors. a 5 anchors, b 6 anchors, c 7 anchors, d 8 anchors

As we can see, the proposed algorithm always outperforms the maximum likelihood detection method. When the mean ranging error caused by NLOS is 0.1 m, compared with the maximum likelihood method, the proposed algorithm achieves an improvement of 18.17% with 5 anchors. When the average NLOS error is 0.7 m, the improvement is 1.83%. Besides, as the number of anchors increases, the probability of detection of the proposed algorithm is also improved. With the average ranging error as 0.5m, the probabilities of detection are 89.14%, 89.58%, 92.38% and 92.81% under localization with 5 to 8 anchors, respectively, and the corresponding improvements are 2.99%, 2.55%, 2.49% and 2.09%. Overall, the improvement of the proposed algorithm is more significant with fewer anchors and smaller NLOS error.

5 Conclusion

In this paper, an algorithm of LOS/NLOS detection has been proposed to apply to anchors deployment along a narrow path, such as lanes, tracks and so on. During the LOS/NLOS detection, we have firstly introduced a ranging equation with NLOS errors and identified NLOS under a single path blocked. Then, an iterative method has been introduced to update each ranging error when NLOS exists between multiple anchors and the tag. At last, when the ranging error equation has no proper solution, an error-tetrahedron method has been utilized and the LOS/NLOS propagation has been identified based on a volume threshold. Through the proposed algorithm, the range information and ML method have been well combined and the NLOS could be detected with high accuracy and low complexity. The simulation results have shown that the proposed algorithm could achieve a better performance than the maximum likelihood detection method, especially with fewer anchors and smaller NLOS error.