## 6 Experimental Evaluation of SRF-IoT Framework
### Configuration and Metrics
The Median PDR, \(E[DRptk]\), is given by:  
\[E[DRpt]=Median(S) \tag{5}\]  
where \(r\) is the repetition number, \(m\) is the total number of repetitions for each simulation, and \(Median(S)\) is the median value of the set \(S\). Packet delivery ratio from all repetitions are included in the set \(S\) to calculate the \(Median(S)\) value. The Median Parent Switch, \(E[PS]\), is given by:  
\[PS_{r}=\sum_{k=1}^{n}P_{k} \tag{6}\]  
\[E[PS]=Median(PS) \tag{7}\]  
where \(P_{k}\) the parent switch of node \(k\), \(PS_{r}\) the sum of parent switches for repetition \(r\), \(r\) the number of repetitions for each simulation, and \(Median(PS)\) is the median value of the set \(PS\). The set \(PS\) contains all parent switches for all repetitions so that the \(Median(PS)\) value is calculated. The Median Packets Dropped, \(E[Dptk]\), is given by:  
\[D_{r}=\frac{Drop_{r}}{\sum_{k=1}^{n}TA_{k}} \tag{8}\]  
\[E[Dptk]=Median(D) \tag{9}\]  
where \(Drop_{r}\) the total packets dropped in repetition \(r\), \(TA_{k}\) the total number of packets transmitted from node k including multicast and unicast packets, \(D_{r}\) the percentage of packets dropped in repetition \(r\), \(m\) the number of repetitions for each simulation, and \(Median(D)\) is the median value of set \(D\). The total packets dropped from all repetitions are included in set \(D\) so that the \(Median(D)\) is calculated. The Median IDS Packet Overhead, _E[IDS]_, is given by:  
\[Sent_{r}=\sum_{k=1}^{n}TA_{k} \tag{10}\]  
\[I_{r}=\frac{\sum_{a=1}^{b}IDS_{a}}{\sum_{r=1}^{n}Sent_{r}} \tag{11}\]  
\[E[IDS]=Median(I) \tag{12}\]  
where \(k\) is the number of node sending the packets, \(n\) is the total number of nodes, \(TA_{k}\) in (10) is the total transmitted packets from node k including multicast and unicast packets, \(Sent_{r}\) is the sum of packets sent in repetition \(r\), \(a\) is the number of SRF-IDS detector, \(b\) is the total number of SRF-IDS detectors \(IDS_{a}\) is the total number of SRF-IDS packets sent from SRF-IDS detector \(a\) to SRF-IDS root, \(m\) is the total number of repetitions for each simulation, \(I_{r}\) the SRF-IDS packet overhead percentage in repetition \(r\), and _Median(I)_ is the median value of set \(I\). The calculated values from all repetitions are added in set \(I\) to calculate the _Median(I)_ value. Regarding simulation configuration, the simulator called Whitefield framework provides a configuration file in which proper settings were defined. In that file, various simulation options can be defined by the user. The options used are shown in \[S_{r}=\frac{Rcvd}{\sum_{k=1}^{n}P_{k}} \tag{4}\]0 Simulation execution time is defined as 60 min. Normal and SRF-IoT scenarios using SRF-OF are repeated 10 times, whereas malicious scenarios using MRHOF are repeated only four times. The reason for repeating the malicious scenarios only four times is that SRF-IDS had the TM module disabled, and no significant difference was observed when the scenarios were repeated four or more times. Regarding normal and SRF-IoT scenarios, the number of repetitions is higher as the observed results varied, and we wanted a large sample for analysis. SRF-IDS detectors in normal and SRF-IoT scenarios are used only to capture traffic and calculate metrics based on the observed measurements. Consequently, using more SRF-IDS detectors allow us to collect a large sample for analysis. In contrast, SRF-IoT scenarios have SRF-IDS deployed with TM enabled. This is to investigate how well the proposed security framework isolates attackers and find the recommended number SRF-IDS detectors that have to be deployed in a network for best protection. The seed number plays a significant role in simulations. It affects the behaviour of the nodes regarding processing and packet transmission times. Therefore, we use random seed in each repetition so that the Whitefield simulator produces random results in each run.