## 4 Proposed Routing Protocols
### Proposed Two-Level Phantom with a Backbone Route Protocol (PhaT)
#### 4.2.3 PHASE 3: Selection of \({}_{B}N\) and Packet Routing from \(npN\) to Sink Node  
After the \(npN\) receives the packet, it activates the process to select an initial backbone route node (\({}_{B}N\)) which is used to create a backbone route to the sink node. The \(npN\) selects a neighboring node with the longest hop distance to the sink node as the \({}_{B}N\). As an example, in Figure 4, if \(npN_{3}\) receives a packet from \(epN\), \({}_{B}N_{9}\) may be selected as the \({}_{B}N\). If multiple nodes have equal longest hop distance to the sink node, one of the nodes is randomly selected. After the \({}_{B}N\) is selected, phase 3 routing is done.  
Figure 4: Configuration of the sensor nodes in the proposed two-level phantom with a backbone (PhaT) protocol.  
The \(npN\) forwards the packet to the \({}_{B}N\) and the \({}_{B}N\) forwards the packet to the sink node through a backbone route. The backbone route employs the shortest path routing strategy. At each forwarding node (\(FW_{N}\)), the node with the shortest hop distance to the sink node (\(N_{WSD}\)) is selected as the next-hop node. When the \(N_{WSD}\) is the sink node, the packet is delivered at the sink node. The shortest path routing strategy is employed to ensure controlled communication overhead. New \(epN\), \(npN\), \(SF\), and backbone route are computed for each successive packet to guarantee high path diversity and strong SLP protection.  
```
Phase 0: Network configuration
1: network initialization using the same algorithm as in Reference [3]
2:\(d_{NB}=\sqrt{\left(x_{N}-x_{B}+\left(y_{N}-y_{B}\right)^{2}\right.}\)
3:\(d_{SB}=\sqrt{\left(x_{S}-x_{B}+\left(y_{S}-y_{B}\right)^{2}\right.}\)
4:if\(d_{SB}\leq d_{NB}\)
5: add sensor node to list of \(epN\)
6: each \(epN\) generate a list of \(npN\)
7:if (\(Y\)-coordinate_of_\(npN>Y\)-coordinate_of_\(epN\))
8: assign \(npN\) into \(northR\)
9:else
10: assign \(npN\) into \(southR\)
11:endif
12:endif
13: Phase 1: Selection of \(epN\) and packet routing from source node to \(epN\)
14: sensor node detect asset, becomes _source_node_
14:\(source\_node\) select \(epN\) from list of \(epN\) using the same algorithm as in Reference [4]
15: Packet routing (\(source\_node\), \(epN\)) // source node send packet to \(epN\) using directed random-walk routing
16: Base 2: Selection of \(npN\) and packet routing from \(epN\) to \(npN\)
17: bias_threshold = \(T\)
18: generate \(SF\) between [0, 1]
19:if (\(SF>T\))
20: select \(npN\) from \(northR\)
21:else
22: select \(npN\) from \(southR\)
23:endif
24: Packet routing (\(epN\), \(npN\)) // \(epN\) send packet to \(npN\) using directed random-walk routing
25: Selection of \({}_{B}N\) and packet routing from \(npN\) to sink node
26:\(npN\) select \({}_{B}N\)
27:\({}_{B}N\) select \({}_{B}N\)
28:while (\(N_{WSD}\)!= \(sink\))
29:\(FW_{N}\) = \(N_{WSD}\)
30:\(FW_{N}\) select \(N_{WSD}\)
31:endwhile
32:\(npN\) send packet to \({}_{B}N\) and \({}_{B}N\) forward packet to sink using shortest path routing
33:function PacketRouting (\(send\_node\), \(target\_node\)) // directed random-walk routing strategy
34:\(send\_node\) generate \(\mathrm{SDR_{N}}\)
35:\(send\_node\) select \(\mathrm{DR_{N}}\)
36:while (\(DR_{N}\)!= target_node)
37:\(send\_node\) = \(\mathrm{DR_{N}}\)
38:\(send\_node\) generate \(\mathrm{SDR_{N}}\)
39:\(send\_node\) select \(\mathrm{DR_{N}}\)
40:endwhile
41:endfunction
```  
**Algorithm 2** Proposed algorithm for the PhaT protocol