Channel-Quality-Evaluation-Based Anchor Node Selection for UWB Indoor Positioning

: Ultra-wideband (UWB) is a widely used technology in wireless indoor positioning. How-ever, Non-line-of-sight (NLOS) and complex multipath fading introduce positioning errors to the UWB system. In order to alleviate the inﬂuence of non-line-of-sight (NLOS) and multipath fading, a channel-quality-evaluation-based method is proposed in this paper. In the proposed method, the qualities of the channel between unknown nodes and anchor nodes are evaluated by a weighted equation related to the channel impulse response (CIR) characteristics. Anchor nodes with higher quality are selected adaptively for positioning. The experiments showed that this method can reduce the root-mean-squared error (RMSE) of the positioning results by 40.4% on average and 95.78% in some strongly degraded cases.


Introduction
Ultra-wideband (UWB) technology is popular in indoor positioning because of its high resolution and accuracy. The time of arrival and time difference of arrival are usually used for positioning in UWB systems [1]. These two methods rely on the estimated distance for localization. In a real scene, non-line-of-sight (NLOS) introduces much error to the measured data, which results in the error of the estimated distance. Thus, the positioning accuracy is strongly deteriorated, even going to meter-level error in some cases [2]. NLOS is owed to the blocking of the direct propagation of electromagnetic waves in the scene. Especially, when metal plates or concrete walls stand in the direct path, a more serious error will be introduced [3,4]. To tackle the positioning error caused by NLOS, there are two main solutions:

1.
Mitigate or correct the ranging error. This can be assisted by using an inertial navigation system (INS) [5][6][7]. When using the INS alone, the error will accumulate and the accuracy will become worse due to its characteristics, but using it in combination with UWB positioning can effectively improve the accuracy in the case of NOLS. In addition, the fingerprint of the position can be used to improve the positioning accuracy [8][9][10]. The fingerprint of the location is formed by collecting the features of the location in advance and training on them. The application is performed by finding the best-matching features to determine the location. This approach requires tedious data collection and is not environmentally adaptive; 2.
Removing values with large ranging errors. Since anchor nodes are usually redundant, some methods select a group of anchor nodes that can achieve better positioning accuracy than all the anchor nodes.
For the first type, INS auxiliary positioning requires adding sensors and upgrading the hardware equipment, so it was not considered in this paper; the fingerprint method has a large pre-workload of manual calibration and needs to be calibrated for specific scenes, so the data are not universally applicable and it is difficult to apply in practice. The second solution is more adaptable and flexible. Regarding the method of anchor node selection, some literature has proposed the method based on the dilution of precision (DOP) [11,12]; due to the geometric relationship, using different anchor nodes for the position solution will cause different degrees of error [13], and the combination of anchor nodes with a smaller DOP can obtain better positioning accuracy [14]. This solves the problem of the high manual calibration workload, but because NLOS has a very strong influence on ranging in indoor environments, station selection by the DOP alone does not effectively improve the positioning accuracy in the NLOS condition. Since the ranging value is directly affected by NLOS, Yan Xiaozhen et al. proposed to use the ranging error variance for evaluation and as a basis for the adaptive positioning of anchor nodes [15], but the ranging value variance can easily exceed the threshold when moving fast and can be small when at rest, both of which can degrade the detection effect [16]. Antoine Courtay et al. proposed a method to traverse all combinations of anchor nodes to derive the measured Euclidean distance of all combinations and select the localization value corresponding to the smallest Euclidean distance as the positioning solution [17]; however, this results in a huge computational effort when the number of anchor nodes is large.
Since the distance measurements in the NLOS environment are unreliable, we evaluated the channel state to evade the NLOS condition as much as possible. A channel quality evaluation and anchor node adaptive selection method are proposed in this paper. The channel quality evaluation utilizes the characteristics of the channel impulse response (CIR) to obtain the channel quality. Previous articles usually used machine learning on the CIR for NLOS identification or mitigation instead of numerical expressions and did not use the identification result for positioning [18][19][20][21][22]. Then, the anchor nodes with poor channel quality and large ranging errors are discarded. We show that the remaining anchors could obtain grater accuracy even when the number of active anchors decreases.
The structure of this paper is organized as follows: Section 2 analyzes the CIR characteristics under different channel conditions. Section 3 describes the method design of the UWB indoor optimized positioning method based on channel quality evaluation. Section 4 gives the channel simulations and experiments to evaluate the effectiveness of the method in this paper. Section 5 is the conclusion.

