# Data Gathering Techniques in WSN: A Cross-Layer View
## 5 Routing for Data Gathering in WSN
### Data Aggregation Routing Protocols for Energy Harvesting WSN  
As discussed in Section 2, an alternative for relying on batteries as the source of energy, with their imposed constraints (e.g., size, replacement, etc. ), is to embrace energy-harvesting (EH) technology. However, as mentioned earlier, relying on EH imposes different constraints and limitations. Such constraints can make battery-reliant schemes impractical when devising data collection procedures. When battery-reliant schemes are applied to EH-based platforms, performance can be highly degraded. Specifically, relying on EH can induce high diversity between the different nodes, as different nodes can have different attributes, such as energy depletion and charging rates, which affect the nodes' availability; in addition, different nodes can have different roles, such as different reporting rates or different report importance, requiring more energy usage, which eventually also affects the nodes' availability. When a sensor is expected to transmit or receive a report, it needs to have sufficient energy to complete the transaction; therefore, reliance on EH needs to be considered when designing a scheduling protocol. For example, a data collection scheme that relies on EH should adapt the report rate to energy availability; it can compromise the rate of less important reports coming from the sensors to leave them sufficient energy for emergency reports. It can prioritize sensors with more energy over those with lower energy, especially when there is some redundancy in the reports received by different sensors. This is especially so when dealing with multi-hop routing, where many of the nodes serve as relays and have the burden to stay awake longer, to receive and transmit more, which escalates the heterogeneity of the nodes and accentuates the difference in importance between the different nodes. Furthermore, if on a single-hop network, we could rely on the receiver (sink) to have unlimited power (connected to a power source), in multi-hop topologies also, the receivers rely on EH; hence, when scheduling a transmission, we need to ensure that both transmitter and receiver have sufficient power to complete the transaction. In the following, we present several routing protocol adaptations for EH-WSN in the context of data aggregation. The typical setup considers that each node (sensor) encompasses an energy harvester and an energy storage device and is solely powered by the renewable energy available to it by its energy storage device. A multi-hop topology is considered such that the data from many of the sensors need to traverse multiple links before reaching the sink. [PERSON] et al. [141] propose an adaptive data aggregation scheme for energy-harvesting WSNs. The suggested scheme relies on two residual-energy thresholds, lower and upper. Each node periodically estimates its residual energy level to determine whether or not to transmit data. When the node's residual energy is either above the upper threshold or below the lower threshold, the node transmits its aggregated data. If its energy is below the lower threshold, the node enters energy-saving mode after transmitting the data. Its radio is turned off, and it waits to regain sufficient energy before turning its radio back on. In normal operation mode, where the residual energy is between the two thresholds, the node only aggregates data received from other nodes and collects its own sensed data. If a node's aggregated data in normal mode exceeds its storage limit, the node transmitsthe data regardless of its residual energy. While this scheme is clear and straightforward to implement, it lacks latency evaluation and a discussion about rendezvous between a transmitter and a receiver. [PERSON] et al. [142] experimentally show that in energy-harvesting-based wireless sensor networks (EH-WSNs), the required nodes' charging time to be ready to receive or send a packet is much greater than the time required for the contention resolution mechanism and dominates the data aggregation latency.