1. Election is local
Every eligible node rolls a random value against T(n). LEACH does not need a central coordinator for the basic setup phase.
Explore how LEACH elects rotating cluster heads, forms clusters, aggregates sensor data, and spreads radio energy cost across a WSN
LEACH is a distributed WSN protocol: each eligible sensor makes a local cluster-head decision, members join a nearby head, data is aggregated, and only a few heads make the long transmission to the base station.
Every eligible node rolls a random value against T(n). LEACH does not need a central coordinator for the basic setup phase.
A recent cluster head is removed from the eligible set for roughly 1/p rounds, so the high-energy role moves around the field.
Members send short-range packets to a nearby head instead of all sensors transmitting directly to a far base station.
Heads receive member packets, aggregate readings, and forward a compressed report to the base station.
The round starts with a local probabilistic decision. A node that recently served as cluster head is not eligible during the current epoch.
Eligible nodes roll against T(n), producing a small set of heads for this round.
Heads broadcast a short advertisement so nearby sensors can choose a cluster.
Non-head nodes join the head with the best communication cost for this round.
Each head assigns member slots so radios can sleep outside their transmit time.
Members send sensor readings to the head using short-range transmissions.
Heads fuse related readings into a smaller report for the sink.
Heads transmit compressed data to the base station and spend extra energy.
Expected count is p * N; actual count varies because election is probabilistic.
Share of active nodes that have already served as head in this epoch.
Illustrative energy points, scaled by payload and link distance.
Aggregated data sent from heads to the base station this round.
First rows from the current round. A node becomes a head when it is eligible and its roll is below T(n).
Plain-language trace of what the animation is currently showing.
Think of each cluster head as a temporary team captain. Members whisper to the captain nearby; the captain summarizes the report and makes the long trip to the base station.
T(n) = p / (1 - p * (r mod 1/p)) for nodes in G, otherwise 0. G is the set of nodes that have not recently been cluster head.
The basic distributed election does not guarantee perfect placement, exact head count, or best lifetime for every topology. It is a useful baseline under specific WSN assumptions.
Energy-Efficient Communication Protocol for Wireless Microsensor Networks, HICSS 2000.
An Application-Specific Protocol Architecture for Wireless Microsensor Networks, IEEE Transactions on Wireless Communications, 2002.
Compare this distributed baseline with centralized clustering, residual-energy weighting, multi-hop routing, and mobile-sink collection when the assumptions change.
Set p to 10%. Step through rounds and watch how roughly 1/p rounds define the eligibility window.
Choose Remote sink and increase payload size. Identify which nodes spend the most energy and why.
Try Few heads. Notice how probabilistic election can create uneven clusters even when the long-term rotation idea is sound.