# A Trust-Based Predictive Model for Mobile Ad Hoc Network in Internet of Things +
## 4 Simulation
### Simulation Parameters  
In the simulation, the IEEE 802.11 standard has been used as the MAC layer protocol. The transmission range of each node is set to 250 m. The nodes travel with a speed varied from 0 m/s to 5 m/s, with a pause time set to 5 s. A cluster may get partitions very frequently due to high node mobility. All the trust-based protocols, including our proposed protocol, may not be suitable in highly dynamic networks. UDP has been used as the transport layer protocol with constant bit rate (CBR) traffic generator of packet size 512 bytes. Simulation has been performed for 500 s with a 21-node cluster over a network area of 450 m \(\times\) 450 m. The proposed trust protocol is based on a 1-hop cluster and hence the network area is chosen to be 450 m \(\times\) 450 m. The malicious nodes drop the packets randomly whereas the good nodes drop the packets due to the environment of the network (such as mobility of nodes, collisions of packets, etc.) in our simulation. It can be observed that around 15%-20% of the packets (non-malicious drops) are lost due to the environment of the MANET. The actual reason for packet drop by a node cannot be identified easily. Thus, we consider a node as a bad node if the trust value reaches \(Min_{\tt TH}\) due to excessive packet drops and other malicious activities by the node. The summary of simulation parameters are shown in Table 1.  
**Detection Ratio: False Positive:** To evaluate the accuracy of the proposed trust model, false positive is chosen as the performance metric. False positive is measured as the ratio of the number of good nodes falsely detected as malicious to the total number of nodes in the network. Figure 4 presents the percentage of packet collision versus percentage of false positive of the proposed trust model. From the graph it is evident that only 5% nodes are wrongly detected as malicious when 24.78% and 23.36% packet collisions occur for _Low_ level and _High_ level, respectively. Again, the proposed trust model falsely detects nearly 24% nodes as malicious when 49.32% and 47.93% packet collisions take place for _Low_ level and _High_ level, respectively. Therefore, the proposed trust model performs well even when the rate of packet collision in the network is high. It should be noted that this false detection can be varied by varying the max_threshold and min_threshold parameters. These values are application-specific. **Performance Evaluation:** We considered four parameters, packet delivery fraction (PDF), packet drop rate (PDropR), packet delivery ratio (PDelR), and throughput (THR), as performance metrics in order to compare the proposed trust-based routing protocol with two existing and well-studied protocols, which are CBRP [28] and the protocol proposed by [PERSON] et al. [1]. \begin{table}
\begin{tabular}{c c} \hline \hline
**Simulation Parameter** & **Assigned Value** \\ \hline Application Agent & CBR \\ Packet Size & 512 bytes \\ Transport Agent & UDP \\ Routing Protocol & AODV \\ Network area & 450 \(\times\) 450 \\ No. of nodes & 21 \\ No. of malicious nodes & 5 \\ Mobility Model & Random Way-Point \\ Addressing Scheme & IDDIP \\ Mobility & 0-5 m/s \\ Pause Time & 5 s \\ Simulation Time & 500 s \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters and environment. Figures 5-8 show the effect of malicious node on PDF, PDropR, PDelR, and ThR, respectively for the protocols under consideration. It is evident that the packet delivery fraction is more than 0.9 in the absence of malicious nodes for all schemes. However, PDropR increases and subsequently PDF decreases with the increased number of malicious nodes for all the protocols. CBRP gives 0.61 and 0.12 as PDF when nearly 5% and 25% malicious nodes are present in the network, respectively. The protocol proposed by [PERSON] et al. offers 0.71 and 0.27, whereas our proposed protocol gives 0.77 and 0.42 as PDF for the same percentages of malicious nodes. Figure 4: False positive vs. packet collision. Figure 5: Packet delivery fraction vs. % of malicious nodes.