# New Detection Paradigms to Improve Wireless Sensor Network Performance under Jamming Attacks
## 4 Analysis of Results
### Comparison among AODV, DSR, and MPH Routing Protocols
\begin{table}
\begin{tabular}{l c c c c c c} \hline  & **Retransmissions** & **CSMA Retries** & **Delay End-to-End (sec)** & **Resilience Capacity (\%)** & **Affected Nodes** & **Energy (0)** \\ \hline
**AODV** & 2.52 & 3.44 & 1.398463 & 80 & 18 & 6.4 \\
**DSR** & 2.47 & 3.33 & 1.284773 & 75 & 13 & 6.0 \\
**MPH** & 1.93 & 2.60 & 0.811836 & 85 & 9 & 3.9 \\ \hline \end{tabular}
\end{table} 
Table 5: Performance metrics under attack and Scenario 3 when the jammer is in the middle of the topology. Figure 8: Comparison for AODV, DSR, and MPH protocols under Scenario 3. In Figure 10 we represent the energy values for each of the three protocols in a box and whiskers scheme. A graph of this type consists of a rectangular box, where the longer sides show the interquartile path. A vertical segment that indicates where the median is positioned and therefore its relation to the first and third quartiles divides this rectangle. This box is located on a scale on a segment that has as ends the minimum and maximum values of the variable. The lines that protrude from the box are called whiskers. These whiskers have a prolongation limit, so any data or case that is not within this range is marked and identified individually. On the bottom of the box is shorter than the one on the right in the three studied protocols; so, 25% of the nodes that spend less energy are more concentrated than 25% of those which consume more. In addition, for the three protocols, the energy consumed by nodes between 25% and 50% of the population is more dispersed than between 50% and 75%. We observe that the displacement of the box plots downwards, especially in the MPH protocol, indicating that here most nodes spend less energy in both mechanisms, being the difference between the maximum and the lowest minimum, as well as the interquartile difference. The results show that in the AODV protocol the energy distribution is more dispersed than in the other two protocols and there is a higher energy expenditure compared to the other two protocols. For the MPH protocol, there is more atypical data than in the other two protocols because in both mechanisms, the nodes that surround the jammer node consume more energy, a parameter that is very noticeable to isolate an area of the network. Figure 9: Energy per node under each protocol. Table 6 shows values of performance metrics along the network. This table describes a comparison of the three protocols studied with the modifications made in each detection mechanism jamming (Extended and Connected). The tests were made with non-ideal links and traffic rate of 10 packets per second per node under the grid topology shown in Figure 1. Metrics are average values of retransmissions and CSMA retries. The delay end-to-end is calculated as the average per route. Overhead is a metric that influences the amount of network collisions and the channel occupancy. Overhead indicates the number of control packets under a routing protocol. It depends on the number of routing packets that the routing protocol needs to connect nodes and to route packet traffic. Thus, it is calculated taking into account the number of control packets that are needed to route a traffic packet. Ideally, a routing protocol should need the least amount of control packets. A metric such as energy is given by the average energy per node along the network. Resilience is a parameter that measures the recovery time of a system. This metric is analyzed under the network under normal conditions and after 30 s the jammer node is introduced in the middle of the topology and after 10 s the jammer node goes out and here we observe and measure how long it takes the network to recover and return to its normal conditions. The affected nodes are a metric that is set as a ratio of nodes that appear altered in their performance parameters and are those that are actually encircling the jammer node between nodes that ideally should surround the jammer node completely.