# Data Gathering Techniques in WSN: A Cross-Layer View
## 5 Routing for Data Gathering in WSN
### Common WSN Routing Protocols for Data Gathering
#### 5.1.3 Routing Protocol for Low-Power and Lossy Networks (RPL)  
A routing protocol for low-power and lossy networks (RPL) is a routing protocol that was specifically designed for networks composed of constrained nodes, which are interconnected via unstable and lossy links with relatively low packet delivery rates and typically only support low data rates (hence, low-power and lossy networks (LLNs)). Specifically, RPL is a distance-vector proactive routing protocol designed for IPv6 low-power devices with limited energy, processing, and memory resources ([PERSON] et al. [126]). RPL constructs a tree routing topology termed the destination-oriented directed acyclic graph (DODAG), rooted at one or more sink nodes. The routing tree (graph), along which the traffic traverses, is constructed according to an objective function (OF) that can utilize a set of metrics such as energy consumption, latency, and hop count. The most common ones are OF0, which finds the shortest path (the path with the minimal hop-count) to the sink ([PERSON] et al. [127]), and minimum rank with hysteresis objective function (MRHOF), which finds the routes that minimize the link cost associated with the routes ([PERSON] and [PERSON] [128]). The cost is defined as the latency metric allowing RPL to find stable minimum-latency paths from each node to the sink, or it can be associated with the expected transmission count (ETX) metric, which allows RPL to find the stable minimum-ETX paths from the nodes to the sink (the default metric). In order to achieve stability, MRHOF also ensures that a route is changed (a node exchanges its preferred parent inthe routing tree) only if the cost of the improved route is better than the current route by at least a predefined threshold. RPL is the de-facto IPv6-based routing protocol for the IoT. Accordingly, several OFs and possible enhancements have emerged during recent years, and several performance evaluations and comparisons have been presented. In the following, we discuss some of these OFs. [PERSON] et al. [129] analyze the performance of RPL in collecting smart meter readings over smart grid (SG) networks via Java-based simulations and IoT-LAB testbed experiments. Specifically, [PERSON]. [129] evaluates the RPL performance under the two prominent objective functions Hop Count and ETX, in terms of packet delivery ratio, network latency, control traffic overhead, and power consumption. [PERSON] et al. [130] utilize the Cooja network simulator to examine the performance of RPL under duty-cycle MAC protocol. Specifically, [PERSON]. [130] simulates RPL over the classical XMAC protocol and its derivative ContikiMac, where, rather than using a long preamble waiting for the receiver to wake up, the sender repeatedly sends the same packet until a link layer acknowledgment is received. As a baseline, [PERSON]. [130] uses NullRDC, an always-awake node. As expected, the results show that NullRDC is better in terms of latency, while ContikiMac outperforms the others in terms of power consumption. [PERSON] and [PERSON] [131] also utilize the Cooja network simulator to evaluate which OF is more suitable for a WSN in healthcare scenarios. OF0 and ETX are examined in various network topologies, such as the grid and random topology, under diverse densities. They conclude that the OF0 is more efficient with respect to packet delivery ratio (PDR) and power consumption in the random topology setup. [PERSON] et al. [132] propose an energy-efficient and path-reliability-aware objective function (ERAOF). The OF suggested by ERAOF linearly combines energy consumption and link quality (in terms of ETX) routing metrics. Even though the selected routes are not optimal in either one of the objective metrics, they provide a balance between energy efficiency and reliability. [PERSON] and [PERSON] [133] suggest an energy threshold RPL (ETRPL), which, in addition to the ETX metric, incorporates in its objective function the remaining energy of the preferred forwarding (parent) node. ETRPL performance is evaluated via Cooja simulator.