| Algorithm 2. CH Election Algorithm (General Cluster) |
| Inputs: (1) nodes of cluster C |
| (2) size of cluster C: NO |
| (3) location of BS: (BS·x, BS·y) |
| Result: CH of Cluster C |
| 1: calculate cluster center position Cen (XC, YC); |
| 2: for i = 1 → NO |
| 3: calculate the objective function of node i, GiCH |
| 4: end for |
| 5: select the node with GCHmax as the CH of cluster C; |