# Adaptive Jamming Mitigation for Clustered Energy-Efficient LoRa-BLE Hybrid Wireless Sensor Networks
## 3 Materials and Methods
### Energy Model
* \(T_{\text{Switching}}\): Time (in seconds) spent switching between modes. * \(I_{\text{Switching}}\): Current (in amperes) consumed during the switching process. * \(V_{\text{Switching}}\): Voltage (in volts) applied during the switching process. * CSMA/C A energy: \[E_{\text{CSMA}}=T_{\text{CSMA}}\cdot I_{\text{CSMA}}\cdot V_{\text{CSMA}}\]
* \(E_{\text{CSMA}}\): Energy consumed by the CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) algorithm. * \(T_{\text{CSMA}}\): Time (in seconds) spent executing the CSMA/CA algorithm. * \(I_{\text{CSMA}}\): Current (in amperes) consumed while running the CSMA/CA algorithm. * \(V_{\text{CSMA}}\): Voltage (in volts) supplied during CSMA/CA operation. * Transmission energy: \[E_{\text{TX}}=P_{\text{Length}}\cdot T_{\text{TX}}\cdot I_{\text{TX}}\cdot V_{ \text{TX}}\]
* \(E_{\text{TX}}\): Energy consumed during data transmission. * \(P_{\text{Length}}\): Length of the transmitted packet (in bytes). * \(T_{\text{TX}}\): Time (in seconds) taken to transmit a single byte. * \(I_{\text{TX}}\): Current (in amperes) consumed during data transmission. * \(V_{\text{TX}}\): Voltage (in volts) applied during data transmission. * Reception energy: \[E_{\text{RX}}=P_{\text{Length}}\cdot T_{\text{RX}}\cdot I_{\text{RX}}\cdot V_{ \text{RX}}\]
* \(E_{\text{RX}}\): Energy consumed during data reception. * \(P_{\text{Length}}\): Length of the received packet (in bytes). * \(T_{\text{RX}}\): Time (in seconds) required to receive a single byte. * \(I_{\text{RX}}\): Current (in amperes) consumed during data reception. * \(V_{\text{RX}}\): Voltage (in volts) supplied during data reception. The total energy consumed by a specific node \(i\) is as follows: \[E_{\text{Node},i}=E_{\text{ON},j}+E_{\text{MC},j}+E_{\text{OFF},j}+E_{\text{ Switching},j}+E_{\text{CSMA},j}+E_{\text{TX},i}+E_{\text{RX},j}\]
The global energy consumption for the network is calculated as the sum of the energy consumed by all nodes:  
\[E_{\text{Total Network}}=\sum_{i=1}^{N}E_{\text{Node},i}\]  
This model enables the identification of high-consumption nodes and zones, allowing for targeted optimizations in network routing protocols. The metrics provide a robust framework to evaluate and mitigate energy inefficiencies caused by retransmissions, collisions, and suboptimal routing. The energy model proposed in the referenced _Energies_ paper meticulously breaks down energy consumption in WSNs based on the primary tasks performed by sensor nodes. This model accounts for the energy expended during different operational states, including turning on, executing communication protocols, switching between tasks, receiving packets, transmitting packets, and turning off. Each type of energy increases as a direct result of specific activities undertaken by a node. For example, microcontroller energy \(E_{MC}\) is continuously consumed when a node is in active mode, executing computations and managing data transmission. When a node first powers up, it consumes startup energy \(E_{ON}\), which is determined by the time required to initialize and stabilize the node's operational state. Similarly, when a node shuts down, it incurs shutdown energy \(E_{OFF}\), accounting for the final operations before transitioning to an inactive state. The CSMA/CA energy \(E_{CSMA}\) is consumed each time a node performs a channel check before transmission. If the channel is found to be busy, the node undergoes a random back-off period and retries, increasing its total energy consumption. The switching energy \(E_{Switching}\) is particularly relevant when nodes transition between transmission and reception modes, contributing to additional power expenditures. Furthermore, the transmission energy \(E_{TX}\) and reception energy \(E_{RX}\) vary based on packet length, network congestion, and interference levels.