# A Deep-Learning-Based Secure Routing Protocol to Avoid Blackhole Attacks in VANETs +
## 5 Performance Evaluation  
### Simulation Environments and Network Parameters  
In the conducted simulation, we attempt to gain a deeper understanding of the proposed routing and clustering protocol. In this comparison, we look at how the DLSR protocol performed against the ad hoc on-demand distance vector (AODV) protocols. Table 9 shows the simulation environments and parameters.  
We simulate the proposed routing protocol using network simulator 3 (NS3), where the simulations are run for 1000 s with 5 s for each session. We specifically deploy 30, 50, and 100 nodes moving throughout 1000 m\({}^{2}\)\(\times\) 1000 m\({}^{2}\) area in an urban scenario. Additionally, we compare two different mobility models, namely, the RPGM model [39; 40] and the RWP model [41], to evaluate their performance in VANETs. The RPGM model represents a scenario where vehicles move cohesively in groups, following similar trajectories and maintaining relative proximity to each other. On the other hand, the RWP model represents a scenario where vehicles move randomly and independently, each following its own trajectory without any coordination with other vehicles. The purpose of this comparison is to understand how the choice of mobility model impacts various performance metrics. The mobile nodes' initial positions are randomly distributed along the street, and they move at different speeds (20, 40, 60, and 80 km/h). Each mobile node has an omnidirectional antenna, and the node's maximum transmission range is set to 250 m (approximately). The medium access control (MAC) layer is modeled based on the IEEE 802.11 standard. A received signal strength indicator (RSSI) threshold of \(-\)80 dBm is used to define the communication range more practically, ensuring realistic communication scenarios in the simulation. Furthermore, to evaluate the performance of the DL framework, we calculate the accuracy of the predicted optimal value against the output data from the test set. This is accomplished by computing the root mean square error (RMSE) in our proposed DL framework. The RMSE can be expressed as [35]  
\[\texttt{RMSE}=\sqrt{\frac{1}{n}\sum_{k=1}^{n}(\delta_{(k)}-\widetilde{\delta }_{(k)})^{2}}, \tag{11}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **Size** & **Activation Function** \\ \hline Input & 3 & - \\ Layer 1 & 120 & ELU \\ Layer 2 & 200 & ELU \\ Layer 3 & 80 & ELU \\ Output & 3 & LINEAR \\ \hline \hline \end{tabular}
\end{table}
Table 8: The layer structure of the DNN model for routing weight minimization.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Simulator & NS3 \\ Simulation area & 1000 \(\times\) 1000 m\({}^{2}\) \\ Simulation time & 1000 s \\ Packet size & 1024 bits \\ Mobility model & RPGM and RWP \\ Session length & 5 s \\ Number of nodes & [30; 50; 100] \\ Node’s speed range & [20:20:80] (km/h) \\ Transmission range & 250 m \\ Receive signal strength indicator (RSSI) threshold & \(-\)80 dBm \\ MAC protocol & 802.11a \\ \hline \hline \end{tabular}
\end{table}
Table 9: Simulation environments and network parameters.  
where \(n\) represents the number of samples in the test set, \(\delta_{(k)}\) represents the the predicted optimal value of the \(k\)-th observation in the dataset, and \(\tilde{\delta}_{(k)}\) represents the actual value for the \(k\)-th observation in the dataset, respectively. A smaller RMSE indicates a closer match between the predictions and the observations.