A Succinct Method for Non-Line-of-Sight Mitigation for Ultra-Wideband Indoor Positioning System

Ultra-wideband (UWB) is a promising indoor position technology with centimetre-level positioning accuracy in line-of-sight (LOS) situations. However, walls and other obstacles are common in an indoor environment, which can introduce non-line-of-sight (NLOS) and deteriorate UWB positioning accuracy to the meter level. This paper proposed a succinct method to identify NLOS induced by walls and mitigate the error for improved UWB positioning with NLOS. First, NLOS is detected by a sliding window method, which can identify approximately 90% of NLOS cases in a harsh indoor environment. Then, a delay model is designed to mitigate the error of the UWB signal propagating through a wall. Finally, all the distance measurements, including LOS and NLOS, are used to calculate the mobile UWB tag position with ordinary least squares (OLS) or weighted least squares (WLS). Experiment results show that with correct NLOS indentation and delay model, the proposed method can achieve positioning accuracy in NLOS environments close to the level of LOS. Compared with OLS, WLS can further optimise the positioning results. Correct NLOS indentation, accurate delay model and proper weights in the WLS are the keys to accurate UWB positioning in NLOS environments.


Introduction
In recent decades, the Internet of Things (IoT) and intelligence industry developed rapidly. Indoor position systems (IPSs) are essential technological infrastructures for them. Both industry and academia are improving the accuracy of IPSs by using different technologies and algorithms to expand their application scenarios [1]. The Global Navigation Satellite System (GNSS) can provide positions, time service and navigation in the outdoor environment. In the indoor area, buildings block the satellite signal leading to poor accuracy, so GNSS is not a good choice for IPSs [2]. The mainstream of indoor technology mainly classifies two categories; the first one uses the principle that sound and light will reflect when encountering obstacles, with the representation of ultrasound and optical systems. The range information can be derived to resolve the target coordinates by measuring the fly time of the sound or light. Although these systems can be applied to some unstructured and uncertain environments depending on their mapping ability, a serious drawback is that ultrasound and light cannot penetrate the obstacles, which limits those techniques to apply to IPSs [3]. The second category uses the radio signal to locate the target, such as WiFi [4,5], Bluetooth [6,7] and Ultra-wideband (UWB). Many previous research works explained the advantages and disadvantages of these methods in detail. Applying WiFi to IPSs has the following benefits: wide distribution, low hardware cost, and high flexibility, but there are still some challenges like multipath, low accuracy and device heterogeneity [4]. The main advantages of Bluetooth technology are low hardware cost, low energy consumption, small size and high security [6][7][8]. On the other side, it still has some unavoidable drawbacks, like the calculation of the fingerprint algorithm increases dramatically when placed in a large indoor area. Furthermore, it is hard to improve the position accuracy to a centimetre lever [7]. UWB technology is up-and-coming for IPSs compared with those technologies.
UWB is a feasible technology for localisation and target tracking on account of properties. For instance, the UWB uses an extensive baseband to communicate between tags and anchors. The baseband pulse duration is nanoseconds, so the UWB has a high time resolution to tackle the problem of multipath and through wall propagation [9]. UWB has the same virtues of low power consumption and hardware costs like Bluetooth and WiFi but more accuracy.
Time of Arrival (TOA) [10,11], Time Difference of Arrive (TDOA) [12], Angle of Arrival (AOA) [12], and Two Way Range (TWR) [13] are the commonly used algorithms for UWB IPSs. The range measurements are derived from the signal's time of flight (TOF) between fixed anchors and mobile tags. So, any factors that affect the TOF measurement will impact the accuracy of the measured distance and the position, such as multipath, non-line-of-sight (NLOS), rugged to synchronise between tags and anchors, and interference by other radio waves [14]. The range error caused by NLOS appears when the direct path of the signal between tags and anchors is blocked, and the measured TOF includes extra time delay. The range error of NLOS is always an enlargement and can reach a few meters, which is the most significant factor harming the accuracy of UWB IPSs. In addition, NLOS is unavoidable in real scenarios, so the reduction of NLOS error is of great importance.
Improving the performance of UWB IPSs in the NLOS environment can be divided into two steps, identification and mitigation. Many approaches have been proposed to identify the NLOS and mitigate its error, which can be grouped into three categories. The first category is to analyse the statistical channel characteristics [15] using machine learning strategies like deep learning [16], Support Vector Machine (SVM) [17] and Import Vector Machine (IVM) [18]. The second category is using external constraints to detect the NLOS and then using the range error model to mitigate it. In the literature [2], the NLOS can be recognised by the different relative heading angle (RHA) as the threshold; the NLOS range error is compensated by experimental methodology. The last category draws support from other sensors and maps. Many auxiliary sensors like IMU [19], V-SLAM [20] and Lidar SLAM [21] have been proposed to cope with the decline in location accuracy of UWB IPSs in NLOS scenarios.
All those methodologies above have some inherent vice. For the first category, simulation results in the [16] show the accuracy of identifying NLOS by different machine learning methods: 86.94% for convolutional neural networks (CNN), 78.51% for stacked long short-term memory (stacked-LSTM) and 84% for combined CNN and LSTM. Some machine learning methods claim can reach 90% accuracy, which positively correlates with the amount of the database. To get the above result in [16], analysing 126,000 channel impulse responses cost CNN 21.84 s, stacked-LSTM over 200 s and CNN + LSTM over 15 s. Due to a large amount of data and the high time cost, those methods are hard to apply to real-time locations that need fast reaction time. The second category has a better response time but still has some limitations. The experiment results in [22] show that over 90% of NLOS cases can be recognised by the Fresnel zone and threshold from prior knowledge. Still, the Fresnel zone has strict restrictions on the application that cannot be widely used in real scenarios. A consensus is that multisensor fusion can improve IPSs' accuracy, availability and reliability [23], which will be the future research plan for this project.
This paper proposes a novel, succinct method to identify and mitigate the NLOS error in real time. The identification step is based on the principle that the measured distance changes rapidly when a switch between NLOS and LOS happens for a moving tag. The variance of the difference of ranges observed from the same anchor between two adjacent time slots is relatively constant in LOS, and it will bump up when a range contains NLOS error. By this means, NLOS can be distinguished. For NLOS error mitigation, we propose a delay model to correct the NLOS range error caused by a wall, which includes the factors of incident angle, wall thickness and material to calculate the delay. The delay model is derived from a significant amount of experimental data. The corrected range data by this model is then used to compute the coordinate of the mobile tag, using ordinary least square (OLS) and weight least square (WLS). Figure 1 is the flowchart of the proposed method. variance of the difference of ranges observed from the same anchor between two adjacent time slots is relatively constant in LOS, and it will bump up when a range contains NLOS error. By this means, NLOS can be distinguished. For NLOS error mitigation, we propose a delay model to correct the NLOS range error caused by a wall, which includes the factors of incident angle, wall thickness and material to calculate the delay. The delay model is derived from a significant amount of experimental data. The corrected range data by this model is then used to compute the coordinate of the mobile tag, using ordinary least square (OLS) and weight least square (WLS). Figure 1 is the flowchart of the proposed method. This flowchart illustrates the strategy to deal with NLOS proposed in this paper. The first step is setting a threshold from prior experience to estimate whether NLOS occurs. If no measurement is affected by NLOS, the tag's position can be computed directly using the OLS range measurements. If UWB IPSs have more than three fixed anchors, even if NLOS happens for some anchors, the OLS algorithm can still accurately position the tag when at least three anchors are in LOS. If the system cannot receive enough LOS range measurements, the data containing NLOS will be processed by the delay estimation model. The delay model will correct those NOLS errors and estimate the uncertainty of the corrected ranges. Then, WLS is applied to calculate the UWB tags' position.
The rest of this paper is organised as follows. Section 2 presents the algorithms used in this paper, including the sliding window method to identify NLOS, the delay model and position algorithms. Section 3 gives the experiment design and results, which verify to what degree the delay model and WLS can improve the position accuracy. Section 4 discusses the limitation of IPSs with only UWB and the future research plan. The last part is the conclusion.

