# An Eccentricity Based Data Routing Protocol with Uniform Node Distribution in 3D WSN
## 3 Proposed EDR Protocol
### Information Collection Phase  
This phase starts at predefined time \(T_{1}\). During this time, each node broadcasts its status along with a _Hello_Msg_ within its radio range \(R_{\rm s}\), where \(R_{\rm s}\) is equal to the subspace diagonal length. The nodes belonging in the same subspace receive the message and list the information in their members' distance table (MDT) that contains [_node_id_, _subspace_id_, _node_distance_]. From the distance information of the member nodes, each node (e.g., a node \(s_{\rm i}\) in a subspace) computes its members' average distance (_MAD_) that is defined in the following Equation (2):  
\[MAD=\frac{1}{m-1}\sum_{j=1,j\
eq i}^{m-1}d(s_{i},s_{j}), \tag{2}\]  
\begin{table}
\begin{tabular}{c l} \hline \hline
**Message** & **Description** \\ \hline _Hello\_Msg_ & Tuple (_node\_id_, _subspace\_id_, _node\_coordinates_), a control message used to collect the initial information of nodes during network initialization. \\ _Node\_Msg_ & Tuple (_node\_id_, _subspace\_id_, _average\_distance_, _residual\_energy_, _node\_fitness_), a control message used to collect nodes’ information during RC nodes election. \\ _Schedule\_Msg_ & Tuple (_RC\_id_, _subspace\_id_, _[TDMA schedule]_), a control message used to assign the time slots to nodes during data communication. \\ _Route\_Msg_ & Tuple (_RC\_id_, _subspace\_id_, _node\_coordinates_, _node\_type_, _distance\_sink_, _RC\_fitness_), a control message used to collect RC nodes’ information during route selection towards the sink. \\ _Route\_Msg_ & Tuple (_RC\_id_, _subspace\_id_, _missing\_id_), a notification message from an RC node to its member nodes when its residual energy gets as below as the threshold energy level. \\ _Not\_Msg_ & Meanwhile, it contains the _id_ of missing member node(s). \\ _D\_Msg_ & Tuple (_node\_id_, _subspace\_id_, _RC\_id_, _local\_data_), a local data message from a member node to an RC node. \\ _AD\_Msg_ & Tuple (_RC\_id_, _subspace\_id_, _next\_hop\_id_, _[node\_id_, _’fusel\_data’_]_), an aggregated data message from an RC node to next hop/sink. \\ \hline \hline \end{tabular}
\end{table}
Table 1: Description of control and data messages.  
where \(m\) is the number of member nodes in a subspace and \(d\) is the distance of a member node \(s_{i}\) of \(s_{i}\).  
After completing the \(MAD\) calculation, each node broadcasts it along with a _Node_Msg_ within its radio range \(R_{\min}\), where \(R_{\min}\) is equal to the maximum distant member node in its MDT. Nodes in the same subspace receive the message and list the information in their members' average distance table (MADT) that contains the attributes [_node_id_, _subspace_id_, _average_distance_, _residual_energy_, _node_type_, _node_fitness_, _flag_]. Initially, all nodes are typed normal '\(N\)' and the _node_fitness_ and _flags_ values are 0. The details of this phase is given by the pseudo-code in Algorithm 1.  
```
start\(state\leftarrow\) Member node while(\(T_{1}\) has not expired) do  Broadcast \(Hello\_Msg\)  Receive \(Hello\_Msg\)  List in a MDT  Broadcast \(MAD\) with Node_Msg  Receive \(Node\_Msg\)  List in a MADT  end if  end while
```  
**Algorithm 1**Information collection algorithm