# Performance Evaluation of Mobile RPL-Based IoT Networks under Hello Flood Attack
## 5 Methodology and Setups
### Performances Metrics  
The simulation aimed to assess the impact of employing different group mobility models under two distinct conditions: with and without the Hello Flood attack. The primary focus was on evaluating how the attack and the models influence the operational efficiency of the network. Evaluation criteria included crucial performance indicators such as throughput, the Packet Delivery Ratio (PDR), End-to-End Delay (E2 ED), Expected Transmission Count (ETX), and Average Power Consumption (APC). These metrics are widely acknowledged for their significance in accurately measuring network performance and responsiveness.  
The Packet Delivery Ratio (PDR) serves as a fundamental quantitative metric, delineating the effectiveness of data transmission within the network. It quantifies the ratio of successfully delivered data packets to the total dispatched packets. Mathematically, the PDR is encapsulated by Equation (1) [5]:  
\[\mathrm{PDR}=\frac{P_{received}}{P_{Generated}}\times 100 \tag{1}\]  
where \(P_{received}\) denotes the total number of packets received by the sink node, and \(P_{Generated}\) represents the total number of packets generated by the source nodes.  
The End-to-End Delay (E2 ED) measures the time taken for data transmission to occur from a source node to its destination node. It is calculated using the following Equation (2) [5]:  
\[\mathrm{E2 ED}=\ Time_{receiver}-\ Time_{sent}\ (\mathrm{ms}) \tag{2}\]  
where \(\ Time_{receiver}\) represents the timestamp value when the packet is received at the destination node, and \(\ Time_{sent}\) denotes the timestamp value when the packet is transmitted from the source node.  
According to Equation (3), the throughput measures the rate at which data is effectively transmitted across a network, typically expressed in units such as Kilobits per second (Kbps) or packets per second (PPS) [20].  
\[\text{Throughput}=\frac{\text{Total received Data}}{\text{Simulation Time}}\ \ (\text{Kbps}) \tag{3}\]  
where \"Total Received Data\" refers to the quantity of successfully received data at the destination node during the simulation. \"Simulation Time\" refers to the simulation's duration.  
In wireless ad hoc networks, ETX, or Expected Transmission Count, acts as a measure estimating the anticipated number of transmissions needed for a packet to successfully traverse a link between nodes. It provides insight into the reliability of a link, factoring in aspects like packet loss and interference. Calculating ETX involves utilizing the PDR, where the ETX value is derived as the reciprocal of the PDR, as illustrated in Equation (4) below [5].  
\[\text{ETX}=\frac{1}{\text{PDR}}=\frac{P_{Generated}}{P_{received}} \tag{4}\]  
The Average Power Consumption (APC) represents the average energy consumption rate of simulated nodes within a network over a defined period. It serves as a crucial metric for evaluating the energy efficiency of networked devices and their implications for battery longevity. The APC is computed using Equation (5) [5]:  
\[\text{APC}=\frac{\text{Energest}_{value}*I*V}{\text{Rtimer}_{second}*\text{ Runtime}}\ \text{Mw} \tag{5}\]  
\(\text{Energest}_{value}\) denotes the energy consumption data retrieved from the Energest module in Contiki, offering insights into the energy usage of components like the CPU, radio, and peripherals. I and V signify the current (in amperes) drawn by the node and the voltage (in volts) supplied to it, respectively. \(\text{Rtimer}_{second}\) represents the time (in seconds) recorded by the Rtimer module, a real-time timer component in Contiki. \"Runtime\" indicates the total duration of the simulation (in seconds).