Position Algorithms
The position algorithms used in this paper are OLS for at least three anchors in LOS environments and WLS for less than three anchors in LOS environments. The following figure illustrates the geometric position of fixed anchors and tags. Figure 2 illustrates the geometric relationship between fixed anchors (A, B and C) and a tag (D). The coordinate of anchor n is ( , ) = 1,2,3 …, the coordinate of the tag is (x,y), and is the distance between tags and anchors, which can be computed by Equation (1). This flowchart illustrates the strategy to deal with NLOS proposed in this paper. The first step is setting a threshold from prior experience to estimate whether NLOS occurs. If no measurement is affected by NLOS, the tag's position can be computed directly using the OLS range measurements. If UWB IPSs have more than three fixed anchors, even if NLOS happens for some anchors, the OLS algorithm can still accurately position the tag when at least three anchors are in LOS. If the system cannot receive enough LOS range measurements, the data containing NLOS will be processed by the delay estimation model. The delay model will correct those NOLS errors and estimate the uncertainty of the corrected ranges. Then, WLS is applied to calculate the UWB tags' position.
The rest of this paper is organised as follows. Section 2 presents the algorithms used in this paper, including the sliding window method to identify NLOS, the delay model and position algorithms. Section 3 gives the experiment design and results, which verify to what degree the delay model and WLS can improve the position accuracy. Section 4 discusses the limitation of IPSs with only UWB and the future research plan. The last part is the conclusion.