Analysis of the CIR Characteristics under Different Channel Conditions
In NLOS scenes, the propagation path of the electromagnetic waves will be longer when it passes through the medium of obstacles, thus bringing a time delay. In addition, the medium will decrease the propagation speed of electromagnetic waves, as well as produce a time delay. The increased ranging error L is shown in Equation (1) after penetrating the medium with thickness L: where L is the increased estimated distance corresponding to the time delay caused by the medium, L is the thickness of the medium, c, v are the speed of light in air and in the medium, respectively, and ε r is the relative permittivity of the medium. When the medium is concrete, its relative permittivity ε r is about 7.9 [23], causing a ranging error L of about 1.8-times the thickness of the medium. Thus, if the signal is blocked by a concrete pillar or wall of a house, this will still lead to a considerable ranging error even when the signal has successfully penetrated.
When the power of a direct signal passing through an obstacle is attenuated below the detection threshold of the receiver, the multipath signal will be detected as the direct path's signal. These multipaths are determined by the environment, and the first multipath signal that exceeds the detection threshold is detected as the direct path and used for distance measurement. Since the propagation time of the multipath will be longer than the direct path, this will lead to a larger ranging error.
Therefore, in UWB positioning, NLOS is the main reason for ranging errors, and ranging errors lead to positioning errors. With redundant ranging anchor nodes, selecting the anchor nodes that are more likely to be the line-of-sight (LOS) case is a better way to improve positioning accuracy. It is necessary to make a judgment about the channel situation before choosing the anchor nodes. At present, there are many methods to identify LOS/NLOS, which can identify or mitigate the error caused by NLOS through the channel characteristics. The CIR can effectively reflect the characteristics of the channel, so it is often used for LOS/NLOS identification. The CIR's recognition of LOS/NLOS is generally divided into two categories: 1.
Machine learning [18,19] or neural networks [20] were usually used in previous papers for LOS/NLOS identification, which combined with the CIR characteristics, can achieve better results [24]. These methods need to be trained for specific scenes and have poor environmental adaptability [25]. These articles showed that the ranging errors were correlated with the CIR characteristics; 2.
The normal method of NLOS identification by extracting some CIR characteristics.
The article [21] logged the distribution for five characteristics determined by the CIRs, then the thresholds were used to determine whether a certain measurement was either LOS or NLOS. Kegen Yu used the Pearson correlation coefficient to calculate the correlations between different features [22]. These methods are simple enough to operate in low-cost UWB devices. However, these methods are dependent on the thresholds that are relevant to the environment. Table 1 compares the mentioned methods. To identify CIR characteristics suitable for the evaluation of the channel quality, we analyzed several typical channel conditions. The CIR represents the time-domain response of an impulse after reaching the receiver through the channel, and it contains the propagation characteristics of the signal through the channel, which is expressed as: where K denotes the number of multipaths, a k (t, τ) denotes the change in magnitude due to the kth path, −jπ f c τ k (t) denotes the phase shift due to the propagation of the kth path, φ k (t, τ) is the phase shift added to the kth path, and τ k (t) denotes the kth path resulting in the time delay. Since the channel can be considered as a time-invariant channel in a short time, it can be simplified as: The UWB signal in the IEEE 802.15.4-2011 standard has a preamble, which consists of a trinary-complete sequence. This sequence is a pseudo-noise (PN) sequence with excellent autocorrelation properties, whose correlation result will be maximum when fully aligned, and nearly zero when unaligned. The periodic autocorrelation function of the trinary-complete sequence is: where m is an odd number, q = ps, p is an odd and prime number, and s is an integer. At the receiver, the same ternary-complete sequence with equal amplitude generated locally is cross-correlated with the receiving sequence. Peaks emerge only when the corresponding signal is received, and the time delay of the peak corresponds to the time delay of the multipath. In this way, the CIR of the channel can be obtained.
Ideally, when there are only direct waves between the transmitters and receivers without any reflection, refraction, scattering, or diffraction, for example, in an anechoic chamber, the CIR signal will only have one peak. As shown in Figure 1a, this CIR characteristic represents the best channel quality, which could be a standard.
In reality, the CIR corresponding to LOS is shown in Figure 1b. The first peak above the detection threshold is called the first path. The direct path is the shortest, so the first path in the case of LOS is the direct path, which is marked as 1 in Figure 1b. In this case, the distance can be calculated by multiplying the delay of the direct signal with the speed of the electromagnetic waves. Therefore, the ranging error is directly related to the delay of the direct path, and the multipath signals after the first path do not affect the ranging if the direct path can be detected.
However, ranging errors occur when there is no direct path between two devices (e.g., when they are obstructed by metal plates or concrete walls). Compared with the direct signal 1 in Figure 1b, the direct signal 1 in Figure 2a has a significant attenuation after penetrating the obstacle. In LOS, the maximum peak represents the first path's signal, while in NLOS, the first path's signal is no longer the maximum peak after attenuation, causing a larger delay between the maximum peak's and the first path's signal's appearance time.
When the environment becomes more complex, the probability of an increase in ranging error becomes greater. As shown in Figure 2b, as the complexity of the environment increases compared with Figure 2a, the number of multipaths increases, so there are more peaks representing multipaths in the CIR. Supposing the powers of the first path's signal 1 and the multipath signal 2 is similar to those in Figure 2a, a new multipath signal 3 is detected, resulting in a larger total power of the multipath signal and a decrease in the power ratio of the first path 1 . It can be concluded that once the NLOS condition occurs, the ranging measurements become unreliable. There are some characteristics of the CIR change relevant to NLOS. Firstly, the magnitude of the direct path decreases significantly after passing through an obstacle. Secondly, as the environment becomes more complex, the power of the multipath signal increases, causing a lower power ratio of the first path's signal. Thirdly, the first path will not be the strongest path due to attenuation in NLOS, and the closer the spread time between the strongest path and the first path is, the more likely it is that the LOS case will have a smaller error, and vice versa. Therefore, to evaluate the ranging error caused by NLOS, we can use the power ratio of the first path's signal in the CIR signal, the spread time between the first path and the strongest path, and the similarity between the CIR to be evaluated and the CIR of the standard channel quality.

