# New Detection Paradigms to Improve Wireless Sensor Network Performance under Jamming Attacks
## 4 Analysis of Results
This differential makes the \"near\", \"middle\" and \"far\" columns are relative, not absolute, values of the evaluation of the three variables on average: energy, retransmissions, and CSMA retries. In this Figure the scale is up to 3 because an average estimate of each metric is made and its value is weighted up to 3 so that when we introduce the jammer node, differences are found and hence the colors of the squares come out (which represent the nodes in the network) and we can identify affected nodes. Moreover, an area that is slightly affected in all cases is the proximity to the coordinator node because this becomes a bottleneck because in this type of network all the nodes send packets to the coordinator node, which is located in the lower left corner and, being a square topology, there are few nodes with direct access to this sink node. Figure 2: Three scenarios using the detection technique over MPH protocol. Table 2 shows the percentage accuracy of each scenario with respect to the attack zone (where the jammer node should be found). In addition, it presents the percentage of false positives that are nodes incorrectly marked as attacked, but they should not be. This can be due to interference or some problems in the communication channel, but it diverts the attention of the network in the affected zone. The affected area represents the number of nodes that present performance metrics with anomalous values. Remember that the measured parameters for nodes are energy, retransmissions and retries for listening to the channel (CSMA retries). Under any of the two jamming detection mechanisms (Connected or Extended) the nodes compare their metric values, if with any of the considerations of each scheme these values are not similar, this node is marked, and this type of marked nodes make up the affected area. However, in each detection mechanism, these decisions to mark nodes can fail and these nodes that are really affected become false positives. False positives make the affected area confused and the position of the jammer node is harder to find. In the simulation, we know where the jammer node is, but we need each detection mechanism to identify it completely. For this reason, we have chosen 3 positions to locate the jammer node in Figure 1: near to the coordinator node, middle in the topology, and far from the coordinator node. In each of the scenarios we know the number of nodes that surround the jammer node (according to the position it has in the topology), then we can know that for each position the detection mechanism must recognize the affected nodes. Then, the best scenario is the number 3 because the affected nodes are recognized at 100% in the three cases of position of the jammer node and the amount of false positives is much lower than in the other two scenarios (8%, 4%, and 4%). This means that the affected area is delimited with better precision and the affected nodes are clearly recognized. In Figure 3 we observe the two approaches for gathering the performance metrics information: Connected and Extended mechanisms. These simulations were run assuming Scenario 3, i.e., the scenario with better performance. The results show that we have about 7% better resolution of the affected area under jamming with the Extended Mechanism approach. In this Figure, we look for the delimitation of the area where the jammer node is located. There are three positions of the jammer node (near, middle and far) and the darkest nodes are those that are detecting the affected area. The comparisons among performance metrics are done with more information in the Extended Mechanism case, which provides a more assertive decision for sending the control packet. In the Connected approach, the information is only gathered from the directly connected neighbors, so the self-aware algorithm is less efficient. Both mechanisms collect information on node performance metrics that have the same characteristics with respect to proximity to the coordinator node. We also run a simulation under network stress conditions.