|
Algorithm 3: Parametric approach for the balanced cluster structure |
|
Input:
|
| X = consists of a total n number of data items. |
| Copt = optimal clusters density |
| Ethreshold = energy threshold |
|
Output:
|
| A complete set of Copt clusters. |
|
Steps:
|
| 1: Find Copt initial CHs by using Algorithms 1 and 2. |
| 2: Repeat
|
| 3: Rest of SNs join the nearest CH based on Euclidean distance. |
| 4: Centroid for each cluster: |
| Centroid (x,y) =
|
| 5: Once optimum cluster is formed, all SNs are assigned IDs based on the distance from centroid. Closer SNs will be assigned small numbers. |
| 6. For all selected CHs |
| 7: if CH residual energy ≥ Ethreshold
|
| 8: then
|
| 9: CH won’t change |
| 10: else
|
| 11: SNs ID numbers will be checked in the cluster |
| 12: SN having next ID number is elected as a new CH. |
| 13: End If
|
| 14: End for
|
| 15: Beacon signal will be send to all SNs to inform them about the change of new CH. |
| 16: Until The CH residual energy meets the threshold level and no change in the CH anymore. |