Position Algorithms
The position algorithms used in this paper are OLS for at least three anchors in LOS environments and WLS for less than three anchors in LOS environments. The following figure illustrates the geometric position of fixed anchors and tags. Figure 2 illustrates the geometric relationship between fixed anchors (A, B and C) and a tag (D). The coordinate of anchor n is (x n , y n ) n = 1, 2, 3 . . ., the coordinate of the tag is (x, y), and d n is the distance between tags and anchors, which can be computed by Equation (1).
where t n is TOF between tag and anchor n, and C is the speed of light.

OLS
OLS is the most common approach for mathematical optimisation. The core of this algorithm is minimising the residual to realise the optimal solution. Equation (2) is the mathematical form for Figure 2.
Equation (2) can draw from the geometric relationship between anchors and tags and expand Equation (2) to get Equation (3).
Use the matrix to represent Equation (3) as follows: In practical application, those three circles have a great chance will not intersect at a point due to the measurement noise [24]. When considering the effect of noise (e), Equation (4) should present as follows: When the partial derivative of squared error is 0, the error value is the smallest.
From the previous equation can calculate the tag coordinate X: The OLS algorithm treats all measurement values equally and can perform well in LOS environments due to the nearly identical noise level. The measurement noise in NLOS environments will interfere with the range value. Thus the OLS may not perform well in NLOS. Contrapose that phenomenon, the WLS algorithm may be more suitable for UWB IPSs in NLOS environments.

WLS
This paper use WLS to calculate the tag's coordinate for further improvement in the NLOS scene. In the NLOS environment, the range value may contain a colossal measurement error that cannot be directly used for position. Giving corresponding weight to different anchors' range values can improve the position accuracy. The method of determining the weights for each measurement will be explained in detail in Section 3.4.
The weight matrix for the measured ranges from anchors can represent by Equation (15).
Based on the OLS, the partial derivative equation of WLS is: The following equation calculates the tag's coordinates: The premise of applying the WLS algorithm is to identify the NLOS accurately because the weights for range values in LOS and NLOS are significant differences.

Proposed Method to Identify NLOS
The proposed method to identify NLOS is based on the variance of the difference in measured distance between two adjacent sample times. The measured distance between anchor and tag at the time n can be modelled asd n which equal to actual distance (d n ) plus measurement noise (ε) in the LOS environment. The measured distance in NLOS (d n ) equal to actual distance (d n ) plus measurement noise (ε) superadd delay caused by NLOS (ε NLOS ). So, the difference in measured distance between two adjacent time slots can be computed as: The UWB module used in this paper is DecaWave DW1000 which is compliant with IEEE 802.15.4-2011 UWB standard [14]. The sampling frequency is 3 Hz, moreover most indoor robot speed is less than 1 m/s, so d n − d n−1 should be a tiny number around a few centimetres. But ε NLOS is around decimetres to a few meters, which is much greater than d n − d n−1 . The method of the sliding window of variance of ∆d n was proposed in this paper to identify NLOS, which is illustrated in Figure 3. The threshold used to estimate the NLOS is the variance of ∆d n measured in a LOS environment (Var(∆d n (LOS))). this paper to identify NLOS, which is illustrated in Figure 3. The threshold used to estimate the NLOS is the variance of ∆ measured in a LOS environment (Var(∆ (LOS))). For further annotation of this method in Figure 3, when a tag was not in NLOS until time slot n, the Var(∆ )) will suddenly increase due to the measured distance was added a huge NLOS error. Indeed, the value of Var(∆ ) will be significantly greater than the threshold. Detecting the Var(∆ ) is bigger than the threshold means this measured data would most probably affect by NLOS. Due to the great measurement noise in NLOS, the measurement range will keep jittering in an extensive range leading to the value of Var(∆ ) still greater than the threshold in this situation. If tag back to LOS from NLOS at time slot k, the value of Var(∆ ) will have a significant drop to be smaller than the threshold. The experiment will verify this strategy to identify the NLOS.

