## 3 System Model
### Optimal Number of Clusters  
We assume that an area \(A=R\times R\) square meters over which \(N\) nodes are uniformly distributed. For simplicity, assume the sink is located in the center of the field, and that the distance between any node to the BS or its CH is \(r_{p}(r_{p}\leq d_{0})\), where \(d_{0}\) is the maximum transmission range. We consider that after deployment, the BS broadcasts a \"hello\" message to all the nodes at a certain power level. Figure 3: Radio Energy Dissipation Model. Each node can compute its approximated distance \((D_{i})\) to the BS based on the received signal strength. The average distance \(D_{avg}\) between nodes and the BS is given by:  
\[D_{avg}=\frac{1}{N}\sum_{i=1}^{N}D_{i}, \tag{6}\]  
The value of \(D_{avg}\) can be approximated as:  
\[D_{avg}\approx d_{CH}+d_{BS}, \tag{7}\]  
where \(d_{CH}\) is the average distance between a cluster member and its CH and \(d_{BS}\) is the average distance between the CH and the BS. The energy dissipated in the CH node during a round is given by the following formula:  
\[E_{CH}=(\frac{N}{C}-1)Y.E_{elec}+\frac{N}{C}Y+Y.E_{elec}+Y.\epsilon_{fs}d_{BS} ^{2}, \tag{8}\]  
where \(C\) is the number of clusters, \(Y\) is the compressed data. The energy dissipated by a non-CH node is given by:  
\[E_{nonCH}=L.E_{elec}+L.\epsilon_{fs}d_{CH}^{2}, \tag{9}\]  
Using Euclidian metric, the area occupied by each cluster will be \(\lambda=\frac{R^{2}}{C}\) with node distribution \(\rho(x,y)\):  
\[d_{CH}^{2}=\int\int(x^{2}+y^{2})\rho(x,y)dxdy=\int\int r^{2}\rho(r,\theta)rdrd \theta, \tag{10}\]  
Assuming the area is a circle with radius \(\eta=R/\sqrt{\pi C}\), \(\rho(r,\theta)\) is constant, and the density \(\rho\) is uniform where \(\rho=(1/(R^{2}/C))\), \(d_{CH}^{2}\) can be simplified as follows:  
\[d_{CH}^{2}=\int\int(x^{2}+y^{2})\rho(x,y)dxdy=\rho\int_{\theta=0}^{2\pi}\int_{ r=0}^{R/\sqrt{\pi C}}r^{3}drd\theta=\frac{R^{2}}{2\pi C}, \tag{11}\]  
The energy dissipated in a cluster per round is given by:  
\[E_{cluster}\approx E_{CH}+\frac{N}{C}E_{nonCH}, \tag{12}\]  
The total energy dissipation in the network per round will be the sum of the energy dissipation by all clusters, _i.e._,  
\[E_{tot}=CE_{cluster}=Y(N(1+E_{elec})+C\epsilon_{fs}d_{BS}^{2})+NL(E_{elec}+ \epsilon_{fs}d_{CH}^{2}), \tag{13}\]  
By differentiating \(E_{tot}\) with respect to \(C\) and equating to zero, the optimal number of constructed clusters can be found:  
\[C_{opt}=\sqrt{\frac{NL}{2\pi Y}}\frac{R}{d_{BS}}=\sqrt{\frac{NL}{2\pi Y}} \frac{2}{0.765}, \tag{14}\]  
where, the average distance from a CH to the BS \(d_{BS}\) is given by [34] such that \(A=R^{2}\):  
\[D_{avg}=\frac{1}{N}\sum_{i=1}^{N}D_{i}, \tag{6}\]0If the distance of a significant percentage of nodes to the BS is greater than \(d_{0}\) then, following the same analysis as in [33] we will obtain:  
\[D_{avg}=\frac{1}{N}\sum_{i=1}^{N}D_{i}, \tag{6}\]1  
By substituting in Equation (13) and differentiating \(E_{tot}\) with respect to \(C\) and equating to zero, we will find:  
\[D_{avg}=\frac{1}{N}\sum_{i=1}^{N}D_{i}, \tag{6}\]2  
The optimal probability of a node to become a CH, \(p_{opt}\), can be computed as follows:  
\[D_{avg}=\frac{1}{N}\sum_{i=1}^{N}D_{i}, \tag{6}\]3  
The optimal construction of clusters (which is equivalent to the setting of the optimal probability for a node to become a CH) is very important. In [9], the authors showed that if the clusters are not constructed in an optimal way, the total consumed energy of the WSN per round is increased exponentially either when the number of the constructed clusters is greater than the optimal number of clusters or especially when the number of the constructed clusters is less than the optimal number of clusters. If the number of the constructed clusters is less than the optimal number of clusters, some nodes in the network have to transmit their data very far to reach the CH, this will increase the energy of the system.