## 4 EBCRP: Energy-Balanced Cluster-Routing Protocol
### Clustering Sensor Nodes Based on Particle Swarm Optimization with Five Mutation Operators
#### 4.1.4 Five Mutation Operators  
In the sensor node clustering optimization process, \(k\) (the value of the first dimension of a particle) sensor nodes with the highest probability are selected as cluster centroids of clusters. This means that it is necessary to not only simply optimize the value of each dimension of particles, but also adjust the position (dimension) of the value corresponding to the highest \(k\) probabilities. In addition, the clustering solution is significantly affected by the first dimension of particles representing the number of clusters. To increase the search diversity, the following five mutation operators are proposed for optimizing the sensor node clustering scheme. * Reversing probability operator: it is used to reverse a part of the probabilities of sensor nodes. The detail process is shown in Algorithm 1. * Decreasing probability operator: it is used to decrease the probability of some sensor nodes becoming cluster centroids. The detail process is shown in Algorithm 2. * Increasing probability operator: it is used to increase the probability of some sensor nodes becoming the cluster centroids. The detail process is shown in Algorithm 3. * Swapping probability operator: it is used to swap the probabilities of two sensor nodes in a particle. The detail process is shown in Algorithm 4. * Transforming number operator: it is used to transform the number of clusters in the first dimension of particles. The detail process is shown in Algorithm 5. ```
Input: Solution of the \(i\

==WARNING: Truncated because of repetitions==
9282 & **0.9967** \\  & 120-th & 0.9459 & 0.8270 & 0.9899 & **0.9976** \\  & 150-th & 0.9712 & 0.8645 & 0.9992 & **0.9997** \\ \hline \multirow{6}{*}{\(N=100\)} & 30-th & 0.7530 & 0.7094 & 0.3935 & **0.9691** \\  & 60-th & 0.8784 & 0.7623 & 0.6768 & **0.9937** \\  & 90-th & 0.8956 & 0.8005 & 0.8010 & **0.9956** \\  & 120-th & 0.9346 & 0.8270 & 0.9712 & **0.9965** \\  & 150-th & 0. +++

So the ECBI of IICMH is lower than that of the proposed EBCRP method. The significantly higher ECBI of the proposed EBCRP than other methods prove the effectiveness of EBCRP in balancing the energy consumption between sensor nodes. Furthermore, EBCRP shows a high ECBI in different rounds, whereas the other methods show significantly smaller ECBI in the early rounds than in the later rounds. This also proves the advantages of EBCRP over other methods. Therefore, the proposed EBCRP performs well in balancing the energy consumption of sensor nodes. However, the proposed EBCRP method dynamically selects CH for each cluster in each round, which reduces the stability of the network system. The network lifetime of EBCRP is also compared with other methods. Figure 10 illustrates the network lifetime of different methods for different numbers of sensor nodes. EBCRP achieves the longest lifetime compared to LEACH, SEP, and IICMH. There are two main factors that prolong the network lifetime of EBCRP. First, EBCRP employs an adaptive sensor node clustering scheme to determine the number of clusters and group sensor nodes into clusters evenly. This helps to balance the energy consumption between clusters. Second, EBCRP adopts a rotation CH selection scheme based on the highest residual energy to dynamically select CHs for each cluster. This approach can balance the energy consumption of sensor nodes within each cluster. Balancing the energy consumption between clusters and within clusters in EBCRP prevents some sensor nodes from consuming energy prematurely, thereby prolonging the lifetime of the WSN. However, LEACH and SEP randomly select some sensor nodes as CHs, while other sensor nodes are assigned to their respective nearest CHs, which cannot balance the number of sensor nodes between clusters and energy consumption of sensor nodes. At the same time, a certain proportion of sensor nodes in SEP are equipped with more energy, and CHs selection in SEP takes into account the residual energy of sensor nodes.