## 4 Results
### Simulation 1  
Increasing the number of jammer nodes in the network was used to evaluate and confirm the impact of jamming and different network densities in energy. In the simulation, we varied the quantity of jammer nodes present in the network, and the energy level variation of the network could thus be obtained for different types of jamming. Figure 7 presents the different results that were found when increasing the amount of nodes giving jamming interference to the network. When faced with networks with different numbers of nodes, the behavior they present when the number of jammer nodes increases is an almost linear increase in energy consumption. Deceptive and constant jammers are those who make the network spend more energy in a steady state. When a constant jammer is present, it sends chaotic bits to the medium using no specific rules, so the communication is impaired by the attack. This excessive activity needs to use more processors and transmitters, and energy is wasted since instead of transmitting data, it is used to boycott the network. This type of attack is easier to detect due to the high impact it has on energy consumption. In a very different scenario, we find the reactive jammer, which is a spy who is always listening to the network waiting for the perfect moment to carry out an attack. When communication starts, this jammer corrupts the packets that are being sent by the sensor nodes at that moment. With reactive attack, the network spends on average less than 40% of the energy that a constant jammer would use to attack the network. The reactive jammer is always spying on the nodes, but the network suffers less than other types of attack because the nodes only lose power and packets at a specific time when the activity increases; notwithstanding, the foregoing, reactive jamming turns out to be in proportion to the time it acts, more efficient than other types of jammer. It is important to note the relevance of detecting jamming attacks before their possible propagation to other nodes, since allowing the interference to be maintained, especially if 25% of the infected nodes were reached, in any of the scenarios shown, generates possible  
Figure 7: Types of jamming varying the number of nodes. processor failures, packet loss, slow communication and a general state of instability. A bad state in the network will affect the correct monitoring of the industrial process causing economic losses. In addition to the above, results were obtained by performance metrics of the network subjected to various types of jamming, taking into account the approaches for cooperative and collaborative communication of the members of the network. First, as seen in Figure 8, the PDR simulation was carried out for cooperative and collaborative communication approaches, increasing the number of nodes to see the behavior of the network. The network performs best under a cooperative scheme when it is not jammed; however, the collaborative scheme has better results when the network is faced with any kind of jamming interference. When there is no jamming, in the cooperative scheme, the nodes first process those activities that the network asks of them, and this path is more efficient because operations are centralized. However, at the time of a jamming attack, the network asks the node for incongruuous activities because the communication is affected by the presence of the jammer, and the centralized communication no longer works, but it should be decentralized so that the nodes first process their information and then what the network asks of them. The absence of jamming means an optimal PDR, affecting more packet delivery in constant-type jamming, since the jammer is always decreasing the communication; even in reactive jamming, a small decrease in PDR can be perceived. It can be seen that since a WSN has more nodes, the difference between collaborative and cooperative schemes is more significant.