## 4 UWB Indoor Positioning System
### UWB Ranging Algorithms  
IPS ranging algorithms can be basically classified into four categories based on their underlying principle--time, signal, angulation, and proximity detection--as illustrated in Figure 6. Time-based algorithms include time of arrival (ToA), time difference of arrival (TDoA), two-way (TW)-ToA and phase of arrival (PoA). Signal-based algorithms rely on RSSI and channel state information (CSI). Angulation-based algorithms use angle of arrival (AoA) and angle of departure (AoD) to determine position. Proximity detection-based techniques use RSSI and Cell-ID. ToA, TW-ToA, TDoA, AoA, and RSSI are commonly used with UWB in the literature. In the upcoming sections, we will discuss these methods in detail. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Group** & **Channel** & **Center** & **Bandwidth** & **Mandatory** \\
**Band** & **Number** & **Frequency** & **(MHz)** & **/Optional** \\ \hline Sub-GHz & 0 & 499.2 & 499.2 & Mandatory \\ \hline \multirow{4}{*}{Low} & 1 & 3494.4 & 499.2 & Optional \\  & 2 & 3993.6 & 499.2 & Optional \\  & 3 & 4492.8 & 499.2 & Mandatory \\  & 4 & 3993.6 & 1331.2 & Optional \\ \hline \multirow{4}{*}{High} & 5 & 6486.6 & 499.2 & Optional \\  & 6 & 6988.8 & 499.2 & Optional \\  & 7 & 6489.6 & 1081.6 & Optional \\  & 8 & 7488.0 & 499.2 & Optional \\  & 9 & 7987.2 & 499.2 & Mandatory \\  & 10 & 8486.4 & 499.2 & Optional \\  & 11 & 7987.2 & 1331.2 & Optional \\  & 12 & 8985.6 & 499.2 & Optional \\  & 13 & 9484.8 & 499.2 & Optional \\  & 14 & 9984.0 & 499.2 & Optional \\  & 15 & 9484.8 & 1354.97 & Optional \\ \hline \hline \end{tabular}
\end{table} 
Table 2: UWB PHY channel definitions. * **Time of Arrival (ToA):** According to [67], the majority of UWB-based IPSs employ the ToA algorithm to determine the position of mobile tags. This is because the positioning algorithm is simple to implement and provides high accuracy. The ToA algorithm measures the flight time between the anchors and tags and calculates the estimated range between each anchor and tag as illustrated in Figure 7a. The clocks of the anchors and tags are synchronized precisely, and a timestamp is sent from the \(i\)-th tag to the \(j\)-th anchor. The \(j\)-th anchor then sends back a reply after processing the timestamp, with \(T_{reply_{j}}\) denoting the processing time of the \(j\)-th anchor. Let \(T_{round_{i}}\) be the total time taken by the \(i\)-th tag, the total propagation time for \(\tau_{ij}\) the \(j\)-th anchor, and the \(i\)-th tag can be expressed as \[\tau_{ij}=\frac{T_{round_{i}}-T_{reply_{j}}}{2}.\] (2) The estimate range \(d_{i,j}\) between the \(i\)-th anchor and \(j\)-th tag can be determined as \[d_{i,j}=c\times\tau_{i,j},\] (3)  
Figure 5: Basic elements of UWB positioning system. Figure 6: Classification of localization algorithms. where \(c=3\times 10^{8}\) m/s representing the speed of light. The above equations reveal that the ToA algorithm is susceptible to errors resulting from time measurements. A 1 \(\upmu\)s time measurement error can result in an error of 300 m using RF wave velocity. Therefore, the ToA algorithm requires precisely synchronized clocks for both anchors and tags, which can be challenging in terms of hardware design and cost effectiveness. After determining the estimated range between each anchor and tag, trilateration theory can be employed to calculate the position of the mobile tag using the ranges obtained from more than three anchors at fixed known locations as shown in Figure 7b. To estimate the position of the \(i\)-th tag with respect to the \(j\)-th anchor, let us set the coordinates of the \(j\)-th anchor as \((x_{j},y_{j})\) and being fixed in known positioning. Set the coordinates of the \(i\)-th tag as \((\hat{x}_{i},\hat{y}i)\), where \((\hat{\cdot})\) denotes the estimated position. The position of the tag is estimated by intersecting circles (in 2D) or spheres (in 3D) with radii \(d(i,j)\) and \(d(i,j,k)\), respectively.