Methods
As analyzed above, the channel quality related to ranging errors can be evaluated based on the specific characteristics of the CIR, so an improved UWB indoor positioning method through channel quality evaluation and anchor node selection is proposed. This method is shown in Figure 3. In this figure, the CIR is used as the input of the system, which passes through three modules of channel quality evaluation, anchor node selection, and positioning.

Channel Quality Evaluation Method
In the channel quality evaluation module, the CIR data undergo signal pretreatment and the characteristic factors' calculation, evaluating the channel quality factor of each couple of unknown nodes and anchor nodes. The channel quality evaluation results given by the proposed method can evaluate the ranging reliability under the current UWB channel condition. The bigger the value of the channel quality evaluation is, the higher the possibility of a smaller ranging error is, and vice versa.
The signal pretreatment procedure includes signal detection, peak detection, first path detection, filtering noise, extracting the CIR peaks, and the first path's signal to calculate the channel quality evaluation results.
Normally, the UWB chip adopts correlation reception, which can obtain the CIR data at the same time. The distance can be estimated after the first path detection of the CIR. In the proposed method, to reduce the influence of noise, signal detection is adopted before first path detection. Since the existence and a priori information of the signal is unknown, detection with a fixed threshold cannot yield good results. In this case, adaptive threshold detection is a better choice, such as constant false alarm rate (CFAR) detection.
Since the detection of the multipath signals in the CIR is a multi-target detection, to extract all multipath signals for after processing, we used ordered statistic CFAR (OS-CFAR), which has a better effect on multi-target detection to detect the signals. The principle of OS-CFAR is to sort the reference cell sampling values x 1 , x 2 , · · · , x N from smallest to largest and use the kth sampling value x k as an estimate of the noise power level Z. The PDF of Z is: where f 0 (z) is the noisy PDF and F 0 (z) is the noisy CDF. Then, the false alarm probability is: By setting a false alarm probability, OS-CFAR obtains an adaptive threshold. Signal detection with OS-CFAR is shown as Equation (7). The CIR below the threshold will be set to zero, and values exceeding the threshold will be retained.
where h(n) is the discrete CIR signal obtained by the receiver and the threshold is the decision threshold calculated by OS-CFAR. After signal detection, the algorithm finds peaks and chooses the first peak beyond the threshold as the first path's signal. A real signal pretreatment result is shown in Figure 4. The first of which is the detected first path's signal. The detected signal with the largest amplitude is called the strongest path. To evaluate the channel quality effectively, three characteristics of the CIR are extracted and weighted in the characteristic factors' calculation procedure. The following mentioned CIRs in this section are all h (n) after the signal pretreatment procedure.
The first characteristic, called the ideal channel factor A, represents the similarity between the CIR to be evaluated and the template CIR. The template CIR is detected in an LOS open environment without multipath transmission. The template is stored as static data named template M after denoising by the detection module. To obtain the ideal channel factor, the measured data are correlated with the template M. This ideal channel factor indicates the similarity between the CIR to be evaluated and the CIR of the channel quality. The higher the similarity is, the higher the possibility of the LOS scene might be; thus, the estimated distance value is more reliable. It is calculated as shown in Equation (8): where µ M and σ M are the mean and standard deviation of a template CIR M, respectively, and µ S and σ S are the mean and standard deviation of the CIR S to be evaluated; the CIR data come from Equation (7). The second characteristic, called the power dispersion factor B, represents the ratio of the first-path power to the received power. Since the UWB indoor channel has the property of double exponential fading, as shown in Figure 1a, in the LOS case, the energy will be concentrated near the first path, and the first path's energy ratio will be high. As analyzed in Section 2, when the NLOS case occurs, the energy ratio of the multipath signal will increase, resulting in a decrease in the ratio of the first path's signal power to the total received power. It is calculated as shown in Equation (9): where A FP is the amplitude of the first path's signal, A i is the amplitude of each peak, and N is the total number of CIR data points. The third characteristic is called the first path's intensity factor C, which represents the appearance time between the first path and the strongest path. It is calculated as shown in Equation (10): where Index FP , Index PP are the index values corresponding to Equation (7), the first and strongest paths, respectively, and N is the total number of CIR data points. As analyzed in Section 2, in the condition of LOS, the first path is the strongest path, then the first path's strength factor is one. In the condition of NLOS, the appearance time between the first path and the strongest path becomes longer; thus, the first path's strength factor is smaller than one.
Since the three factors are not reliable individually, the final channel quality evaluation results are obtained by a weighted equation shown in Equation (11).
where A, B, C are from Equations (8)-(10), respectively, and the empirical weights a, b, c proposed in this paper are: a = 0.5, b = 0.2, c = 0.3.

