Leaf nodes produce readings and choose a nearby cluster head.
WSN Data Aggregation Tree Animation
Trace leaf readings as cluster heads combine them before forwarding summaries to the sink.
WSN data aggregation tree
Watch sensor readings move up a collection tree, combine at cluster heads, and arrive at the sink as compact summaries. The live counters separate unavoidable leaf reporting from the sink-bound traffic that aggregation can reduce.
Collection tree
Leaf sensors report locally; cluster heads forward one summary per group.
Each sensor has a reading, a packet size, and a nearest cluster head. Step through the round to see where aggregation changes the traffic.
Raw packets move over short links toward their cluster head.
Each cluster head computes the selected summary function.
Cluster heads send summary packets upstream to the sink.
The sink receives fewer packets, but latency and information loss must be checked.
Core idea
Aggregation is useful when many nearby sensors measure related phenomena and the sink needs a summary rather than every individual reading.
Traffic boundary
Leaf-to-cluster reporting still happens. The big reduction is in packets and bytes forwarded beyond the aggregation point.
Function choice
AVG is good for trends, MAX is safer for alarms, SUM fits totals, COUNT fits events, and RAW preserves detail when summaries are unsafe.
Design tradeoff
Waiting improves completeness, but increases latency. Packet loss and poorly chosen functions can make a compact summary misleading.
Technical accuracy notes
This lab models one collection round on a tree with one-hop sensor-to-cluster links and one-hop cluster-to-sink links. It compares a tree that forwards every received reading upstream against the same tree after cluster-head aggregation.
Formulas and units
received_readings = count(packet_delivered_from_sensor_i)clusters_with_data = count(cluster_j where received_readings_j is not zero)sink_packets_without_aggregation = received_readingssink_packets_with_aggregation = clusters_with_datasink_bytes_without_aggregation = received_readings x reading_bytessink_bytes_with_aggregation = clusters_with_data x summary_bytessink_byte_savings_percent = (1 - sink_bytes_with_aggregation / sink_bytes_without_aggregation) x 100tree_tx_without_aggregation = sensor_count + received_readingstree_tx_with_aggregation = sensor_count + sink_packets_with_aggregationtree_tx_savings_percent = (1 - tree_tx_with_aggregation / tree_tx_without_aggregation) x 100daily_sink_bytes = sink_bytes_with_aggregation x samples_per_hour x 24tree_radio_energy_uJ = tree_bytes_with_aggregation x 8 x energy_per_bit_nJ / 1000completeness_percent = received_readings / sensor_count x 100round_latency_ms = aggregation_wait_ms + upstream_airtime_ms
Aggregation function guide
- AVG: Smooths spatial noise for slow environmental monitoring, but can hide one dangerous outlier.
- MAX: Preserves the largest reading, so it is safer for fire, gas, vibration, and threshold alarms.
- MIN: Preserves the smallest reading, useful for water tanks, battery reserves, and lowest pressure checks.
- SUM: Preserves totals, such as rainfall accumulation, vehicle counts, power use, or event totals.
- COUNT: Counts active detections or responsive nodes, useful for occupancy and density estimates.
- RAW: Gives little or no compression, but keeps individual readings for debugging, regulation, or forensic review.
Design pitfalls
- Do not use AVG for rare-event alarms when a single extreme reading must trigger action.
- Do not report only a summary if the application must preserve identity, timestamp, or per-node evidence.
- Do not ignore cluster-head energy burden. Aggregators receive, compute, and forward more than ordinary leaf nodes.
- Do not wait forever for missing readings. Use timeouts and report completeness with the aggregate.
- Do not treat byte savings as full battery savings without checking radio listening, retransmissions, and sleep duty cycle.
Practice prompts
- Set packet delivery to 80%. Which functions are most sensitive to missing readings?
- Switch Fire watch from MAX to AVG. What happens to the alarm signal?
- Increase cluster heads from 2 to 6. Why do sink bytes rise even though each cluster is smaller?
- Set RAW mode. Why might a system accept the higher traffic cost?
- Increase summary bytes. At what point does aggregation stop helping sink-bound byte volume?