Delay Model for NLOS Mitigation
This paper mainly focuses on the NLOS caused by walls. The strategy to compensate for the NLOS delay is deriving a delay model from measured distance in the NLOS condition. The following figure illustrates the geometric model. is the angle between line and ; is the angle between line and positive y-axis; is the angle between the normal of the wall and ; is the angle between the normal of the wall and . is the thickness of the wall, and is the actual distance of UWB signal propagation in the wall. For further annotation of this method in Figure 3, when a tag was not in NLOS until time slot n, the Var(∆d n ) will suddenly increase due to the measured distance d n was added a huge NLOS error. Indeed, the value of Var(∆d n ) will be significantly greater than the threshold. Detecting the Var(∆d n ) is bigger than the threshold means this measured data would most probably affect by NLOS. Due to the great measurement noise in NLOS, the measurement range will keep jittering in an extensive range leading to the value of Var(∆d) still greater than the threshold in this situation. If tag back to LOS from NLOS at time slot k, the value of Var(∆d k+3 ) will have a significant drop to be smaller than the threshold. The experiment will verify this strategy to identify the NLOS.

Delay Model for NLOS Mitigation
This paper mainly focuses on the NLOS caused by walls. The strategy to compensate for the NLOS delay is deriving a delay model from measured distance in the NLOS condition. The following figure illustrates the geometric model. Figures 4 and 5 show a universal model for all sorts of NLOS caused by a wall. In this model, the wall has an angle θ 3 between the positive x-axis, anchors and tags are at different heights, where A and T represent the anchor point and tag point, respectively. Line TT perpendicular to the wall and AT perpendicular to TT . A is the projection point of A on plan y = tz. θ 1 is the angle between line AT and AT ; θ 2 is the angle between line AT and positive y-axis; θ 4 is the angle between the normal of the wall and A T; θ 5 is the angle between the normal of the wall and AT. d wall is the thickness of the wall, and d NLOS is the actual distance of UWB signal propagation in the wall.
The primary factors leading to NLOS errors are the electrical permittivities and the thickness of a material when the UWB signal propagates through this obstacle. The electrical permittivity for a wall is a constant number in this experiment, and the relative thickness of the wall is increased with the incident angle increasing when the UWB signal penetrates the wall. The NLOS delay model is defined in Equation (19) where ∆d NLOS is the NLOS delay caused by a wall, wall is the permittivity of the wall.   The primary factors leading to NLOS errors are the electrical permittivities and the thickness of a material when the UWB signal propagates through this obstacle. The electrical permittivity for a wall is a constant number in this experiment, and the relative thickness of the wall is increased with the incident angle increasing when the UWB signal penetrates the wall. The NLOS delay model is defined in Equation (19) where ∆ is the NLOS delay caused by a wall, is the permittivity of the wall.
The relationship between , and showing in Equation (23) The delay model is defined as follows:   The primary factors leading to NLOS errors are the electrical permittivities and the thickness of a material when the UWB signal propagates through this obstacle. The electrical permittivity for a wall is a constant number in this experiment, and the relative thickness of the wall is increased with the incident angle increasing when the UWB signal penetrates the wall. The NLOS delay model is defined in Equation (19) where ∆ is the NLOS delay caused by a wall, is the permittivity of the wall.
The relationship between , and showing in Equation (23) The delay model is defined as follows: The relationship between θ 4 , θ 2 and θ 3 showing in Equation (23) The delay model is defined as follows: The measured data were used to ascertain the coefficients A and B in Equation (24), a tag was placed in 45 different positions with various incident angles covering the range from 0 • to 80 • , and the LOS path was blocked by different wall thicknesses (0.16 m and 0.26 m) with permittivity setting to 5.5. At least 60 samples were taken at each position. By computing the fitting equation from those more than 2700 data, the coefficient A equals 0.3459, and B equals 0.2722. Consequently, the corrected distance can calculate by the NLOS delay subtracted from the measurement ranges. As the transmission distance of UWB can reach several tens of meters, this model can be applied to different indoor scenarios, such as smart homes and intelligent warehouses. The model can be applied to homogeneous media, but the coefficients are different for different environments, so it is necessary to collect data to calculate the coefficients before applying the model. This is also an unavoidable disadvantage of the model, as the calculated delays will be inaccurate when the medium is not homogeneous in certain areas. It is difficult to solve all problems with UWB alone, and the best approach is to fuse multiple sensors, which will be discussed in future research.

