# Precise Positioning of Autonomous Vehicles Combining UWB Ranging Estimations with On-Board Sensors
## 4 Design of the Outdoor Positioning System
### Proposed Algorithm for Post-Processing the UWB Ranging Estimates  
As previously mentioned, post-processing the UWB ranging estimates is necessary to eliminate the Non Line-Of-Sight (NLOS) measurements. The objective is to avoid using high error data in the EKF correction phase that can lead to the filter divergence. Basically, this algorithm is based on two steps, see Figure 4.  
The first step consists on an orientation detection depending on the relative orientation between the anchor and tag antennas. Note that, this detection is made by knowing the direction followed by the RC car and the spatial orientation of the UWB nodes located on the RSUs with regard to the UWB tag. By combining these data, it is possible to detect the UWB ranging estimations of those UWB anchors that are facing the UWB tag. In the used setup, see Section 5.2 for further details, two UWB anchor nodes and one Road Side Unit (RSU) were located on a gantry pole. Thus, each gantry pole includes two different UWB anchor nodes with a different position and orientation. Therefore, due to this difference in the position and orientation of the UWB anchor nodes there are two possible situations, see Figure 5. It is important to highlight that the black arrows situated near the UWB nodes represent the direction in which their antennas are pointing. Whereas, the opposite planes to the arrows direction represent the antennas ground planes. On the one hand, Figure 5a shows the first possible situation regarding the relative orientation between the tag antenna and the anchors ones. In this case, the antenna of Anchor 1 is directly pointing to the tag antenna. Whereas, Anchor 2 antenna is not directly pointing to the tag antenna. In the situation in which the anchor antenna is not pointing to the tag, there is a higher probability of obtaining NLOS UWB ranging measurements. Therefore, the implemented orientation detection  
Figure 4: Architecture of the post-processing algorithm of the UWB ranging estimates. Figure 3: Representation of the proposed Extended Kalman Filter. algorithm will only take into account the UWB rangings estimates provided by the anchor whose antenna is directly pointing to the UWB tag node, not considering the ones provided by the other anchor. Meaning that, in this situation, only the UWB ranging estimates provided by Anchor 1 will be taken into account. On the other hand, Figure 4(b) shows the second possible situation that can occur due to the used setup. In this case, the algorithm for the orientation detecion will only take into account the UWB ranging estimates of Anchor 2 since its antenna is directly pointing to the tag. Thus, the UWB ranging estimates of Anchor 1 will be discarded. The second step is to detect and discard the NLOS UWB ranging estimates. To do so, the implemented algorithm computes the distance, \(\rho_{k-n}\), between the anchor that takes part on the evaluated UWB ranging estimate and the UWB tag at timestamp \(k-n\), being \(n\) the n-instants that have elapsed since applying the previous correction phase of the EKF. This distance is assumed to be the real distance between both UWB nodes at timestamp \(k-n\). This distance is computed by using the tag position at timestamp \(k-n\) and the anchor position that takes part in the evaluated UWB ranging estimation. \[\rho_{k-n}=\sqrt{(x_{tag_{k-n}}-x_{an})^{2}+(y_{tag_{k-n}}-y_{an})^{2}}. \tag{6}\]  
Note that, if the elapsed time between \(k-n\) and \(k\) is larger than a maximum time limit, it is assumed that the tag position at timestamp \(k-n\) cannot be used to classify the new UWB ranging estimate. Therefore, this new UWB ranging estimate is assumed as a LOS measure and the correction phase of the EKF is applied. This maximum time limit is highly related with the vehicle's speed. Meaning that,  
Figure 5: Possible situations regarding the relative orientation of the UWB anchors and tag antennas. it will be higher if the vehicle's speed is lower because the vehicle's positions at timestamps \(k-n\) and \(k\) will be closer, and higher otherwise.