| Definitions: |
| RE-Residual Energy/Remaining Energy |
| IE-Node Primary Energy |
| Input: |
| N: Total Nodes in the Network |
| X_Coordinate: Area of x-axis |
| Y_Coordinate: Area of y-axis |
| TC: Total Clusters |
| C = {C1, C2, C3, C4, … CTC} |
| R: Number of Rounds. |
| Output: |
| CL = {CL1, CL2, CL3, CL4……. CLTC}, the Cluster Leaders in the Cluster |
| Function: |
| Residual Energy (Unspent energy) |
| Position (X_Coordinate, Y_Coordinate) |
| Communication_Cost (Distance between the nodes) |
| Fuzzy logic (Residual Energy, Communication_Cost, Position) |
| Main: |
(1) | Initially, random selection of cluster leader. |
(2) | Each node, |
| if (RE < IE), then, |
| if (node not reaches the other node withinmaximum hop count of 2), then, |
| if (node is not located at minimum distance with certain (other) nodes), then, |
(3) | Fuzzy input variables: Residual_Energy, Communication_Cost and Position. |
(4) | Determine the Defuzzifier output variable named Cluster Leader for eachdepends on the linguistic variables |
(5) | Select nodes nithe highest possible Cluster leader cost from all the nodes from previous round (R) elected cluster leader. |
(6) | Repeat the procedure from step 1 to 4 for all the regions. |
(7) | Form the clusters, C = {C1, C2, C3, C4…. CTC} by connecting each nodeto the nearer cluster leader on the corresponding regions. |