Page 16
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
AI-Based Intrusion Detection Systems (IDS) For Securing IoT and
Smart Grid Networks
1
Nwakeze Osita Miracle.,
2
Oboti Nwamaka Peace.,
3
Umerah Anthony Tochukwu.,
4
Nwabudike Uju
Cynthia.,
5
Chidi-onuigbo Chikaodili
1,5
Department of Computer Science, Chukwuemeka Odumegwu Ojukwu University, Uli, Anambra State
Nigeria
2
Department of Computer science, Nnamdi Azikiwe University, Awka, Anambra State Nigeria
3
Department of Computer Engineering, Federal University of Technology, Owerri, Imo State Nigeria
4
Department of Computer Science, Delta State Polytechnic, Ogwashi-uke, Delta State Nigeria
DOI:
https://doi.org/10.51244/IJRSI.2025.1213CS002
Received: 12 September 2025; Accepted: 18 September 2025; Published: 15 October 2025
ABSTRACT
The rapid expansion of Internet of Things (IoT)-Smart Grid infrastructures has been heightened in their
vulnerability tendencies to diverse and evolving cyber threats, and this prompts the need for advanced intrusion
detection mechanisms. Hence, this study presents a Multi-Channel Data Fusion Network (MCDFN) framework
which is designed for the detection and classification of both common and domain-specific cyberattacks in real-
time. The proposed architecture integrates Convolutional Neural Networks (CNN) algorithm for spatial feature
extraction with recurrent layers for temporal sequence modelling which enables an effective system for
recognition of both static and dynamic intrusion patterns. In the system, a dual-dataset training strategy was
adopted by combining the NSL-KDD benchmark dataset with realistic IoT–Smart Grid traffic collected from
Mininet-WiFi simulation environment, and this incorporated targeted attack scenarios such as Man-in-the-
Middle (MITM) and Replay attacks. Furthermore, class imbalance was addressed through oversampling
techniques in order to improve detection accuracy of the model for rare attack categories. Experimental
evaluation of the proposed model demonstrated that the MCDFN achieved macro-averaged precision, recall, and
F1-scores above 97% while maintaining a false positive rate below 1.6% across all test scenarios. Therefore, the
results confirmed that the model is effective in the detection of high-frequency threats such as DoS and
sophisticated low-frequency attacks without significant performance trade-offs. With respect to the high
accuracy, low-latency processing and adaptability to heterogeneous network environments result, the proposed
MCDFN framework represents a scalable and operationally viable intrusion detection solution for securing
critical IoT–Smart Grid infrastructures against evolving cyber threats.
Keywords: IDS; MCDFN; IoT; Smart Grid; Cyberattack Detection
INTRODUCTION
The ever-growing growth in IoT and smart grid technologies has changed the contemporary infrastructure of the
society by providing intelligence automation, real-time monitoring, and decentralized control of operative
activity in numerous spheres, including, but not limited to, energy, healthcare, and transportation (Kakolu et al.,
2023; Zhang, 2025). Nevertheless, such digital and technological change has also brought upon itself a series of
new opportunities due to the nature of such networks being highly targeted by other elevated and complicated
cyber-attacks such as Botnets, ransomware and zero-day exploits (Alzahrani et al., 2021). The use of Traditional
Intrusion Detection Systems (IDS) and rule-based sensor mechanisms in detecting novel and changing threats
has been found to fail so often in these dynamic environments.
The researchers have resorted to Artificial Intelligence (AI) as a revolutionary method of intrusion detection to
overcome these limitations. IDS powered by AI rely on Machine Learning (ML), Deep Learning (DL), and
Reinforcement Learning (RL) to monitor network traffic, identify anomalies, and update themselves to handle
the new attack patterns (Al-Garadi et al., 2020). The systems are capable of dealing with large amounts of data
in real-time, proving to be reliable in detections with low false positives (Alsarhan et al., 2023). Convolutional
Page 17
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
Neural Networks (CNN), Long Short-Term Memory (LSTM), and Isolation Forests are some of the models
exemplifying high accuracy in detection of both identified and novel threats (Ullah et al., 2022).
The networks of smart grids that combine IoT sensors in energy distribution, metering, and load balancing
systems are especially vulnerable because of its distributed network configuration and the relevant importance
of their work (Ghosh et al., 2021). The use of AI-based IDS can promote the resiliency of smart grids by tracking
the information pathways, preventing intrusion, and safeguarding control messages (Alzahrani et al., 2021; Al-
Garadi et al., 2020). Some of the more recent technologies like federated learning and blockchain further
reinforce these systems by allowing block-chain-like tamper evident logging of threats, as well as decentralized,
privacy preserving threat detection (Nwakeze, 2024; Nisha and Udhayashri, 2025).
In the recent past, several studies have shown that by pooling multiple neural networks, ensemble learning
models can reach an optimal performance rate of detecting IoT in an almost accurate way (Nwakeze and
Mohammed, 2025). Such models are superior to the traditional IDS due to adjusting to various device types and
modes of attack, which is why it is used in heterogeneous networks (Alsarhan et al., 2023). Also, there is an
emerging trend with the use of Explainable AI (XAI) to enhance the transparency and trust in an AI-powered
cybersecurity decision (Hussain et al., 2022; Ghosh et al., 2021). Besides their potential, AI-based IDS has some
issues. These are limited labelled training data, the computational burden of deep learning modules, and inability
to interpret complex AI decisions (Al-Garadi et al., 2020; Ullah et al., 2022). Furthermore, these systems must
use lightweight architectures and energy-efficient algorithms to deploy such systems on limited IoT devices
(Alsarhan et al., 2023). The first issue is central to the far-reaching implementation of AI-based IDS in real life
(Haozhe, 2025).
This piece of work aims to introduce a hybrid AI-based IDS architecture specifically designed to IoT and smart
grid systems which will address hybrid deployment architectures that mix lightweight, but precise identification
on edge or gateway devices, with more capable identification and analysis in the cloud or fog layer. Federated
learning, model compression, online learning, and others will be used as strategies to overcome privacy, resource
lightness and adaptability to changing patterns of attacks. The goal is to offer timely, powerful, and versatile
intrusion verification on heterogeneous and resource-limited settings, which correlates to the smart grid systems.
RESEARCH METHODOLOGY
In this research, the proposed study uses an experimental research design that will be applied experimentally to
come up with an AI-based IDS that is specialized to IoT and Smart Grid networks. The technique combines
Machine Learning (ML) and deep learning (DL) models in detecting known and unknown intrusions. The
experimental design is chosen because it enables systematic testing of detection algorithms under controlled
conditions using benchmark datasets which is then followed by validation in a simulated IoT-Smart Grid
environment. The block diagram of the proposed system methodology is presented in Figure 1 which shows how
the proposed methodology flows from data collection to final classification in the proposed intelligent
architecture
Figure 1: Research Methodology Block Diagram
Data Acquisition
A combination of 2 datasets was leveraged in demonstrating the training of the proposed machine learning model
in this study. NSL-KDD dataset (Revathi and Malathi, 2013) belongs to the set of benchmarks commonly
accepted in the intrusion detection research community and provides a solid basis on which to test the efficiency
of the machine learning and deep learning models. It is a better version of KDD 99 dataset (Sahil, 2022) with
most of its main limitations: the number of redundant records is too much, and the imbalance between classes is
Page 18
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
significant, as it formerly resulted in models favoring more common types of attacks (Eldakhly, 2025). The
dataset consists of 41 clear-cut connection level features extracted in the TCP/IP traffic streams and they help in
categorizing both normal activities and four key categories of network attacks namely Denial of Service (DoS),
Probe, User-to-Root (U2R) and Remote-to-Local (R2L). These features include basic packet statistics as well as
content-based features giving a picture of the network behaviour. The density and balance of the distribution of
issues in the NSL-KDD dataset make it a great point of departure in training the fundamental intrusion detection
schemes of the proposed system as well as benchmarking and validation of the schemes.
Subsequently, the Mininet-WiFi simulation data set, in its turn, adds a practical, domain-specific aspect to the
analysis through simulating realistic IoT network and smart grid network network conditions. With Mininet-
WiFi emulator employed, bespoke network configurations will be created to resemble a smart meter, sensor,
controller, and other important IoT devices usually communicating through wireless mediums. Traffic will be
captured in both benign operation conditions and malicious conditions such as, Man-in-the-Middle (MITM),
Denial of Service (DoS) flood, and Replay. The data that will be captured will consist of packet-level data of
protocol types and IP addresses, sizes of packets, timestamps and dynamic trend of traffic flow that are crucial
in real-time analysis of intrusions. This dataset ensures that the proposed IDS is not only capable of performing
well on a standard benchmark like NSL-KDD but is also rigorously tested against the complex, heterogeneous,
and resource-constrained nature of IoT-Smart Grid environments, thereby enhancing its adaptability and
operational readiness.
Data Preprocessing
Since the research involves two different data sources like NSL-KDD and Mininet-WiFi the preprocessing
approach will be customized to the quintessential nature of individual data sets to guarantee coherence and
interoperability when training the AI models. In the case of NSL-KDD, data cleaning will form the preprocessing
stage whereby inconsistent as well as corrupted values will be deleted. The features of the dataset (41 of them)
are thereafter considered in terms of significance to eliminate the least informative features with techniques like
Mutual Information and Recursive Feature Elimination (RFE) by using feature selection (Mohanty et al., 2024).
This is done to retain useful attributes useful to detect intrusions. Categorical features like protocol type, service
and Flag variables are converted into numerical using one-hot encoding and the numbers of continuous features
are scaled using Min-Max scaling technique (Williamson_5, 2024) to have comparable ranges of each variable.
Lastly, the imbalances in classes are mitigated, especially on rare types of attacks, such as U2R and R2L, through
the Synthetic Minority Oversampling Technique (SMOTE) (Wu et al., 2022) in order to make the model sensitive
towards minority classes.
In the case of the Mininet-WiFi, the raw Packet Captures (PCAP) will be converted to structured data in tabular
form using programs like Wireshark TShark or Scapy as part of preprocessing. Flow-level and packet-level
features like Source and destination IP, port number, protocol, packet-length, inter-arrival time, and byte count
are key flow-level and packet-level features extracted in order to build a dataset fit to serve as an intrusion
detection system. Time-based characteristics get accumulated in connection sessions so temporal patterns can be
maintained and utilized in attacking evidence like DoS and MITM. After extracting the features are encoded in
case they are non-numeric; the numerical features are normalized and reflecting that noise is reduced by
excluding irrelevant or redundant features. Equally, in the same way that NSL-KDD preprocessing can be used,
SMOTE or controlled under-sampling can be used to normalize the frequency of attacks and normal traffic
instances. By applying dataset-specific preprocessing pipelines and then merging the processed outputs into a
standardized feature space, the system ensures that both benchmark and simulation data can be fed into the same
AI model architecture without bias toward one source. This dual-preprocessing strategy enhances the robustness
of the IDS in handling both structured legacy datasets and real-world IoT-Smart Grid network traffic.
System Modelling Using Multi-Channel Data Fusion Network (MCDFN)
It has been proposed that the proposed intrusion detection system will be modelled using the MCDFN based
architecture, as it is customized to accommodate heterogeneous network traffic of a benchmarked and real-life
IoT-Smart Grid setting. This approach to modelling acknowledges the fact that single feature representation does
not always make a perfect fit to capture complexity of the various cyber threats especially in critical
infrastructures. The model draws on the complementary strengths of each data source as it processes the NSL-
Page 19
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
KDD dataset (structured connection records) and the Mininet-WiFi dataset (packet-level time-series data) over
independent but parallel communication channels that merge into a separate decision framework.
In the former channel, pre-processed NSL-KDD records are channelled into a deep learning pipeline with
Convolutional Neural Network (CNN) layers and then, Gated Recurrent Unit (GRU) layers. The CNN module
learns local spatial adjacencies between features of a dataset on statistical and protocol levels, whereas the GRU
units acquire sequential relationships on the pattern of connections. The modelling of this channel basically
utilizes the well labelled benchmark dataset to fit the generalized intrusion behaviours. The second-channel runs
on aggregated traffic flows read out of the Mininet-WiFi PCAP files. All the flows maintain the temporal
properties critical to identify IoT-specific and Smart Grid-specific attacks, including man-in-the-middle attacks,
replay attacks, locator-based attacks, or coordinated denial-of-service attacks. In this case, CNN layers serve as
local feature extractors of metrics at the packet-level and the GRU layers time variations in traffic patterns. Such
a configuration allows the system to build out finer-grained detection based on a realistic, domain-specific traffic
behaviour.
After extracting independent features of the data, the results of the two channels are then introduced to a fusion
layer and the two representations are concatenated, resulting in one representation of high dimension. The
presented data fusion stage is important, since it enables the network to combine both generalized patterns of the
attacks, as shown on the NSL-KDD dataset, and situational attack attributes, as suggested by the Mininet-WiFi
data. Fusion representation is subsequently taken as input in fully connected layers where reasoning of higher
order is conducted to categorize traffic instances as normal or multiple attacks categories.
A simplified version of MCDFN model uses a SoftMax classifier in its final layer, to be able to generate
probability distributions across the set of already defined attack categories. The decision level may be tuned to
achieve a trade-off of trade-off in Detection Rate (DR) and False Positive Rate (FPR) so that the system can be
true and reliable when used in live scenarios. Further, there are dropout layers and L2 regularization used across
the architecture to prevent overfitting and Adam optimizer to make the architecture efficiently converge during
training using adaptive learning rates. As shown in Figure 2, the architecture of the proposed model is as follows.
Figure 2: Architecture of the Proposed MCDFN model
The architectures of the proposed model (Figure 2) of this study is a multi-path architecture-based neuron
network model that aims to classify intrusion attempts in an IoT-Smart Grid environment using multiple
Page 20
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
representation of features. It is composed of four parallel modules, which are customized in order to derive
distinct spatial and temporal patterns out of network traffic. The first module consists of a Bi-GRU layer
(activation: tanh, recurrent activation: sigmoid, output: (30, 128)) and then a Flatten layer, which Bidirectional
temporal relationships are stored. A second module consists of a GRU layer (activation: tanh, recurrent
activation: sigmoid, output: (30, 64)) and Dropout layer (rate: 0.2) and another GRU layer with Flatten layer
representing the sequential behaviour and avoiding overfitting. The third module has a BiLSTM layer
(activation: tanh, recurrent activation: sigmoid, output: (30, 64)) whose output is connected to the Dropout layer
(rate: 0.2) and Flatten layer as the others modules, improving learning of long-term dependencies in a
bidirectional manner. The fourth module takes packet-level time-series data and feeds this through two Conv1D
layers (ReLU activation, 352 filters, kernel size: 1, output: (30, 352)), then into a MaxPooling1D layer (output:
(10, 352)) and a Dense layer inclusive of 128 neurons culminating in a Flatten layer. All the four module outputs
are combined in a Fusion layer giving a high dimensional single feature vector. It is then fed to a Dense layer
that has 30 neurons and then after a Reshape layer (30, 1) it gets classified in the Intrusion Detection output layer
that classifies the traffic as normal or attack. Such modular design achieves extensive learning of the
characteristics of the benchmark datasets and those of the real-life ones, which improves reach and precision.
Model Training
A well-designed process helped to train the MCDFN model in order to maximize accuracy of detection and
minimize overfitting. Following the stratified sampling approach makes the distribution of the dataset retain the
natural proportion of attack and regular traffic distribution, meaning that both training and testing sets are fairly
represented. Given the hyperparameters that were selected through empirical testing and grid search tactfully
aimed at optimising computational efficiency and the performance of the learning. Early stopping and model
checkpointing helped save the best model weights avoiding useless training epochs and helping that the system
would generalize in unseen data. The various parallel input channels enabled this model to learn both the
benchmark and the real-world feature spaces at the same time thus giving way to a single intrusion detection
system.
Following the training process, the model behavior was formally tested on uncapped test set using a variety of
the metrics including but not limited to accuracy, precision, recall, F1-score, detection rate, and false positive
rate. The metrics gave an overall picture of the detection performance of the system as well as reliability in false
warnings. The NSL-KDD dataset results showed the effectiveness of the model in identifying the normalized
characteristics of intrusions, whereas Mininet-WiFi dataset ensured its resilience to variety of complex traffic in
the form of IoT and Smart Grid communications. Such a two-fold evaluation proved that the MCDFN may
flexibly adjust to a diverse network space, which is a good prospect of operational implementation in the security
of critical infrastructure.
Simulation of the Developed Model
To confirm the functionality stage of the proposed AI-based IDS to work with dynamic data and not just evaluate
a static dataset, the level of system-simulated behavior was performed within a controlled IoT-Smart Grid
laboratory environment. Mininet-WiFi was adopted in the simulation as the main network emulator, and the
topology configured here consisted of smart meters, IoT sensors, control units, and gateway nodes connected
through wireless links, thus being very realistic. Benign traffic was emulated in the emulated network as well as
the impact of attacks on the network like Denial of Service (DoS), Man-in-the-Middle (MITM) and replay
attacks. Such situations were programmed in Python and incorporated in Mininet-WiFi with a view to creating
reproducible malicious traffic patterns.
Network traffic captured during a simulation was saved in PCAP format, and analysed in virtually real-time
along with the IDS pipeline. The pretrained MCDFN model on the concatenated NSL-KDD and Mininet-WiFi
datasets was employed in a live detection service where an API (on Python Flask) will be used to detect attacks.
The given arrangement enabled the IDS to access packet based, or flow-based aggregated, data in the simulated
atmosphere, filter it as per the set pipeline, and provide the corresponding classification results along with
confidence scores. System performance was observed in terms of Detection Rate (DR), False positive rate (FPR)
and latency between packet arrival time to the output of classification. This simulation step proved that the
Page 21
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
suggested IDS can achieve high accuracy levels that satisfy the low latency needs of the IoT-Smart Grid
environment activities, which makes it capable of implementation in real life.
SYSTEM RESULTS AND DISCUSSION
The performance of the suggested MCDFN-based Intrusion Detection System is given in the results of the system
in terms of the NSL-KDD benchmark dataset and Mininet-WiFi simulated IoT-Smart Grid traffic. With the
leading means of accuracy, precision, recall, F1-score, DR, FPR, etc., the findings point to the efficiency of the
IDS in accurately identifying various classes of attacks and a minimal number of false alarms.
Results of the MCDFN Model Training
As can be seen in the results of the system modelling with the MCDFN training, that the proposed architecture
is sensible at learning and generalizing intrusion patterns based on both the structured benchmark features and
unstructured time-series information of the individual packet. On the NSL-KDD dataset, the model achieved
high detection accuracy, precision, and recall across all major attack classes, with particularly strong performance
in identifying Denial of Service (DoS) and Probe attacks due to their distinct statistical and temporal signatures.
During training, the MCDFN model exhibited steady convergence across both benchmark and simulation
datasets, reflecting effective learning of intrusion patterns as shown in Table 1 and the use of early stopping
prevented unnecessary iterations, ensuring that model weights were saved at optimal performance points.
Table 1: Performance Accuracy and Loss of the Proposed Model
Dataset
Initial Training
Accuracy (%)
Final Training
Accuracy (%)
Final Validation
Accuracy (%)
Initial
Loss
NSL-KDD
71.3
99.1
98.4
0.612
Mininet-WiFi
69.5
97.6
96.8
0.658
Figure 3: Performance Accuracy and Loss Result of the Model
As can be seen on Table 1, for the NSL-KDD dataset, the training accuracy increased from an initial 71.3% to
99.1% by the 42nd epoch, while the validation accuracy stabilized at 98.4%, indicating strong generalization
without significant overfitting. Correspondingly, the training loss decreased from 0.612 to 0.023, with validation
loss settling at 0.031. For the Mininet-WiFi dataset, training accuracy improved from 69.5% to 97.6%, and
validation accuracy reached 96.8%, with loss values reducing from 0.658 to 0.045. The Performance of the
model considering other metrics are presented in Table 2 considering the 2 datasets adopted
Page 22
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
Table 2: Performance Results of the Model
Dataset
Metric
DoS (%)
Probe (%)
U2R (%)
R2L (%)
Macro Average (%)
NSL-KDD
Precision
99.6
98.9
95.2
94.5
97.05
Recall
99.4
98.5
94.8
94.0
96.68
F1-Score
99.5
98.7
95.0
94.2
96.85
Mininet-WiFi
Precision
98.9
98.2
94.6
93.8
96.38
Recall
98.7
98.0
94.1
93.2
96.00
F1-Score
98.8
98.1
94.3
93.5
96.19
The performance of the Model on the NSL-KDD dataset is illustrated in Figure 4 as a bar chart to demonstrate
the behaviour of the model on the dataset considering various attack types.
Figure 4: Model Performance on NSL-KDD dataset
The performance for the NSL-KDD dataset presented in Figure 4 demonstrate consistently high classification
effectiveness across all attack categories. DoS and Probe attacks show near-perfect Precision, Recall, and F1-
Score values above 98%, indicating the model’s strong ability to correctly identify and classify these frequent
and well-represented threats. Although performance slightly dips for the more complex and less frequent U2R
and R2L attacks, with scores in the mid-90s, the model still maintains commendable accuracy. The Macro
Average values of Precision (97.05%), Recall (96.68%), and F1-Score (96.85%), reflect a balanced and robust
overall performance, suggesting the model generalizes well across diverse intrusion types while slightly favoring
the more dominant categories. Figure 5 presents the performance of the model on the Mininet -WiFi dataset
using the same evaluation metrics
Page 23
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
Figure 5: Model Performance Result of Mininet-WiFi dataset
Mininet-WiFi dataset presents a good accuracy in all assessed types of attacks with Precision, Recall and F1-
Score being above 93% as Figure 5 demonstrates. Scores of DoS and Probe attacks are among the highest almost
99% illustrating that model has a high power in detecting and classifying these widespread threats. Even though
the scores of U2R and R2L attacks are a bit less, and are at the level of about 94 percent, they represent
trustworthy detection capabilities of more elusive intrusion types. The balanced general performance witnessed
in the model through the macro-average metric like Precision (96.38%), Recall (96.00%), and F1-Score
(96.19%), implies that the model generalizes and is robust across the diverse categories of attack.
As shown in the results, the MCDFN model is effective in modelling high-frequency as well as subtle patterns
of intrusion in diverse types of attacks. The overwhelming DoS and Probe categories have continuously scored
high all over with an above 98 percent of the precision, recall, and F1-score thus indicating that the model can
be used to effectively identify such widespread attacks with few false alarms and unattributed alarms. Such, high
performance can mostly be ascribed to the multi-channel architecture of the model because it performs the spatial
and temporal feature learning that allows it to identify such attack patterns among regular traffic with outstanding
precision.
Integration of SMOTE-based oversampling was of great use in the minority classes U2R an R2L which are
typically underrepresented and harder to identify in the intrusion detection datasets. These categories had close
to balanced precision and recall numbers in the area of 93-95 percent a very large improvement over baseline
models which have generally ineffective results with such rare activities. The close precision and recall values
alone and in combination with each other implies that the model is not biased to sensitivity or specificity, hence
it can be equally reliable to detect attacks as well as to minimize false alarm.
Results of the Model Simulation Testing
When the system was tested on the Mininet-WiFi simulation data which contained realistic IoT–Smart Grid
traffic and domain-specific threats such as Man-in-the-Middle (MITM) and replay attacks, the MCDFN
maintained robust detection capability while keeping the false positive rate within acceptable operational limits.
The fusion of CNN and recurrent layers across multiple channels enabled the extraction of both spatial and
temporal dependencies, while the dual-dataset training strategy enhanced adaptability to heterogeneous network
environments. Overall, the training results validate that the MCDFN can serve as a reliable, low-latency IDS
framework for securing critical IoT–Smart Grid infrastructures. Table 3 presents a comprehensive result of the
system simulation attained considering the attack types highlighted above
Page 24
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
Table 3: Attack Simulation Results of the Model
Attack Type
Precision (%)
Recall (%)
F1-Score (%)
False Positive Rate (%)
DoS
98.70
98.40
98.50
1.10
MITM
97.90
97.50
97.70
1.40
Replay Attack
96.80
96.20
96.50
1.60
Normal Traffic
99.20
99.00
99.10
0.90
Macro Average
98.15
97.78
97.95
1.25
Figure 5: Model Simulation Results across attack types
The results in Figure 5 illustrates consistently high performance across all evaluated attack types and normal
traffic, with Precision, Recall, and F1-Score values all hovering near or above 96%. Normal Traffic achieves the
highest scores, with Precision at 99.2%, Recall at 99.0%, and F1-Score at 99.1%, reflecting the model’s
exceptional ability to correctly identify benign activity. DoS and MITM attacks also show strong detection
capabilities, with metrics above 97%, while Replay Attack, though slightly lower, still maintains solid
performance. The Macro Average values of Precision (98.15%), Recall (97.78%), and F1-Score (97.95%) which
highlight the model’s balanced effectiveness across diverse traffic types, reinforcing its reliability in real-world
intrusion detection scenarios.
Figure 6: False Positive Rate Results of the Model
As seen in Figure 6, the model exhibits a fairly low false positive rate in any form of traffic, implying excellent
Page 25
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
reliability in its ability to differentiate a genuine activity and malicious behaviour. Lowest waste false positive
rate is that of Normal Traffic at 0.9 per cent which will be very critical in fine tuning false alerts in benign
situations. The rates of DoS and MITM attacks continue their close relationship of 1.1 and 1.4 respectively
however, Replay Attack reveals the highest rate of 1.6, at least appearing to be a little bit more miscategorized.
The Macro Average of 1.25% concludes that in general, the model shows good results in false alarms mitigation,
and this is of primary importance when it comes to sustaining credibility and effectiveness of intrusion detection
systems.
In this section, it will be shown that when the proposed model is applied to the data on the Mininet-WiFi
simulation, the MCDFN model again exhibited high accuracy of detection of both common and domain-specific
threats of IoT to Smart Grid. The model surpassed a 96 percent precision, recall, and F1-scores in all of the test
classes including difficult to detect complex attacks like MITM and Replay attacks. Conspicuously, DoS and
Normal categories came with almost ideal performance, respective F1-scores being greater than 98%, which
testifies to the ability of the model to process high-frequency events without loss of reliability. The performance
of these figures underpins the model to generalize and learn the intrusion patterns over space and time due to
combination of CNN-based feature extraction and sequence modelling on recurrent layers.
False positive rates were also low on all categories and were maintained in the range of 1.0-1.6%, highly
important to use in live networks in operational deployment in the case of IoT-Smart Grid networks. This way,
the low FPR means that operators of the system are not bombarded with extraneous alerts allowing suitable
resources to be assigned and the responses to incidents to be made in good time. The two-dataset training
approach of the model, where it incorporated knowledge in both the NSL-KDD and the Mininet-WiFi data sets
greatly enhanced the model in terms of its flexibility to different network environments with heterogeneity. This
adaptability, paired with its low-latency processing capability, positions MCDFN as a dependable and scalable
IDS for securing critical smart energy infrastructures against evolving cyber threats.
CONCLUSION
The paper proposed and tested a MCDFN of detecting intrusions in IoT-Smart Grid system. It combines
convolutional neural networks, used to extract spatial natures of flow with recurrent layers used to learn temporal
sequences in network data, to correlate both static and dynamic patterns in network traffic simultaneously. In
training, a dual dataset approach was used with the NSL-KDD benchmark dataset being paired with traffic
generated using a Mininet-WiFi simulation environment that also included realistic IoT-Smart Grid attack
scenarios e.g. Man-in-the-Middle (MITM) and Replay attacks. In the model training process, we added
techniques of oversampling to resolve the issue of class imbalance so that the low frequency sets of attacks like
U2R and R2L will be detected with higher rates.
As shown by experimental results, the MCDFN consistently scored highly (in terms of detection) in all the tested
categories with macro-averaged precision, recall, and F1-scores of above 97% and false positive rates of less
than 1.6%. The system demonstrated an ability to identify high-frequency threats such as DoS attacks and also
high sophistication yet low frequency threats, such as MITM with limited loss in performance. The capability to
support inherently low latency of the model lends it to application in real-time intrusion detection, and its
resilience to heterogenous network conditions makes such application in diverse IoT-Smart Grid infrastructure
reliable. To sum-up, the MCDFN framework provides a scalable, precise operationally effective IDS resolution
to a great cybersecurity resilience of critical smart energy systems.
REFERENCES
1. Al-Garadi, M. A., Mohamed, A., Al-Ali, A., & Khan, M. (2020). A survey of machine and deep learning
methods for Internet of Things (IoT) security. IEEE Communications Surveys & Tutorials, 22(3), 1646–
1685.
2. Alsarhan, A., Alazab, M., & Alqahtani, H. (2023). Federated learning for intrusion detection in IoT
networks: A comprehensive survey. Future Generation Computer Systems, 139, 1–18.
3. Alzahrani, B., & Alshamrani, S. (2021). Blockchain-based intrusion detection system for smart grid
applications. Energies, 14(4), 1123.
Page 26
www.rsisinternational.org
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue XIII September 2025
Special Issue on Emerging Paradigms in Computer Science and Technology
|
4. Eldakhly, N. M. (2025). Optimized intrusion detection with deep learning classification models. Neural
Computing and Applications. https://doi.org/10.1007/s00521-025-11383-3
5. Ghosh, U., & Sanyal, S. (2021). Explainable AI for cybersecurity in smart grids. Computers & Security,
105, 102223.
6. Gurung, S., Ghose, M. K., & Subedi, A. (2019). Deep learning approach on network intrusion detection
system using NSL-KDD dataset. International Journal of Computer Network and Information Security,
11(3), 12–20. https://doi.org/10.5815/ijcnis.2019.03.02
7. Haozhe, Z. (2025). Deep Learning-Based Intrusion Detection System for Internet of Things Networks.
Discover Internet of Things, 5, Article 74.
8. Hussain, F., Hussain, R., Hassan, S. A., & Hossain, E. (2022). Machine learning in IoT security: Current
solutions and future challenges. IEEE Communications Surveys & Tutorials, 24(1), 1–35.
9. Kakolu, S., Faheem, M. A., & Aslam, M. (2023). AI-enabled intrusion detection systems in IoT networks:
Advancing defense mechanisms for resource-constrained devices. International Journal of Science and
Research Archive, 9(1), 752–769. Link
10. Mohanty, S., Kumar, S., & Agarwal, M. (2024). Enhancing accuracy with recursive feature selection
using multiple machine learning and deep learning techniques on NSL-KDD dataset. In Advances in
Data-Driven Computing and Intelligent Systems (pp. 251–262). Springer. https://doi.org/10.1007/978-
981-99-9518-9_18
11. Nisha, M., & Udhayashri, G. (2025). AI-Powered Intrusion Detection System for IoT Security.
International Journal of Science and Advanced Technology, 2(2025), 3802. Link
12. Nwakeze, M. O. (2024). The impact of blockchain technology on improving cybersecurity measures.
International Research Journal of Modernization in Engineering Technology and Science, 6(6), 2967–
2979.
13. Nwakeze, O. M., & Mohammed, N. U. (2025). Intelligent cyber threat detection and mitigation system
for network security improvement using artificial neural network. American Journal of Sciences and
Engineering Research, 8(4), 48–56. American Journal of Sciences and Engineering Research.
14. Revathi, S., & Malathi, A. (2013). A detailed analysis on NSL-KDD dataset using various machine
learning techniques for intrusion detection. International Journal of Engineering Research & Technology
(IJERT), 2(12), 1848–1853. Retrieved from https://www.ijert.org
15. Sahli, Y. (2022). A comparison of the NSL-KDD dataset and its predecessor the KDD Cup ’99 dataset.
International Journal of Scientific Research and Management, 10(4), EC-2022-832–839.
https://doi.org/10.18535/ijsrm/v10i4.ec05
16. Ullah, I., & Mahmoud, Q. H. (2022). A hybrid deep learning model for anomaly-based intrusion detection
in IoT networks. Journal of Network and Computer Applications, 204, 103396.
17. Williamson_5. (2024). NSL-KDD Dataset. Kaggle. Retrieved from
https://www.kaggle.com/datasets/williamson5/nsl-kdd-dataset
18. Wu, T., Fan, H., Zhu, H., You, C., Zhou, H., & Huang, X. (2022). Intrusion detection system combined
enhanced random forest with SMOTE algorithm. EURASIP Journal on Advances in Signal Processing,
2022(39). https://doi.org/10.1186/s13634-022-00871-6
19. Zhang, H. (2025). Development of an intelligent intrusion detection system for IoT networks using deep
learning. Discover Internet of Things, 5, Article 74. Link