Experimental Environments and Equipment
This experiment is conducted in an apartment (Figure 6e) with the following dimensions: 7.8 m wide and 5.848 m long, as shown in Figure 6a Table 1.
The purple line in Figure 6a,b are the reference paths, which start from Area 2 to Area 3 through Area 1 and then go back to the endpoint at Area 5 through Area 1 and 4 when reaching the stop point in Area 3. The height of the tag is 1.1 m which has a 0.4 m height difference with fixed anchors.

Experimental Results for Identifying NLOS
In two experiments, use the abovementioned method to identify the NLOS for all anchors when a tag is moving along the reference path. The threshold used in those two experiments can be observed from a prior experiment. The tag moved at a uniform velocity in LOS environments (Area 1) in the prior experiment to measure a group of ranges. The variance of the group range data (0.004) is the threshold in this environment. The results are presented in the following two parts.
The measured data were used to ascertain the coefficients A and B in Equation (24), a tag was placed in 45 different positions with various incident angles covering the range from 0° to 80°, and the LOS path was blocked by different wall thicknesses (0.16 m and 0.26 m) with permittivity setting to 5.5. At least 60 samples were taken at each position. By computing the fitting equation from those more than 2700 data, the coefficient A equals 0.3459, and B equals 0.2722. Consequently, the corrected distance can calculate by the NLOS delay subtracted from the measurement ranges. As the transmission distance of UWB can reach several tens of meters, this model can be applied to different indoor scenarios, such as smart homes and intelligent warehouses. The model can be applied to homogeneous media, but the coefficients are different for different environments, so it is necessary to collect data to calculate the coefficients before applying the model. This is also an unavoidable disadvantage of the model, as the calculated delays will be inaccurate when the medium is not homogeneous in certain areas. It is difficult to solve all problems with UWB alone, and the best approach is to fuse multiple sensors, which will be discussed in future research.

Experimental Environments and Equipment
This experiment is conducted in an apartment (Figure 6e) with the following dimensions: 7.8 m wide and 5.848 m long, as shown in Figure 6a Table 1.
(a) The purple line in Figure 6a,b are the reference paths, which start from Area 2 to Area 3 through Area 1 and then go back to the endpoint at Area 5 through Area 1 and 4 when reaching the stop point in Area 3. The height of the tag is 1.1 m which has a 0.4 m height difference with fixed anchors.   Figure 7 shows the result of NLOS identification for four anchors. We chose 5 sample points for each anchor, which contain LOS and NLOS. The Var(∆d n ) for sample points were shown in the figure and through the different values of Var(∆d n ) we can distinguish whether those points are in NLOS or not.

Experimental Results for Identifying NLOS
In two experiments, use the abovementioned method to identify the NLOS for all anchors when a tag is moving along the reference path. The threshold used in those two experiments can be observed from a prior experiment. The tag moved at a uniform velocity in LOS environments (Area 1) in the prior experiment to measure a group of ranges. The variance of the group range data (0.004) is the threshold in this environment. The results are presented in the following two parts.  The accuracy of identification is calculated by dividing the total sample number by the number of misidentified cases, which is shown in the following Table 2: the number of misidentified cases, which is shown in the following Table 2:  Tables 2 and 3, that the method proposed in this paper is relatively accurate. The worst accuracy of the NLOS identification case is the Anchor 3 in both experiments, which is 90.18% and 88.65%, respectively. The accuracy of other anchors is all over 90% in two experiments.   The misidentified case includes cases in NLOS that did not recognise and in LOS but misjudged into NLOS, which named unidentified point and unexpected point in Figures 7 and 8, respectively. The complex experiment environment containing computers, desks, chairs and other factors will increase the impact of multipath, which may lead to some unexpected points. The velocity of the tag is small during the turning, which is the possible reason for the unidentified point. Considering the impact of the factors above, this accuracy rate of NLOS identification is quite acceptable.

