## 3 The Proposed SP-IoUAV Model
### Intrusion Detection System (IDS)
#### 3.3.2 Intrusion Detection Engine
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Specification Types** & **Name** & **Value** \\ \hline \multirow{7}{*}{**Software**} & Operating System & Microsoft Windows 11 Pro \\ \cline{2-3}  & Programming Language & Python3 \\ \cline{2-3}  & Integrated Development Environment (IDE) & Visual Studio Code (VSCode) \\ \cline{2-3}  & Development Framework & OpenCV \\ \cline{2-3}  & Drawing and Visualization Tool & Draw.io \\ \cline{2-3}  & Deep Learning Framework & TensorFlow \\ \cline{2-3}  & Deep Learning Framework & PyTorch \\ \cline{2-3}  & Simulation Tools & ns3, OMNeT++ \\ \cline{2-3}  & Data Analysis Tool & Origin Pro 9.0 64 bit \\ \hline \multirow{3}{*}{**Hardware**} & Processor & Intel(R) Core(TM) i5-8400 CPU @ 2.80 GHz, \\  & & 6 Core(s), 6 Logical Processor(s) \\ \cline{1-1} \cline{2-3}  & RAM & 24 GB \\ \cline{1-1} \cline{2-3}  & Hard Disk & 2 TB \\ \hline \hline \end{tabular}
\end{table} 
Table 3: System Requirements. Moreover, CICIDS2017 contains a mixture of benign and the latest common attacks, closely resembling real-world data in the form of PCAPs. Additionally, it includes labeled flows with essential details, such as timestamp, source and destination IPs, source and destination ports, protocols, and attack information, stored in CSV files, facilitating network traffic analysis using CICFlowMeter. ### Simulation Setup

In the simulation setup subsection, we provide specific details regarding the parameters and configurations used to evaluate the performance of the SP-IoUAV model. For our simulation environment, we utilized the ns3 simulator, which allows us to recreate real-world scenarios to assess the effectiveness of our proposed model in detecting and preventing intrusions in UAV networks. In our simulation, we considered a total of 50 UAV nodes, each equipped with a communication range of 200 m to enable effective communication within the network. To replicate the dynamic movement patterns of UAVs in a smart-city environment, we implemented realistic mobility models, such as Random Waypoint and Manhattan. For simulating real-world traffic scenarios, we integrated the CIC-IDS2017 dataset through the OMNeT++ framework, providing comprehensive smart-city traffic patterns for evaluation. Additionally, we introduced various intrusion scenarios, including data injection attacks and unauthorized access attempts, to assess the SP-IoUAV model's ability to detect and prevent different types of intrusions in UAV networks. By carefully defining these parameters and scenarios, we established a comprehensive and representative simulation environment, enabling rigorous testing of the SP-IoUAV model's efficiency and robustness in safeguarding UAV operations within a smart-city setting. ### Comparative Analysis

In this section, the proposed model's performance is assessed by comparing it to several state-of-the-art methods based on the same dataset, such as FCL-SBL [31], RF-RSCV [30], and RBFNNs [27], considering parameters such as accuracy, precision, recall and F-score. All performance results are based on the confusion matrix shown in Figure 3.

In machine learning, a confusion matrix is a table used to assess the performance of a classification model. It compares the predicted and true labels of the data and displays the number of true positives, true negatives, false positives, and false negatives. True positives are correctly identified positive cases, true negatives are correctly identified negative cases,

Figure 3: Confusion Matrix. false positives are negative cases that were incorrectly identified as positive, and false negatives are positive cases that were incorrectly identified as negative. The confusion matrix is used to calculate metrics such as accuracy, precision, recall, and F1-score, which provide valuable insights into the model's effectiveness in distinguishing between classes and identifying areas for improvement. #### 4.4.1 Accuracy

Accuracy is a performance metric used to measure the overall correctness of a predictive model.