## 3 Materials and Methods
### Simulations
Third, the _outputs_ provided by the simulator are the time stamps, general statistics, energy statistics, routing tables and the connectivity matrix. The sensors will interact within the network with the collaborative scheme and then with the cooperative approach, and the behavior of the PDR, RSSI and energy metrics of the network will be monitored under these paradigms. In this work, the energy in active mode of a sensor is used since we want to show only the main tasks of the sensor in the network: those that demand the most energy or that have the greatest dominance in energy consumption. In order to simulate the possible jamming in IWSN, the physical, MAC and network layer parameters need to be declared. As seen in Table 4, the sensor nodes send packets with a rate of 1% to 4% to a coordinator (sink node); the transmission power used is 0 decibel milliwatts (dBm) for active transmission mode and the receiving power sensitivity threshold is \(-85\) dBm. Because of the noisy environment, the network uses the World Wide Industrial, Scientific and Medical operational frequency band of 2.4 GHz, and uses the worldwide parameter of maximum bit rate declared as 250 kbps. The WSN has been configured inside a MAC layer under the CSMA/CA Protocol, and is used with a maximum of five CSMA retries and three retransmissions per packet. While transmission happens, the nodes wait for the channel to be idle to a new start transmission. The simulator calculates the energy consumption using the model shown in Equation (1). This energy consumption model takes into account all the activities or tasks that a node executes when it is in active mode. The electrical power is calculated, which is the product of the _voltage_ to which the node is connected and the _current_ that flows through it. As each activity of the node lasts a certain specific _time_, multiplying the electrical power by time gives the energy in _joules_. Table 5 presents the information of the energy model used for the simulations and experiment [58]. \begin{table}
\begin{tabular}{l c} \hline \hline
**Parameter** & **Value** \\ \hline \multicolumn{3}{c}{**Physical Layer Parameters**} \\ \hline Sensitivity threshold & \(-85\) dBm \\ Transmission power & \(0\) dBm \\ \hline \multicolumn{3}{c}{**MAC Layer Parameters**} \\ \hline Maximum retransmission number & 3 \\ Maximum retry number & 5 \\ Maximum number of tries to reach a node from the collector & 9 \\ Packet error rate (PER) & 1\% to 4\% \\ Average frame length & 22 bytes \\ Maximum number of back-offs & 4 \\ Packet frame size & 30 bytes \\ MAC protocol & IEEE 802.15.4 \\ MAC layer & CSMA/CA \\ \hline \multicolumn{3}{c}{**Network Layer Parameters**} \\ \hline Maximum Bit Rate - Worldwide & 250 kbps \\ Scenario & Static nodes \\ Operational frequency band & 2.4 GHz (Worldwide ISM band) \\
**Simulation 1:** & \\ Network area & 500 m\({}^{2}\) \\ Number of nodes & 50, 100, 200, 300, 400 and 500 \\ Sink location & Center \\
**Simulation 2:** & \\ Network area (m\({}^{2}\)) & 100, 300, 500, 1000, 5000, 10,000 \\ Number of nodes & 200 \\ Sink location & Center \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Simulation parameters under CSMA/CA [55; 56; 57]. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multicolumn{3}{c}{**Node Task or Activity**} & **Voltage (mV)** & **Current (mA)** & **Time (ms)** & **Energy (J)** \\ \hline \(E_{S}\) & Start-up mode & 120 & 12 & 0.2 & 0.000288 \\ \hline \(E_{M}\) & MCU (32-MHz clock) & 75 & 7.5 & 1.7 & 0.000956 \\ \hline \(E_{CSMA}\) & CSMA/CA algorithm & 270 & 27 & 1.068 & 0.00778 \\ \hline \(E_{SW1}\) & \(R_{x}\) to \(T_{x}\) switching & 140 & 14 & 0.2 & 0.000392 \\ \hline \(E_{SW2}\) & \(T_{x}\) to \(R_{x}\) switching & 250 & 25 & 0.2 & 0.00125 \\ \hline \(E_{R_{x}}\) & Reception mode & 250 & 25 & 4.1915 & 0.0262 \\ \hline \(E_{T_{x}}\) & Transmission mode & 320 & 32 & 0.58 & 0.00426 \\ \hline \(E_{SD}\) & Shut down mode & 75 & 7.5 & 2.5 & 0.00141 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Energy model.