## 5 Cross-Layer Cluster-Based Energy-Efficient Protocol
### Setup Phase  
The first phase is the setup phase, where sensor nodes are classified into certain clusters based on a hexagonal structure. The optimal length of each cluster side for \(\upbeta=2\) is found from Figure 2. Then, the cluster is created using the optimal cluster side for mitigation of the hot spot problem and to balance energy consumption. The formation of a hexagonal cluster with equal length cluster sides will help to choose CHs closer to the optimal CH location. However, initial CHs are elected randomly from CMs in the cluster. Then, the CH broadcasts the CH election message to all one-hop neighbors; those sensor nodes that receive these messages update its CH status.  
\[\sum_{j=1}^{N}\frac{R_{ij}}{N}=r^{i}\ \ \ \ \forall i=[1,N] \tag{12}\]  
\[f(E_{res},r^{i})=\alpha\frac{r^{i}}{2r}-(1-\alpha)\frac{E_{res}}{E_{cap}} \tag{13}\]  
CH re-election happens when the current CH value falls below a particular threshold. During the re-election, the CH is decided based on the remaining energy and optimum CH distance of the node to reduce the energy consumption and increase the network lifetime. Each CM in the cluster finds the value of Equation (12), where Equation (12) N is the number of the one-hop neighbors of the sensor node, \(R_{ij}\) is the distance between node \(i\) and node \(j\), \(r^{i}\) is the average distance from node \(i\) to all its one-hop neighbors. Different CMs have different \(r^{i}\) values. All CMs broadcast an advertisement message with their residual energy, average distance from each CM to all their neighbors, the location, the cluster-ID and the CH-ID using CSMA/CA.  
The CHs are selected by a rule of best candidate, which selects a sensor node closer to the optimal CH location with minimum distance to all neighbors and has maximum remaining energy as a CH for the next round. The CCBE algorithm decides the CH node as the node (within the cluster) that minimizes Equation (13). In Equation (13), \(r^{i}\) is the average distance to all neighbor nodes and \(E_{res}\) is the remaining energy of the node. Intuitively, without taking energy balance into account, some sensor nodes may be selected more frequently as the CHs, and the energy of these nodes may be depleted very quickly compared to other member nodes. Since \(r^{i}\) and \(E_{res}\) use different units, they should be normalized, and Equation (13) shows the normalized form. The default energy capacity of each node (\(E_{cap}\)) is used to normalize \(E_{res}\). \(r^{i}\) is normalized with respect to the maximum distance between two nodes \(2r\) in the cluster. The weight function \(\alpha\) determines the relative importance placed on these two parameters. Moreover, this method is an effective way to the optimal node as the CH. Different applications have different requirements, and these weighting factors can be varied accordingly. This means that the nodes are decided to be the CH depending on the combined remaining energy (\(E_{res}\)) of the node and the optimal CH location with the minimum average distance to all neighbors. This node uses the best combination of the minimum energy needed to reach neighbors and with maximum residual energy. Therefore, CCBE is higher in concept and in terms of energy efficiency. However, if the current CH dies for some unexpected reason, the CM with the next highest value will take over the previous CH's role.