Anchor Node Selection Method
Assume that there are redundant anchors, i.e., the number of anchor nodes is greater than four, that can observe the target in the scene. Actually, based on the geometry of 3D positioning, four anchor nodes are enough. In practice, if the data of the anchor nodes with larger ranging errors are used in positioning, a larger positioning error might be brought to the final result. Therefore, we selected the anchor nodes with a lower ranging error to form the positioning equation.
The selection method in this paper is shown in Figure 5. A set of CIR data is provided by the front end, then OS-CFAR can calculate a detection threshold by Equations (5) and (6) as the blue line shown in Figure 4. After that, the value of the CIR below the threshold will be zero by Equation (7). The pre-processed CIR data are used to calculate the factors A, B and C by Equations (8)- (10). The three factors are weighted to obtain Q by Equation (11). The Q of the last N evaluations are averaged to determine the current channel quality. To reduce the computational complexity, we selected four anchor nodes that exactly satis-fied the position solving from all anchor nodes that can detect the unknown nodes for positioning. The averaged results not exceeding the threshold indicate a poor channel quality, and the four anchor nodes with the best channel quality were selected to form the positioning equation. The averaged results exceeding the threshold indicate a good channel quality, and due to the influence of the DOP, the anchor nodes in proximity will have a better positioning effect, then the four anchor nodes with the smallest ranging values were selected to form the positioning equation.

Positioning Solution Method
A least-squares estimator was used here to solve the positioning equations formed by the selected anchor nodes. The ranging value and anchor node position are noted as d i and (x i , y i ) respectively, and the position of the tag is (x,ŷ).
This equation can be translated into: This can be written in matrix form: where, Then, the least-squares solution is:

Simulation of the Channel Quality Evaluation Methods
IEEE 802.15.4a designed by the IEEE committee provides a channel model that inherits the S-V model of multipath signals in clusters with double-exponential fading [26]. The IEEE 802.15.4a Working Group has uploaded the corresponding channel model codes to the public server of the IEEE Standards Association; thus, the channel model settings are published. The simulation of the CIR generation was based on these published codes; see the details in the Supplementary Materials.
The simulation part of this paper used the IEEE 802.15.4a model to simulate the channel. The simulation settings are shown in Table 2. The channel quality evaluation algorithm in this paper was used to evaluate 1000 CIRs for each case generated by the model, and the results are shown in Figure 6. The solid blue line in the figure is the evaluation result, and the black dashed line is the evaluation result after a sliding average of 10 evaluation results. The results showed that the average Q value was around 0.7 in the office LOS condition and 0.5 in the NLOS condition and around 0.6 in the outdoor LOS condition and 0.5 in the NLOS condition. The results showed that the channel evaluation algorithm proposed in this paper can roughly distinguish the LOS/NLOS cases in both office and outdoor conditions.

