## 6 Results
### Simulation Experiments Results  
In this section, simulation experiments are conducted for four types of frameworks named S-2 EC-ERF, S-2 EC-LR, S-2 EC-DT, and S-2 EC-Ada. The utilization of multiple algorithms within the S-2 EC framework allows for a comprehensive exploration of its capabilities across various learning algorithms. This study aimed to evaluate the effectiveness and performance of the S-2 EC-ERF framework on real time accuracy, packet delivery ratio, average throughput, mean power consumption, and end-to-end delay to shed light on its robustness and applicability. Through these simulation experiments, this study seeks to gain insights into the comparative strengths and weaknesses of each framework, thereby contributing to a deeper understanding of the overall efficacy in practical applications. The comparison in terms of accuracy in real-time simulation across different numbers of attack nodes for S-2 EC-ERF, S-2 EC-LR, S-2 EC-DT, and S-2 EC-Ada provides valuable insights into the performance, as shown in Figure 5. Initially, it is notable that S-2 EC-ERF consistently achieved high accuracy levels across all scenarios, thereby maintaining a near-perfect accuracy rate of 99% for most scenarios. This consistency suggests that S-2 EC-ERF is robust in accurately detecting and mitigating attacks in real-time simulations across varying numbers of attack nodes. However, the performance of the other methods,S-2 EC-LR, S-2 EC-DT, and S-2 EC-Ada, exhibited more variability. While S-2 EC-LR and S-2 EC-DT started with relatively high accuracy levels at 96% and 93%, respectively, for five attack nodes, their accuracy decreased as the number of attack nodes increased. Particularly, S-2 EC-LR showed a gradual decline in accuracy with increasing attack nodes, reaching 81% accuracy for 20 attack nodes. S-2 EC-DT followed a similar trend, thereby dropping to 86% accuracy for 25 attack nodes. This indicates that these methods may struggle to maintain consistent accuracy levels as the complexity of the attack scenario increases. On the other hand, S-2 EC-Ada exhibited slightly lower accuracy compared to the other methods, with accuracy ranging from 95% to 90% across different numbers of attack nodes. While its accuracy was generally lower compared to S-2 EC-ERF, S-2 EC-Ada showed more stability in performance across different attack scenarios compared to S-2 EC-LR and S-2 EC-DT. These results highlight the importance of robustness and consistency in intrusion detection, particularly in real-time simulations where accuracy is crucial for timely threat mitigation. In terms of packet delivery ratios, the study evaluated the S-2 EC-ERF, S-2 EC-LR, S-2 EC-DT, and S-2 EC-Ada across varying numbers of attack nodes (5, 10, 15, 20, and 25), wherein discernible trends emerged, as shown in Figure 6. S-2 EC-ERF consistently demonstrated the highest packet delivery ratios among all the algorithms. At 5 attack nodes, S-2 EC-ERF achieved a packet delivery ratio of 93%, which gradually decreased to 76% as the number of attack nodes increased to 25. Similarly, S-2 EC-LR and S-2 EC-DT exhibited declining packet delivery ratios as the number of attack nodes increased, but they generally maintained lower delivery ratios compared to S-2 EC-ERF. S-2 EC-Ada consistently yielded the lowest packet delivery ratios across all scenarios, with values ranging from 78% at 5 attack nodes to 61% at 25 attack nodes. These findings underscore the superior resilience of S-2 EC-ERF in maintaining packet delivery in the presence of attacks compared to S-2 EC-LR, S-2 EC-DT, and S-2 EC-Ada. When the average throughput performance was compared between S-2 EC-ERF, S-2 EC-LR, S-2 EC-DT, and S-2 EC-Ada across different numbers of attack nodes, distinct trends emerged, as shown in Figure 7. S-2 EC-ERF consistently maintained relatively high average throughput values across all scenarios, thereby indicating its efficiency in data transmission even under adversarial conditions.