## 3 Data Routing Approaches in WSNs
### Delay-Aware Approaches
#### 3.2.2 Soft Delay-Aware Approaches
After receiving the data of the cluster members by the cluster heads and performing data aggregation, the results are sent to the base station through a routing tree. The whole approach consists of two main components: intra-cluster data reporting control (IntraDRC) and inter-cluster control (InterDRC) (Figure 7). IntraDRC controls the nodes inside the clusters by selecting and scheduling data reporting nodes. Also, for data report scheduling, IntraDRC scheme uses CSMA/CA to support contention-based channel access mode and TDMA to support contention-free mode but the default mode of the scheme is based on the contention-based mode. On the other hand, InterDRC establishes a data reporting tree between cluster heads to sink. For performing a data delivery from a node to sink, InterDRC considers two separate paths: one for energy-efficient delivery which is based on the traffic and another one for delay-sensitive reporting which selects the paths with minimum number of hops. The end-to-end delay in this approach is calculated as below:  
\[D_{S}=D^{prop}+(D^{res}+D^{prop})*h_{S}+D^{agg}*\mathcal{H}_{int}\]  
In this equation, \(D^{res}\) is the residence time, \(D^{prop}\) demonstrates the propagation time, \(D^{agg}\) is the delay of data aggregation which is done in each cluster, \(h_{S}\) presents the number of hops from nodes to sink and finally \(\mathcal{H}_{int}\) denotes the number of intermediate clusters between the cluster heads and the sink in the data reporting tree. The Data Gathering algorithm based on Mobile Agents (DGMA) [68] was proposed for cluster-based wireless sensor networks and it aims to reduce the network end-to-end delay and energy consumption. In DGMA, the whole network is considered as a cluster in which the base station is the cluster head. When a cluster head gathered the information of its cluster, it transmits the data to one of its neighbors which is the nearest node to the base station. This process is repeated until the results are received by the base station. Moreover, a mobile agent is considered in each cluster which passes over each hop for data collection. In this approach, cluster formation is done according to the occurrence of events. When there is no event, nodes can sleep but when an event occurs, the nodes which have detected the event are clustered and send their data to their cluster head. In this approach several states are considered for each node and the states of the nodes can be changed to another one according to some predefined thresholds. The defined threshold are: Basic Hard Threshold (BTH) to estimate the severity degree of the emergent events, Standard Hard Threshold (NTH) for waking the idle nodes up, Soft Threshold (ST) to mark the changes of data, Relative Exciting Threshold (RETT) to confirm the lifetime of the cluster heads and Absolute Exciting Threshold (AETT) to estimate the lifetime of the clusters. Also, the next hop selection in this algorithm is done based on the formula below:  
\[\mathrm{H}=\mathrm{max}\ \Big{(}\alpha*\frac{E_{a}}{E_{Max}}+\ \beta*\frac{L_{Max}}{L_{a}}\Big{)}*\ \zeta*\ I_{a}\]  
In this equation, \(E_{a}\) is the remaining energy of node a, \(E_{Max}\) is the maximum energy of node \(a\), \(L_{a}\) denotes the path loss for node \(a\), \(I_{a}\) is the event intention and \(\alpha\), \(\beta\) and \(\zeta\) are setting parameters. In the low latency routing scheme of ERB-GR [59] (introduced in Section 3.1), if a node is operating in ER-mode and has at least one ER-neighbor, it tries to choose the best next-hop node,which is that with the smallest expected latency to the sink node, from among its ER neighbors. In this approach, each node controls its duty-cycle dynamically to keep the average power consumption rate lower than the average charging rate of solar power. Thus, each node has its own operating and sleeping schedule that depends on its duty-cycle.