## 4 Proposed Routing Protocols
### Proposed Two-Level Phantom with a Pursue Ring Protocol (PhaP)
#### 4.1.1 PHASE 0: Network Configuration  
For proper functioning of the PhaP protocol, a pursue ring (\(P_{ring}\)) is computed during the network configuration phase, after the network initialization process. The network initialization process is explained in Section 3 above. The \(P_{ring}\) is computed during network configuration phase to minimize delay during packet routing. To begin the \(P_{ring}\) computation process, an \(X\)-\(Y\) coordinate is generated at the sink node location and two distances are defined, the distance from sink node to the inner ring of the \(P_{ring}\) (\(dP_{in}\)) and the distance from sink node to the outer ring of the \(P_{ring}\) (\(dP_{out}\)). Distance between any two points in the network is calculated using the Euclidian distance equation. For example, the distance between point \(U\) at (\(x_{U}\), \(y_{U}\)) and point \(V\) at (\(x_{V}\), \(y_{V}\)) is calculated as: \(d_{UV}=\sqrt{\left(x_{U}-x_{V}\right)^{2}+\left(y_{U}-\ y_{V}\right)^{2}}\). A ring with \(dP_{in}\) and \(dP_{out}\) is generated. The configuration of the \(P_{ring}\) regions in the WSN domain is shown in Figure 1. All sensor nodes which are located in the \(P_{ring}\) are recoded in a list of candidate second level phantom nodes (\(P_{Nsec}\)). To diversify the routing paths, the \(P_{ring}\) is divided into four parts: north-east region of \(P_{ring}\) (\(P_{rNE}\)), south-east region of \(P_{ring}\) (\(P_{rSE}\)), north-west region of \(P_{ring}\) (\(P_{rNW}\)), and south-west region of \(P_{ring}\) (\(P_{rSW}\)). The flowchart for the \(P_{ring}\) computation process is shown in Figure 2. To specify the \(P_{ring}\) regions, the inclination angle, \(\theta\), of all the sensor nodes in the \(P_{ring}\) is computed. The \(\theta\) is the angle formed between the \(X\)-axis and the imaginary line connecting the sink node and the node which is computing the \(\theta\) as shown in Figure 3. The computation of \(\theta\) is based on three parameters: the distance between the sensor node and the sink node, the distance between the sensor node and the meeting point on the \(X\)-axis, and the position coordinates of the sink node, the sensor node, and the meeting point on the \(X\)-axis. As an example in Figure 3, if node \(C\) which is located at (\(x_{C}\), \(y_{C}\)) wants to compute the inclination angle \(\theta_{C}\), the line connecting node \(C\) and the \(X\)-axis meet at point \(L\) with coordinates (\(x_{L},y_{L}\)). The sink node is at (\(x_{0},y_{0}\)). Then the distance, \(d_{SL}\), between the sink node and point \(L\) is calculated as: \(d_{SL}=\sqrt{\left(x_{L}-x_{0}\right)^{2}+\left(y_{L}-\ y_{0}\right)^{2}}\). Similarly, the distance, \(d_{SC}\), between the sink node and node \(C\) is calculated as: \(d_{SC}=\sqrt{\left(x_{C}-x_{0}\right)^{2}+\left(y_{C}-\ y_{0}\right)^{2}}\). Then, the inclination angle \(\theta_{C}\) is computed as \(\theta=Cos^{-1}\Big{(}\frac{d_{SL}}{d_{SC}}\Big{)}\). The sensor nodes with \(\theta\) in the range \(0^{\circ}\leq\theta<\pi/2\), \(\pi/2\leq\theta<\pi\), \(\pi\leq\theta<3\pi/2\), and \(3\pi/2\leq\theta<2\pi\) are assigned in \(P_{rNE}\), \(P_{rNW}\), \(P_{rSW}\), and \(P_{rSE}\), respectively. \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Meaning** \\ \hline \(P_{ring}\) & Pursue ring \\ \(dP_{in}\) & Distance from the sink node to the inner ring of the \(P_{ring}\) \\ \(dP_{out}\) & Distance from the sink node to the outer ring of the \(P_{ring}\) \\ \(P_{N\!/\!/\!\!/st}\) & First level phantom node \\ \(P_{Nsec}\) & New second level phantom node \\ \(\theta\) & Inclination angle between the \(X\)-axis and a line connecting the sink node and a node \\ \(T_{P}\) & A bias threshold value \\ \(R_{N}\) & A random number distributed between [0, 1] \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Notations used in the proposed two-level phantom with a pursue ring (PhaP) protocol. Figure 1: Configuration of the pursue ring (\(P_{ring}\)) regions in the proposed PhaP protocol.