# CoDA: Collaborative Data Aggregation in Emerging Sensor Networks Using Bio-Level Voronoi Diagrams
## 3 System Model
### Structure of Voronoi-Cluster
The length of the JOIN message and the TDMA time slot table are set as \(l_{JOIN}\) and \(l_{TDMA}\) respectively, the energy consumption of the network can be calculated by:  
\[ \begin{split}& E_{form}=k(E_{CH-JOIN}+E_{CH-TDMA})+(N-k)(E_{member- JOIN}+E_{member-TDMA})\\ &=k[l_{JOIN}E_{elec}(\frac{N}{k}-1)]+l_{TDMA}E_{elec}+l_{TDMA} \epsilon_{fs}d^{2}_{toCH}]+\\ &(N-k)[l_{JOIN}E_{elec}+l_{TDMA}E_{elec}+l_{JOIN}\epsilon_{fs}d^{2 }_{toCH}]\end{split}  \tag{4}\]  
In the stable operation stage, \(k\) cluster heads receive the data collected by their member nodes respectively, and then send the aggregation resolution to the relay nodes through multi-hop. The transmission range in inter-cluster communication is often not more than, then the consumption of energy can be represented as:  
\[E_{cluster-in}=k[l_{0}E_{elec}+l_{0}\epsilon_{mp}(2*d_{toCH})^{2}]+kl_{0}E_{ elec} \tag{5}\]  
For the solution of d\({}^{2}_{toCH}\) we can use the derivation in [43]:  
\[E[d^{2}_{toCH}]=\frac{M^{2}}{\pi k} \tag{6}\]  
The total energy consumed in a round is:  
\[E_{total}=E_{init}+E_{form}+E_{cluster-in} \tag{7}\]  
Let the partial derivative of \(E_{total}\) to \(k\) is equal to zero, then the optimal number of clusters can be given as:  
\[k=\frac{N}{\sqrt{2\pi}}\times\sqrt{\frac{(2l_{TDMA}+l_{JOIN})\epsilon_{fs}}{( N-l_{0})\epsilon_{mp}}} \tag{8}\]  
**Definition 2** (Voronoi-Cluster). : _It is assumed that each node knows its own geographical position, and the network is divided into Voronoi cells. The sensor nodes situated in each Voronoi cell can be organized in a single cluster, and they may determine the corresponding Voronoi cell by the geographical position information. The structure of a Voronoi-cluster is shown as Figure 3._  
**Corollary 1**. : _In the lower level of Voronoi diagram, the distance between the cluster heads in different Voronoi-clusters has the same expected value._  
**Proof. ** Suppose that the Euclidean distance between node \(u\) and \(v\) is \(d(u,v)\) and the area of network is square of \(M\times M\). In order to ensure the full coverage of the network, the coverage radius of the cluster head can be defined as \(\frac{M}{\sqrt{k\pi}}\leqslant r\leqslant\frac{2M}{\sqrt{k\pi}}\). The distribution function of the node in the region can be expressed as:  
\[\xi(r)=p\left\{d(u,v)\leqslant r\right\} \tag{9}\]  
In Equation (9), the pairwise node of \(i\) and \(j\) is selected randomly, and the distance of other pairwise nodes in the network follows the same distribution. For a single cluster, there are \(N/k\) nodes in the wireless sensor network, and the number of pairwise nodes is \(\frac{N}{k}*(\frac{N}{k}-1)/2\). Denote the distance of pair wise nodes is less than or equal to \(r\) as \(X(\frac{N}{k},r)\), then \(X(\frac{N}{k},r)\) is random variables and the expected value \(E\left\{N(n,r)\right\}\) can be expressed as:  
\[E\left\{X(\frac{N}{k},r)\right\}=\zeta(r)*\frac{N}{k}(\frac{N}{k}-1)/2 \tag{10}\]  
The probability function of the distance between nodes \(u\) and \(v\) limited by \(r\) is defined as:  
\[p((u,v),r)=\left\{ \begin{array}{l}1,d(u,v)\leqslant r\\ 0,d(u,b)>r\end{array} \right. \tag{11}\]  
Suppose \(S_{N}^{i}\) is a sample of \(N\) nodes distributed in a wireless sensor network which are divided by Voronoi cells. For one node in a Voronoi region and \(X(S_{N}^{i},r)\) denotes the number of nodes whose distance to other nodes is less than or equal to \(r\) in \(S_{N}^{i}\), then:  
\[X(S_{N}^{i},r)=\sum_{i=1}^{N}\sum_{j=i+1}^{N}p((i,j),r) \tag{12}\]  
Suppose that the probability for each candidate instance is \(p(S_{N}^{i})\), then the expectation value \(E=[X\left(S_{N}^{i},r\right)]\) is:  
\[E[X(S_{N}^{i},r)]=\sum_{i=1}^{K}\sum_{j=i+1}^{N}\left(X(S_{N}^{i},r)*p(S_{N}^{ i})\right) \tag{13}\]  
When \(K\) tends to infinity, if the total number of instances of the Voronoi cell in the wireless sensor network is brought into the formula, the expected value of the candidate cluster head distribution can be obtained.