Mitigation Results for Delay Model (Experiment 1)
The experiment applies different position algorithms based on the number of NLOS in corresponding areas. According to the reference path and anchors' position in experiment one, Area 1 has three anchors in LOS (Anchors 0, 1 and 2), which is enough to locate the tag accurately. For Area 2, the delay model was used to correct the range measured by Anchor 3. When the tag moves in Area 3, the UWB signal from Anchors 0 and 2 will be blocked by a 0.26 m concrete wall, the delay model is also applied to those measured data containing NLOS errors. In Area 4, using the range data from Anchors 0 and 1, which are in LOS, can compute two coordinates for the tag, then use the range data of Anchor 2 or Anchor 3 to select the tag's actual coordinate. The worst scenario is in Area 5; the delay model must correct all four anchors in NLOS since a 0.16 m concrete wall blocked all the UWB signals. The following figure and table show the experiment results. Figure 9 visually illustrates the effectiveness of the delay model proposed in this paper. The green line with the dot in Figure 9 shows the tag position and trajectory computed by the measured distance after the delay model correction. It explicitly shows that the position accuracy of the tag was improved in Areas 2, 3, and 5, which applies the delay model to correct data with NLOS delay. Table 4 is the detailly analysis of the experiment results. The first column of Area 1 is the position error using raw data from three LOS anchors (Anchors 0, 1 and 2) and one NLOS anchor (Anchor 3). The second column in Area 1 is the position error only using the range data from those three LOS anchors, and this group data can be used as the control group. It can be found that the NLOS error has a massive impact on position accuracy. With Anchor 3's NLOS error in Area 1, the maximum position error is over 0.8 m, and RMSE is 0.555 m. The UWB IPSs perform better position accuracy after abandoning the range data from Anchor 3; the maximum error and RMSE reduce to 0.361 m and 0.106 m, respectively. The delay model minimises the affection of NLOS for areas that do not have enough LOS data to locate the tag. From Table 2 Another phenomenon that can be found in Figure 9 is the location point of the tag in Area 3 dispersed more widely with the incident angle growth. So the Weight Least Square (WLS) was used in the next step to eliminate the effection of heteroscedasticity.

Mitigation Results for Delay Model with WLS (Experiment 1)
The hinge of WLS is to determine the exact weight for measured distance at different incident angles. The tag position kept jittering due to the measurement range affected by the noise, even though the tag was motionless. The jitter margin of range measurement positively correlates with the incident angle in NLOS caused by a wall. Thus, the variance of the range measurements in a position can be the weight's reference.
In this experiment, weight for measured distance from the fixed Anchors 0, 1, 2 and 3 can be represented as: Setting the variance of measured distance in LOS as the criterion, the weight can compute by the following equation when Tag in NLOS with the incident angle θ.
where Var(d LOS ) is the variance of measured distance in LOS, Var(d θ ) is the variance of measured distance in NLOS with the incident angle θ, W θ is the weight for this NLOS measurement range. In order to find the relationship between weight and incident angle, 30 group data was gathered, which covered incident angles from 0 • to 70 • . Each group of data contains at least 60 samples, so Var(d θ ) can be computed for each angle group, and the weight for different incident angles can be drawn from Equation (26). The following Figure 10 illustrates the relationship between the incident angle and the weight. When the incident angle is less than 40 • , the weight of the measured range can be set to 20; when the incident angle is greater than 40 • , it is evident from the figure that the weight increased with the incident angle, and the weight can be calculated by the fitting equation.
The experiment in this part uses the same measured range data from Section 3.3. According to the relationships between θ and the W θ , assign corresponding weight to the measured range. The measured range with weight can calculate the tag's position by Equation (17). The following Figure 11 and Table 5 show the position results of the delay model with the WLS algorithm.
The blue line with the dot in Figure 11 is the tag position calculated by the WLS algorithm. Compared with the green line (OLS algorithm), the position accuracy of WLS has significant improvement in Areas 2 and 3; also, the detailed data analysis in Table 5 can attest to that. In Area 3, the WLS significantly enhances the position precision, the maximum position error has a nearly 0.3 m reductions (0.603 m to 0.319 m), and the RMSE reduces from 0.244 m (OLS) to 0.132 m (WLS). The maximum position errors were almost equal in Areas 2 and 5, and the average errors and RMSEs slightly decreased using the WLS algorithm. Even the WLS algorithm did not contribute generously to the maximum error, but from average error and RMSE, the position accuracy was improved overall. Hence, the application of WLS further enhances the accuracy and precision of the UWB IPSs in NLOS environments. different incident angles can be drawn from Equation (26). The following Figure 10 illustrates the relationship between the incident angle and the weight. When the incident angle is less than 40°, the weight of the measured range can be set to 20; when the incident angle is greater than 40°, it is evident from the figure that the weight increased with the incident angle, and the weight can be calculated by the fitting equation. The experiment in this part uses the same measured range data from Section 3.3. According to the relationships between θ and the , assign corresponding weight to the measured range. The measured range with weight can calculate the tag's position by Equation (17). The following Figure 11 and Table 5 show the position results of the delay model with the WLS algorithm.  angle, and the weight can be calculated by the fitting equation. The experiment in this part uses the same measured range data from Section 3.3. According to the relationships between θ and the , assign corresponding weight to the measured range. The measured range with weight can calculate the tag's position by Equation (17). The following Figure 11 and Table 5 show the position results of the delay model with the WLS algorithm. Figure 11. Experiment 1 results for the delay model with WLS. Figure 11. Experiment 1 results for the delay model with WLS.

