## 2 System Model
### Optimal Number of Clusters  
Network clustering is a promising technique that can be employed to achieve network scalability, reliable and energy efficient communication. A near-centre member node \(MN_{i}\) in a cluster consumes less energy for intra-cluster communication than a near-border member node \(MN_{g}\) but both consume maximum power for inter-cluster communication when they are selected as clusterheads [17]. This means a shorter average distance between member nodes and clusterhead requires less energy for intra-cluster communication. Therefore, the number of clusters which influences member nodes distribution in each cluster and average intra-cluster distance are key elements to be considered in minimizing network energy consumption. The optimal number of clusters \(q^{*}\) need to be carefully determined so that network-wide energy consumption can be minimized. The network is partitioned into \(q\) number of clusters with each cluster comprises of one clusterhead \(CH_{j}\) and \(1-\binom{N}{q}\) number of member nodes \(m_{n}\approx\
icefrac{{N}}{{q}}\) uniformly distributed within the radio range of the clusterhead \(CH_{j}\). Let \(A_{sp}^{2}\) denotes average spans for \(x\)-axis and \(y\)-axis of each cluster \(cl_{j}\), \(A_{c}\) denotes average cluster area and \(\rho(x,y)\) denotes nodes distribution density within a cluster. The Euclidian square distance \(d_{i,j}^{2}\) between the member node \(MN_{l}\) and the clusterhead \(CH_{j}\) can be expressed as:  
\[d_{i,j}^{2}=\iint(x^{2}+y^{2})\rho(x,y)dxdy \tag{32}\]  
If area \(A_{c,i}\) of cluster \(cl_{j}\) is assumed to be a two dimensional area, then the average span \(A_{sp}^{2}=L^{2}/q\) and the node distribution density \(\rho=q/L^{2}\). Thus, Equation (32) can be expressed as:  
\[d_{i,j}^{2}=\rho\int_{x=0}^{L/\sqrt{q}}\int_{y=0}^{L/\sqrt{q}}(x^{2}+y^{2})dxdy \tag{33}\]  
After further simplification, the equation reduces to:  
\[d_{i,j}^{2}=\frac{2}{3}\frac{L^{2}}{q} \tag{34}\]  
Therefore, optimal number of cluster \(q^{*}\) can be derived analytically from the network wide energy consumption equation which is given as:  
\[\begin{array}{c}E_{net}=\sum_{j=1}^{q}\left(E_{CH}(j)+\sum_{i=1}^{m_{n,j}}E_ {MN}(i,j)\right)\\ \\ =\sum_{j=1}^{q}\left(E_{ss}+E_{log}+\ E_{cs}+\sum_{i=1}^{m_{n}}(B_{ld}E_{ec}+B _{dt}E_{ec})+\sum_{i=1}^{m_{n}+1}\left(E_{dp}+E_{ap}\right)+\right.\\ \\ B_{cd}\left(E_{ec}+E_{am}\ d_{j,h_{max}}^{\beta}\right)+B_{pk}E_{ec}+B_{pk} \left(E_{ec}+E_{mp}\ d_{j,g}^{4}\right)+\sum_{i=1}^{m_{n,j}}\left(E_{ss}+E_{ log}+\right.\\ \\ \left.\left.\mathrm{E_{cs}}+B_{ld}\left(2E_{ec}+E_{am}\ d_{i,j}^{\beta}\right)+ B_{dt}\left(E_{ec}+E_{am}\ d_{i,j}^{\beta}\right)\right)\right)\end{array} \tag{35}\]  
Let \(B\) stand for \(B_{ld}\), \(B_{dt}\), \(B_{pk}\) and \(\beta=2\) for intra-cluster distance while \(\beta=4\) for inter-cluster distance _i.e._, clusterhead to BS:  
\[\begin{array}{c}E_{net}=\left((qE_{ss}+qE_{\log}+qE_{cs}+2 NBE_{ec}+N(E_{dp}+ E_{ap})+\mathrm{Bq}(3\mathrm{E_{ec}}+\frac{2E_{an}}{3}\frac{L^{2}}{q})\right.\\ \\ \left.+BqE_{mp}d_{j,g}^{4}+N(E_{ss}+E_{\log}+E_{cs}+B(3E_{ec}+\frac{4E_{an}}{3 }\frac{L^{2}}{q}))\right)\end{array} \tag{36}\]  
Therefore, the optimal number of clusters \(k_{opt}\) can be determined by setting derivative of \(E_{net}\) in Equation (36) with respect to \(q\) to equal to zero \(\frac{\partial E_{net}}{\partial q}=0\). After further derivation and simplification, the equation reduces to:  
\[q^{*}=\sqrt{\frac{4 NE_{am}\mathrm{A_{N}}}{3(E_{pp}+2E_{ec}+\mathrm{E_{ctH}})}} \tag{37}\]  
where \(E_{pp}=(E_{ss}+E_{log}+\ E_{cs})/B\) denotes the energy costs per bit for sensing events, logging the readings data and sensing set of channels for detecting vacant channels, respectively.