# New Detection Paradigms to Improve Wireless Sensor Network Performance under Jamming Attacks
## 4 Analysis of Results
### Energy Analysis as a Comparison Metric  
Energy is a global metric that influences autonomy in wireless networks. It is important that these networks operate for long periods without human intervention. All performance metrics mentioned in this work impact the energy consumption of the nodes directly or indirectly. Energy consumption is reflected in batteries life and, therefore, in the connections and disconnections of nodes. All these topology changes represent more effort for the routing protocol as the keep the channel busy while the network becomes reconfigured again. Another contribution of our work is our proposed energy model capable of quantifying the total energy consumed and the energy invested in the main activities of the nodes in a network. This model is based on the time it takes each node to perform the main tasks as a part of a network. This time is reflected into a consumed energy in each activity, and is calculated depending on the parameters involved in each task performed by the node. These times and their voltage and current consumption are listed in Table 3, where the different types of energy considered are shown. Our work considers the energy spent by the MAC and the Network layers. An analytical model based on the CC2530 chip operation [35], system-on-chip (SoC) solution for IEEE 802.15.4, ZigBee, from Texas Instruments is proposed here. This model describes the energy used for each of the functions performed by a CC2530 chip, from the moment that a node is on and is part of the network, as it receives and sends messages, runs MAC layer algorithms, and changes of state, to the time the node is off. This model includes the main types of energy of the basic activities that sensors carry out in a common performance in a network. These types of energy are: Microcontroller energy \((E_{MC})\), starting-up energy \(\big{(}E_{Starting}\big{)}\), shutdown energy \((E_{Shutdown})\), CSMA/CA algorithm energy \((E_{CSMA})\), switching energy \(\big{(}E_{Switching}\big{)}\), transmission energy \((E_{TX})\) and receiving energy \((E_{RX})\). All these energies are expressed in Joules. Figure 5: Connected vs extended mode under high traffic. \begin{table}
\begin{tabular}{l c c c c} \hline \hline  & **Voltage (mV)** & **Current (mA)** & **Time (ms)** & **Energy (J)** \\ \hline Start-up mode & 120 & 12 & 0.2 & \(E_{Starting}=0.000288\) \\ MCU (32-MHz clock) & 75 & 7.5 & 1.7 & \(E_{MC}=0.000956\) \\ CSMA/CA algorithm & 270 & 27 & 1.068 & \(E_{CSMA}=0.00778\) \\ Switch from RX to TX & 140 & 14 & 0.2 & \(E_{Switching}=0.000392\) \\ Switch from TX to RX & 250 & 25 & 0.2 & \(E_{Switching}=0.00125\) \\ Radio in RX mode & 250 & 25 & 4.1915 & \(E_{RX}=0.0262\) \\ Radio in TX mode & 320 & 32 & 0.58 & \(E_{TX}=0.00426\) \\ Shut down mode & 75 & 7.5 & 2.5 & \(E_{Shutdown}=0.00141\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Energy Model [36]. Therefore, the total energy can be calculated with Equation (1)  
\[ \begin{array}{ll}E_{Total}=&E_{MC}+E_{Starting}+E_{Shutdown}\\ &+E_{CSMA}+E_{Switching}+E_{TX}+E_{RX}.\end{array}  \tag{1}\]  
The energy model described by the above equation measures the energy used by the main functions of a node belonging to a sensor network, assuming that the functions related to the wireless communications are the most relevant form an energy point of view. We take into account that one of the main effects of attacks on WSNs is the increase in consumption in the attacked nodes, which reduces the useful life of the node and the network. Therefore, it is essential to estimate the consumption impact of both the attacks and the strategies adopted to improve the system security. Table 4 shows the energy consumption for each of the node's main activities at network level.