# A Lightweight Model for DDoS Attack Detection Using Machine Learning Techniques
## 5 Case Study: Application of IDS in Energy and Utilities IoT  
The paper has primarily focused on assessing the effectiveness of the IDS framework as an IoT network security algorithm. Its suitability has been theoretically validated through experimentation on the TON-IOT and BOT-IOT datasets, and through comparisons \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & & **Accuracy** & **Class** & **Precision** & **Recall** & **F1 Score** & **Training Time (ms)** & **Predict Time (ms)** \\ \hline \multirow{8}{*}{Case 1: BOT-IOT with All Attacks} & Logistic Regression & 92\% & 0 & 0.94 & 0.90 & 0.92 & \multirow{8}{*}{569.412} & \multirow{8}{*}{59.432} \\  & Random Forest & 100\% & 1 & 0.90 & 0.95 & 0.92 & \multirow{8}{*}{1.64415} \\  & Random Forest & 100\% & 0 & 1.00 & 1.00 & 1.00 & \multirow{8}{*}{651.873} & \multirow{8}{*}{2.9125} \\  & Naïve Bayes & 100\% & 1 & 1.00 & 0.99 & 0.99 & \multirow{8}{*}{2.9326} & \multirow{8}{*}{0.3043} \\  & ANN & 99\% & 1 & 0.99 & 0.99 & 0.99 & \multirow{8}{*}{569.412} & \multirow{8}{*}{59.432} \\  & KNN & 100\% & 1 & 1.00 & 1.00 & 1.00 & \multirow{8}{*}{1.64415} & \multirow{8}{*}{3325.77} \\ \hline \multirow{8}{*}{Case 2: BOT-IOT with DDoS} & Logistic Regression & 100\% & 0 & 1.00 & 1.00 & 1.00 & \multirow{8}{*}{16.912} & \multirow{8}{*}{0.04588} \\  & Random Forest & 100\% & 1 & 1.00 & 1.00 & 1.00 & \multirow{8}{*}{194.65} & \multirow{8}{*}{1.6478} \\  & Naïve Bayes & 100\% & 1 & 1.00 & 1.00 & 1.00 & \multirow{8}{*}{1.5244} & \multirow{8}{*}{0.1685} \\  & ANN & 95\% & 1 & 0.93 & 0.97 & 0.95 & \multirow{8}{*}{350.867} & \multirow{8}{*}{34.567} \\  & KNN & 100\% & 0 & 1.00 & 1.00 & 1.00 & \multirow{8}{*}{0.77648} & \multirow{8}{*}{940.176} \\  & KNN & 100\% & 1 & 1.00 & 1.00 & 1.00 & \multirow{8}{*}{0.77648} & \multirow{8}{*}{940.176} \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Evaluation using metrics for BOT-IOT (15 features). \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**Citation** & **Year** & **BOT-IOT** & **TON-IOT** & **Model** & **Binary** & **Multiple-Class** & **Feat.** & **No. of** & **Acc.** & **Time** \\  & **IOT** & **IOT** & **Classification** & **Classification** & **Selection** & **Features** & **K-Fold** & **(\%)** & **Time** \\ \hline
[19] & 2022 & YES & - & RF & YES & - & - & 46 & - & 99.90 & - \\
[20] & 2022 & YES & - & NB & YES & - & PCA & 25 & - & 99.40 & - \\
[21] & 2022 & YES & - & LSTM & YES & - & - & 46 & - & 96.30 & - \\
[22] & 2022 & YES & YES & ANN & YES & ETC(20) & 20 & YES & 99.00 & - \\
[25] & 2020 & - & YES & CART & YES & - & - & N/A & YES & 88.00 & YES \\
**Proposed** & **2023** & **YES** & **YES** & **NB, RF** & **YES** & **YES** & **ETC(15)** & **15** & **YES** & **100.00** & **YES** \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Comparison between existing state-of-art models and the proposed model. with other approaches. This section delves into the practical implementation of the IDS framework in a real-world application, providing readers with a more comprehensive understanding of its advantages and impact. Energy and utilities IoT integrate sensors and devices with user-interactive software to optimize energy distribution. They offer applications like smart grid monitoring and asset management. While they enhance efficiency, security is a key concern due to sensitive data. By incorporating an intrusion detection system (IDS), the energy and utilities IoT network can detect and prevent attacks, safeguarding devices and infrastructure. This integration ensures data protection, mitigates risks, and enables secure energy services. This paper provides research conducted in the energy and utilities IoT sector. The integration of renewable energy and optimization of energy usage are vital for sustainable energy transitions and combating climate change. The Internet of Things (IoT) offers numerous applications in the energy sector, including energy supply, transmission, distribution, and demand management.