## 4 Proposed CH Selection Protocol
### Objective Function  
Selecting the proper CHs in hierarchy clustering protocols is essential to increase the energy efficiency of WSNs. The first important consideration for the selection of CHs is their distribution, as CHs concentrated in one side make some distances from sensor nodes to the CHs become large. Thus, the gain from transmission distance that each node can obtain from the nearest CH is reduced. The CHs must be properly distributed to reduce transmission energy consumption at the nodes. A mathematical formalization is required to quantify the appropriate distribution of CHs. Similar to [10; 19], we defined the coverage area of each CH, where a proper distribution of CHs should retrieve both similar coverage area across CHs and coverage for every node, as:  
\[A_{\text{Cover}}=\frac{d_{\text{far}}^{2}\times\pi}{NS}, \tag{17}\]  
where \(A_{\text{Cover}}\) is the coverage area and \(d_{\text{far}}^{2}\) is the squared distance to the farthest node from the midpoint of the nodes. Hence, all nodes are within \(d_{\text{far}}^{2}\pi\), the circular area from the midpoint of the nodes to and any node inside the circle covered by a CH has a distance shorter than the radius to that CH. In addition, comparing distances is simpler than verifying whether a node is inside a circle:  
\[R_{\text{Cover}}=\sqrt{\frac{A_{\text{Cover}}}{\pi}}=\sqrt{\frac{d_{\text{ far}}^{2}\times\pi}{NS\times\pi}}=\frac{d_{\text{far}}^{2}}{\sqrt{NS}}, \tag{18}\]  
where \(R_{\text{Cover}}\) is the distance (radius) to determine whether a node is within coverage area \(A_{\text{Cover}}\). The set of nodes covered by the \(k\)-th CH is expressed as  
\[\text{Cover}_{k}=\{Node_{ID}\}[\text{Distance}\,(Node_{ID},CH_{k})<R_{\text{ Cover}}],k=(1,2,\ldots,NS)\;\;\forall\;ID, \tag{19}\]  
where \(\text{Distance}(Node_{ID},CH_{k})\) is the distance from the node uniquely distinguished by \(ID\) to the \(k\)-th CH. Note that \(R_{\text{Cover}}\) considers that the entire coverage area is divided evenly. Thus, more nodes covered by the CHs implies a better distribution. Therefore, a fitness value can be expressed as  
\[F_{1}=\left|\bigcup_{k=1}^{NS}\text{Cover}_{k}\right|, \tag{20}\]  
where \(|\;|\) denotes the cardinality of the set (i.e., number of elements) and the union prevents counting overlapping nodes covered by more than one CH. Another consideration is the node energy, which is widely used for CH selection [7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19]. The node energy is divided into the transmission, reception, residual, and data aggregation energy, all of which we combine back again into the reserve energy (i.e., the energy consumed and left when a node becomes a CH). If a node with very low reserve energy is selected as CH, it can be depleted without receiving all the data from neighboring nodes, thus reducing network stability. Therefore, nodes with high reserve energy are preferred as CHs. The fitness value for the reserve energy is expressed as  
\[F_{2}=\sum_{k=1}^{NS}RES_{k}-(|\text{Cover}_{k}|\times E_{\text{RX}}+E_{\text{ DA}}+E_{\text{TX}}), \tag{21}\]  
where \(RES_{k}\) is the residual energy of the \(k\)-th CH and \(E_{\text{TX}}\), \(E_{\text{RX}}\), and \(E_{\text{DA}}\) correspond to the energy for data transmission, reception, and aggregation mentioned in Section 4.2, respectively. The objective function, \(F_{\text{obj}}\), simultaneously considers \(F_{1}\) and \(F_{2}\) through their weighted sum for balancing their contribution during optimization. To establish the objective function, we used min-max normalization. As the number of covered nodes and the reserve energy are always greater than 0, the minimum of the two fitness values is 0. Therefore, the objective function normalizing the two fitness values is given by  
\[F_{\text{obj}}=w_{F_{1}}\times\frac{F_{1}}{\text{MAX}(F_{1})}+w_{F_{2}}\times \frac{F_{2}}{\text{MAX}(F_{2})}, \tag{22}\]  
where \(w_{F_{1}}\) and \(w_{F_{2}}\) are the weights of the corresponding fitness values (both set to 0.5 in this study).