Experiments
To verify the proposed method. Two experiments were carried in a corridor and a hall, respectively. The values of the channel quality evaluation method used in real time were the same as those in Table 2, except the channel model settings. The threshold T q of the anchor node selection method used in real time was 0.3. The UWB chip used in the experiments was DW1000, which was designed according to the IEEE 802.15.4-2011 stan-dard. The experiments were divided into two steps: firstly, the ranging experiment showed the effectiveness of the channel quality evaluation algorithm; secondly, the positioning experiment showed that the accuracy of positioning could be improved by the proposed channel-quality-evaluation-based anchor node selection method.

Ranging Experiments
The ranging experiments were conducted in a hall and corridor, as shown in Figure 7. The LOS and NLOS ranging experiments were conducted at a distance of 1~9 m in 2 m steps, totaling 20 experimental positions, 30 ranges per position. The LOS and NLOS conditions are plotted in the same graph, and the scatter plots are shown in Figure 8. The horizontal axis is the ranging errors; the vertical axis is the Q values; the blue o indicates the experimental data; the red line is the regression line generated from these experimental data.  The results in Figure 8 show that the channel quality and ranging error were negatively correlated, which means the channel quality evaluation method proposed in this paper can effectively evaluate the credibility of the ranging under the current UWB channel conditions. The bigger the value of the channel quality evaluation Q is, the higher the possibility of a smaller ranging error is, and vice versa.
In order to further show the relationships between the channel quality evaluation results and the LOS/NLOS conditions, the cumulative distribution function (CDF) of Q is shown in Figure 9. The left figure shows the experiment result in the hall, and the right figure shows the experiment result in the corridor. Q related to the LOS condition is plotted by a blue line, while Q related to the NLOS condition is plotted by an orange line. It can be seen from Figure 9 that LOS/NLOS can be distinguished easily by the channel quality evaluation Q.

Positioning Experiments
To evaluate the effectiveness of the method, experiments were conducted in a hall. As shown in Figure 10a, the hall has a large number of metal decorations and padded chairs, a load-bearing column in the middle of the hall, and a block of glass at the back of the hall, which together form a very complex environment.
The real coordinates of the arranged anchor nodes were calibrated by an electronic total station. The anchor nodes and experimental position are marked in Figure 10b. The heights of the anchor node and the tag are 1.6 m and 1.43 m, respectively. The positioning experiments were conducted by placing tag at Points 1~12. After the ranging and CIR data were transmitted, the locations of the tags were solved by a basic method without any anchor node selection and by the proposed anchor node selection method, respectively. The root-mean-squared error (RMSE) of the location was averaged over 1000 independent experiments and shown in Figure 11. The heights of the blue bars represent the RMSEs of the location of using all six anchor nodes' data, and the orange bars represent the RMSEs of the location of the proposed method. The result showed that the proposed method can reduce the positioning error in most of the cases. On average, it can reduce the RMSE by 40.4%. In some specific cases, such as Position 1, the error was reduced by 95.78%. Most channel quality evaluation results given by the proposed method can effectively evaluate the ranging reliability under current the UWB channel condition, despite the bias of the evaluated Q caused by interference existing in the specific experiments. In order to analyze the relationships between the channel quality evaluation results and the LOS/NLOS conditions, we plot the typical CDF of Q at Positions 1, 4, 5, and 8 in Figure 12 according to the real LOS/NLOS condition. Q related to the LOS condition is plotted by the blue line, while Q related to the NLOS condition is plotted by the orange line in this figure. It can be seen from Figure 12 that although a few Q values of LOS were smaller than those of NLOS at Position 1, most LOS/NLOS conditions could be distinguished easily by the channel quality evaluation Q, so that the RMSEs of these positions were improved significantly, as shown in Figure 11.

Conclusions
A channel-quality-evaluation-based anchor node selection method was proposed in this paper for UWB indoor positioning. The channel quality was evaluated by a weighted equation with the ideal channel factor, the power dispersion factor, and the first path strength factor. All the factors were obtained by extracting the characteristics of the CIR. The anchor nodes with a higher channel quality were selected adaptively to form the positioning equation, and we showed by experiments that higher accuracy could be obtained by applying the proposed method. The experimental results showed that the RMSEs of the positioning results were reduced by 40.4% on average and 95.78% in some cases.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: CFAR Constant false alarm detection CIR Channel impulse response DOP Dilution of precision INS Inertial navigation system LOS Line-of-sight NLOS Non-line-of-sight PN Pseudo-noise RMSE Root-mean-squared error UWB Ultra-wideband CDF Cumulative distribution function