# Location-Aware Point-to-Point RPL in Indoor IR-UWB Networks
## 3 UWB-Based Cooperative Multi-Hop Self Localization
### UWB-Based Bounding-Box Multi-Hop Positioning  
The B-box state, which represents a constraint on the actual position of a node, is defined as follows:  
\[\textbf{B}_{j}\equiv\begin{bmatrix}x_{j}^{lb}&x_{j}^{ub}&y_{j}^{lb}&y_{j}^{ub} \end{bmatrix}^{T},\quad j=1,\cdots,N \tag{1}\]  
where \(\textbf{B}_{j}\) represents the B-box state of node \(\eta_{j}\), \(lb\) and \(ub\) represent the lower and upper bounds on the position constraints. When the actual position coordinate of node \(\eta_{j}\) is \(\left(x_{j}^{a},y_{j}^{a}\right)\), the constraints of \(x_{j}^{lb}\leq x_{j}^{a}\leq x_{j}^{ub}\) and \(y_{j}^{lb}\leq y_{j}^{a}\leq y_{j}^{ub}\) must be satisfied.  
For anchor nodes, the actual position coordinates are used as the B-box state as follows:  
\[\textbf{B}_{j}=\begin{bmatrix}x_{j}^{a}&x_{j}^{a}&y_{j}^{a}&y_{j}^{a}\end{bmatrix} ^{T},\quad\eta_{j}\in\Omega_{a} \tag{2}\]  
Non-anchor nodes periodically update the B-box state by observing B-box information of nearby nodes. All nodes participating in the bounding-box algorithm recursively share B-box information with their neighbors. When a newly joined non-anchor node \(\eta_{j}\) observes B-box information of nearby node \(\eta_{j}\), the information includes the B-box state of node \(\eta_{i}\) and the measured distance between the two nodes.  
\[I_{ij,k}\equiv\left\langle\textbf{B}_{i,k},d_{ij,k}\right\rangle,\quad\eta_{i }\
eq\eta_{j} \tag{3}\]  
Figure 1: Ultra WideBand (UWB)-based cooperative multi-hop positioning.  
where \(I_{ij,k}\) is the B-box information of node \(\eta_{i}\) observed by node \(\eta_{j}\) at the \(k\) th discrete time iteration, and \(d_{ij,k}\) is the measured distance value between the two nodes. Observing \(I_{ij,k}\), node \(\eta_{j}\) can initialize its B-box state as follows:  
\[\textbf{B}_{j,k}=\begin{bmatrix}x_{i,k}^{lb}-\left(d_{ij,k}+\delta\right)\\ x_{ijk}^{ub}+\left(d_{ij,k}+\delta\right)\\ y_{i,k}^{lb}-\left(d_{ij,k}+\delta\right)\\ y_{i,k}^{ub}+\left(d_{ij,k}+\delta\right)\end{bmatrix} \tag{4}\]  
where \(\delta\) is the absolute value of the worst negative-biased distance error that can occur in a UWB-based ranging process. In this paper, \(\delta\) is set to 60 cm based on the ranging experiments with Decawave DW1000 modules [7]. The margin value \(\delta\) prevents the B-box of nodes from becoming invalid due to ranging errors. Because the ranging error of the UWB system is typically biased on positive sides, it is possible to have a small margin value in the B-box algorithm [8; 10; 11; 19]. If the B-box state of node \(\eta_{j}\) has already been initialized in the previous time slot, node \(\eta_{j}\) can update its B-box state using \(I_{ij,k}\).  
\[\textbf{B}_{j,k}=\begin{bmatrix}max\left(x_{j,k-1}^{lb},x_{i,k}^{lb}-\left(d_{ ij,k}+\delta\right)\right)\\ min\left(x_{j,k-1}^{ub},x_{i,k}^{ub}+\left(d_{ij,k}+\delta\right)\right)\\ max\left(y_{j,k-1}^{lb},y_{j,k}^{lb}-\left(d_{ij,k}+\delta\right)\right)\\ min\left(y_{j,k-1}^{ub},y_{i,k}^{ub}+\left(d_{ij,k}+\delta\right)\right)\end{bmatrix} \tag{5}\]  
Figure 2 shows the process of determining the B-box state of non-anchor nodes. After the ranging session with anchor nodes, only some nodes near the anchors will have the initial B-box state. To broaden the positioning service coverage and gradually improve the positioning accuracy, it is necessary to perform additional B-box updates. As non-anchor nodes repeatedly share the initialized B-box state, more and more nodes can determine their B-box states through the network-wide B-box updates.