# Collision Avoidance Geographic P2P-RPL in Multi-Hop Indoor Wireless Networks
## 3 Collision Avoidance Geographic Point-to-Point RPL
### IR-UWB-Based Cooperative Multi-Hop Self Localization in LLNs  
Figure 1 describes the proposed IR-UWB-based cooperative multi-hop self-localization system. Each node is location-aware by exchanging the statistical properties of the location error with its neighbors. The UWB radio module provides distance information between the nodes. In a two-dimensional network scenario, each node perceives a rectangular area in which it exists. Despite the short communication range of UWB technology, the proposed algorithm only needs a small number of anchor nodes with known locations. The proposed localization module using UWB radio is based on the Bounding-box (B-box) algorithm [23]. The B-box state represents the rectangular region where each node is located, and the B-box localization module informs the neighboring nodes of its B-box state. For smartphones with UWB transceivers and inertial sensors, a motion tracking  
Figure 1: Impulse-Response Ultra-WideBand (IR-UWB)-based cooperative multi-hop self-localization system. module was added. Pedestrian movement was tracked through particle filtering, and the updated state of the particle set was converted to a B-box state. The B-box state \(\mathbf{B}_{T}\), representing the estimated location region of a node \(T\), is defined as Equation (1). \[\mathbf{B}_{T}= \begin{bmatrix}x_{T}^{lb}&x_{T}^{ub}\end{bmatrix} \times \begin{bmatrix} y_{T}^{lb}&y_{T}^{ub}\end{bmatrix}  \tag{1}\]  
The superscripts \(lb\) and \(ub\) denote the lower and upper bounds of the rectangular area. The actual coordinates of node \(T\), \(\left(x_{T}^{q},y_{T}^{q}\right)\), satisfy \(x_{T}^{lb}\leq x_{T}^{q}\leq x_{T}^{ub}\) and \(y_{T}^{lb}\leq y_{T}^{q}\leq y_{T}^{ub}\). For an anchor node \(A\) with known position coordinates \(\left(x_{A}^{a},y_{A}^{a}\right)\), the B-box state \(\mathbf{B}_{A}\) is determined as  
\[\mathbf{B}_{A}= \begin{bmatrix}x_{A}^{a}&x_{A}^{a}\end{bmatrix} \times \begin{bmatrix} y_{A}^{a}&y_{A}^{a}\end{bmatrix}  \tag{2}\]  
A non-anchor node updates its own B-box state using the B-box information of one-hop neighbor nodes. With the measured distance \(d_{N}\) to node \(N\) and the B-box state \(\mathbf{B}_{N}\), a non-anchor node \(C\) updates its B-box state \(\mathbf{B}_{C}\) as follows [24]:  
\[ \begin{split}\mathbf{B}_{C}\leftarrow&\Big{[}\max\Big{(}x_{C}^{lb},x_{N}^ {lb}-\left(d_{N}+\delta\right)\Big{)}\quad\min\Big{(}x_{C}^{ub},x_{N}^{ub}+ \left(d_{N}+\delta\right)\Big{)}\Big{]}\\ &\times\Big{[}\max\Big{(}y_{C}^{lb},y_{N}^{lb}-\left(d_{N}+\delta \right)\Big{)}\quad\min\Big{(}y_{C}^{ub},y_{N}^{ub}+\left(d_{N}+\delta\right) \Big{)}\Big{]}\end{split}  \tag{3}\]  
The margin value \(\delta\) prevents the B-box state of a node from becoming invalid. According to the worst negative ranging error of the Decawave DW1000 module [25; 26; 27], the experiments in this paper set \(\delta\) to 60 cm. As the B-box states of non-anchor nodes become more specific, the network-wide localization accuracy improves over time. Smartphones with inertial sensors and UWB transceivers accurately track their location through the particle filter [28]. For mobile nodes, the motion tracking module with the Inertial Navigation System (INS) is added to the radio-based B-box localization module. Translational and rotational movements of a pedestrian are tracked through rotation tracking, step detection, and step length estimation procedures. For particle filtering, each mobile node keeps one set of weighted particles. All \(N_{p}\) particles each have a state \(\mathbf{s}_{k}\) and a weight \(\omega_{k}\) at the \(k\)th iteration. The weighted particle set \(\xi_{k}\) is defined as:  
\[\xi_{k}\equiv\Big{\{}\Big{\langle}\mathbf{s}_{k}^{l},\omega_{k}^{l}\Big{\rangle} \mid l\in\{1,\ldots,N_{p}\}\Big{\}} \tag{4}\]  
where  
\[\mathbf{s}_{k}^{l}\equiv \begin{bmatrix}\mathbf{r}_{k}^{l}&\mathbf{q}_{k}^{l} \end{bmatrix} ^{T}= \begin{bmatrix}x_{k}^{l}&y_{k}^{l}&q_{0,k}^{l}&q_{1,k}^{l}&q_{2,k}^{l}&q_{3,k}^{l}\end{bmatrix}