Skip to main content
. 2026 Sep 11;26(18):5776. doi: 10.3390/s26185776
Algorithm 1 SMA-WSN Cluster-Head Selection.
Input: alive nodes, residual energy, node positions, BS position, radio range r, weights α, β, γ, M = 8 iterations.
Output: selected cluster heads CH_set and cluster membership.
Phase 1—Approach:
For each alive node i, compute:
Φ_E(i) = E_res(i)/E0
Φ_D(i) = 1/(1 + dist(i, BS)/max_dist)
Φ_C(i) = |neighbors(i, r)|/(N_alive − 1)
f(i) = α·Φ_E(i) + β·Φ_D(i) + γ·Φ_C(i)
Assign growth weight w(i) ∝ f(i); initialize archive A.
Phase 2—Wrap:
For M = 8 iterations, for each node i:
r ← Uniform(0, 1)
if r < p_scout (=0.03): scout perturbation (exploration)
else if r < 0.5: oscillatory approach toward best in A
else: contraction step
Update f(i); update archive A.
Phase 3—Selection:
Rank nodes by archived fitness; elect the top k* = round(p* · N_alive) nodes as CH_set, with p* = 0.10 for rounds ≤ 300 and p* = 0.15 thereafter. The increase is timed to coincide with the onset of node attrition: at E0 = 0.2 J, fault-free networks typically register their first node death around round 300–330 (Section 6), after which the alive-node count begins to shrink. Raising the CH ratio from 10% to 15% at this point keeps the absolute number of cluster heads, and hence the per-CH relay load, roughly stable as N_alive declines, rather than concentrating an increasing aggregation burden onto a fixed, shrinking set of heads.
Each non-CH node joins the CH with the highest f(i) within r.
If no CH within r → node transmits directly to BS (orphan rule).
Return CH_set and cluster membership.