Mitigation Results for Delay Model with WLS (Experiment 2)
To further verify the affection of the delay model and WLS algorithm, an improved experiment was designed in which the coordinate of Anchor 1 was changed to (0.49, 2.65, 1.5), resulting in only one LOS anchor in Area 3. That means the condition for UWB IPSs in Area 3 will be harsher than in Experiment 1. The following Figure 12 illustrates the coordinates of anchors (yellow square), reference path (purple dot line) and experiment results (red, green and blue line).
WLS algorithm. Even the WLS algorithm did not contribute generously to the maximum error, but from average error and RMSE, the position accuracy was improved overall. Hence, the application of WLS further enhances the accuracy and precision of the UWB IPSs in NLOS environments.

Mitigation Results for Delay Model with WLS (Experiment 2)
To further verify the affection of the delay model and WLS algorithm, an improved experiment was designed in which the coordinate of Anchor 1 was changed to (0.49, 2.65, 1.5), resulting in only one LOS anchor in Area 3. That means the condition for UWB IPSs in Area 3 will be harsher than in Experiment 1. The following Figure 12 illustrates the coordinates of anchors (yellow square), reference path (purple dot line) and experiment results (red, green and blue line).  Referring to Figure 12, the red line represents the tag's position and trajectory computed by OLS using raw range data which uses the same strategies in experiment 1. Green and blue lines represent the position and trajectory of the tag, which the delay model corrected the range data, but used OLS and WLS to compute the position, respectively. The main difference between this experiment and experiment 1 is in Area 3. By changing the coordinate of Anchor 1, the tag in Area 3 can only receive one LOS UWB signal. Even so, the delay model and the WLS can mitigate the NLOS error well, which can be observed from the contrast of the three trajectories. Detailed data can be found in Table 6. The second column data in Area 1 is data analysis for the tag's position using only three LOS anchors' range information, which can be the evaluation criteria for other groups. In Area 2, there is only Anchor 3 in NLOS, but this NLOS delay still leads to a maximum 0.416 m position error, the average error and RMSE all over 0.2 m. After using the delay model to correct the range data of Anchor 3, the maximum error reduces to 0.247 m; the average error and RMSE are around 0.1 m by the OLS algorithm. Changing the position algorithm to WLS can further improve the accuracy of the tag; the maximum error is only 0.195 m, and the average error and RMSE can reach the control group's performance in Area 1.
In Area 3, despite moving Anchor 1 to the NLOS environment, the position accuracy remains largely untouched by this change compared to experiment 1. The reason may be that two walls block the direct path between the tag and Anchor 1 entirely, but by multipath, the tag and Anchor 1 still have regular communication. Accordingly, the measurement error of Anchor 1 should be stable, not leading to a vast negatively impact on position accuracy.
For other areas, the order of the performance of those position algorithms is delay model with WLS is the best, and then the delay model with OLS is better than OLS only. However, in Area 5, there is one exception, the maximum error of the delay model with WLS is 0.359 m which is bigger than 0.284 m for the delay model with OLS. The inappropriate weight of some points may cause this exception due to the complex indoor environments. In summary, the delay model with WLS algorithms can enhance the overall accuracy and precision of the UWB IPSs in the NLOS environment.

