## 5 Validation of RPAL SCAOF in Simulations
### Validation of Energy-Aware Routing Metrics and SCAOF Performance
#### 5.3.1 Network Simulation Scenarios: 20 and 30 LLN Nodes  
In this scenario, 20 and 30 battery-powered A-LLN sensor nodes are respectively simulated in a grid topology. The comparison is drawn between the standard RPL model and the RPAL model. The performance metrics of network lifetime are recorded when the outputs of the Powertrace model arrive at the predefined energy storage threshold. Whether a node is active depends on the existence of a connection to the sink node. Average data collection packet delay is measured as an average value representing the time cost of the sender node to send messages to the sink node successfully. The relevant distance to the sink node for each sensor node is presented as rank in the DODAG. Because rank is not a stable value in the procedures of DODAG maintenance, it is used as a snapshot value when the nodes run out of energy. \begin{table}
\begin{tabular}{c c} \hline \hline
**Network** & \\ \hline Deployment area & 25 m \(\times\) 20 m \\ Deployment type & Random positioned \\ Number of nodes & 1 sink with 20 or 30 sensor nodes \\ Radio coverage & 100 square meters \\ Distance loss & 90\% RX Ratio \\ Nodes initial energy & 0.25 mAh = 2700 mj; millionth of 2500 mAh estimated by \\ PowerTrace Model with assumed stable 3 V voltage \\ Network layer protocols & uIPv6 \\ Routing protocol & RPL routing framework: Trickle timer: k = 10; IntervalMin = 12, \\ IntervalMax = 8; Routing Metrics: ETX, RE, link color \\ Transport layer & UDP \\ Data link layer & CSMA/CA + ContikiMAC + 6 LoWPAN \\ \hline
**Application** & \\ \hline Data length & 20 bytes per packet \\ Task type & Time drive \\ Reporting intervals (s) & 15 \\ \hline
**Simulation** & \\ \hline Time & 40 min \\ Iteration & 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Network and simulation configuration for validation of SCAOF. Tables 7 and 8 present the results from the simulation testing and quantify the performance difference between the SCAOF with energy-aware routing metrics and standard RPL MrhOF with ETX primary metrics. In Table 7, the network lifetime is considered in the two cases mentioned previously. The difference in lifetime is not large, because a small amount of energy was assigned to each node. This leads to an unexpected result that some nodes of SCAOF cannot afford the energy consumption for a parent reselection when the time is near the end of the simulation. Nevertheless, lifetime performance of RPAL's SCAOF is better than RPL's MrhOF in most comparison items for testing, except in the case where the percentage of alive or active nodes equals 0%. For other network performance metrics (_cf._ Table 8), it is evident that OF using ETX primary metrics will select the shortest path, while a routing metrics combination solution is able to choose a longer path (_cf._ \"Path hop distance\" in Table 8) to the sink node for avoiding the energy depleting node. This may lead to higher cost in packet delay, overhead on consumed memory and control messages. As SCAOF is dedicated to keeping more nodes in an active state, it can achieve a lower average packet loss rate because busy routers have a longer lifetime in these tests. Apparently, as the network size and density are increasing, more redundant RPL routers will exist in the DODAG. This leads to more serious hotspot issues when the standard RPL is adopted. In fact, more nodes cannot maintain the links with the sink node although more nodes are alive, but essentially they cannot participate in the business of this network. Table 8 reveals the network performance metrics of this simulation. The trade-off between the network lifetime and certain network performance is still like the last experiment. It should be stressed that 20% of the simulated LLN nodes have the CoAP application installed so they are able to reply with resource information organized by the CoAP protocol, and sink nodes will periodically transmit resource requests to these six nodes. The average CoAP Round-Trip Time (RTT) is the result we got from this