Discussion
Even though the performance of the delay model with the WLS algorithm is close to the LOS level, the RMSEs in Tables 5 and 6 are all over 0.1 m in Areas 2, 3 and 5. Moreover, the jitter margin of the tag's position in those NLOS areas is still more significant than that in the LOS environment. So some inherent defects have restricted the application of IPSs only using UWB technology. For instance, in the experiment environment, if the tag in Area 5 moves forward to the far right of the map, the communication between the tag and some anchors will be severed by more than one wall or some metals (refrigerator, metal cabinet, rebar in load-bearing wall). Therefore, the UWB IPSs can not provide the tag position on account of lacking enough measured range data in the hash indoor environment.
The same situation happened in Area 4; the signal from Anchors 2 and 3 will block by two walls. The delay model and WLS algorithms cannot handle the data like this. Therefore, in Area 4, we use a different strategy to calculate the tag position. In Area 4, the tag can receive two LOS signals from Anchors 0 and 1. These two measurement ranges in the LOS environments can obtain two coordinates. Range data from Anchor 2 or 3 can select the accurate coordinate for the tag from Anchor 2 or 3. The positioning result using this method in Area 4 can be observed in Figures 11 and 12, and the accuracy was indeed improved than using raw data with OLS. Especially in Figure 12, the accuracy and precision of the tag's position in Area 4 are all the better. This result was predictable because the correct range information calculated the tag's position, so the position result should be as good as in Area 1. Only using range information from LOS anchors can improve the position accuracy if the system has more than one LOS anchor.
The geometric position of the anchors is another factor affecting the position accuracy of UWB IPSs [25]. In experiments 1 and 2, the tag, Anchors 0 and 2, were almost in a line when the tag was moving along the reference path in Area 2. According to the literature [26], these bad anchor placement positions will significantly reduce the position accuracy of the tag. Therefore, the tag in Area 2 can communicate with three LOS anchors, but the position accuracy is still not satisfying.
Even though the methodology used in this paper can improve the position accuracy and precision of UWB IPSs, it is impossible to settle all issues for indoor position systems only relying on one method or sensor. Future research will consider multisensor fusion to enhance position accuracy and system robustness. Different sensors have their own inherent strengths and weaknesses, and multi-sensor fusion allows for complementary advantages and system redundancy [27].
The IMU can autonomously provide the position information which is not disturbed by the outside environment. The IMU can provide acceleration, angle and altitude of the system at a high frequency, but the accuracy of the IMU can be seriously affected by cumulative accelerometer errors, gyroscope drift errors, magnetic field variations, etc. [28]. So IMU is a commendable sensor to support UWB IPSs in the NLOS environment but not for a long time. Another sensor we consider to support UWB IPSs is the wheel odometer. By the Differential Drive Kinematics model, two wheels odometer can offer the distance and yaw for the system. Wheeled odometers are similar to IMUs in that they provide accurate information to the system for a short period of time in the 2D plane, but without correction, the measurement error increases with time. Another problem with wheeled odometers is wheel slip, which can also affect positioning accuracy [29]. A further plan is to combine the camera with UWB/IMU/Odometer IPSs to enable mapping so that this system can operate well in harsh and unstructured environments. The fusion of these sensors can also overcome the problem of cameras failing to find feature points in single environments, leading to positioning failure [30].

Conclusions
This paper proposed a novel and simple method to identify and mitigate the NLOS for UWB IPSs. The strategy to correct the NLOS error is first to identify the NLOS delay by the sliding window, then update the measured range containing the NLOS error by the delay model, further using the WLS algorithm to calculate the tag's position. The experiment results for accuracy of NLOS identification is approximately 90% in a harsh environment, mostly over 90% in a standard indoor environment. The performance of the NLOS delay model was impressive. According to the data in Tables 4-6, the accuracy of tag location in NLOS, which correction by the delay model, has been improved to a certain extent. Although the delay model revised the measured range and improved position accuracy, the location precision is still low. As the green line in Figures 10 and 11, the large jitter margin of the position result remains a problem. The solution is by WLS algorithms to give different weights according to the UWB signal propagation incidence angle through the wall. The test results showed that the delay model with the WLS algorithm could improve the accuracy and precision of UWB IPSs close to the LOS level.