# IoT Anomaly Detection to Strengthen Cybersecurity in the Critical Infrastructure of Smart Cities
## 2 Materials and Methods
### Review of Similar Works  
Cybersecurity in critical infrastructure is a growing concern in the digital age, where system interconnection and dependence on technology are ubiquitous. Addressing the security of smart grids, an essential part of infrastructure, has been an area of focus in the scientific and technical literature. Two notable approaches that have emerged in this field are anomaly detection using advanced AI techniques and the application of IoT to improve security.  
One of the notable approaches in the literature focuses on anomaly detection in smart power grids using advanced artificial intelligence techniques. A noteworthy study in this group is the work of [13], which addresses this issue using deep neural networks (RNPs). Their research demonstrates promising effectiveness in analyzing behavioral patterns in power grid data to alert about anomalies [14]. While this approach is valuable and shows the potential of RNPs in anomaly detection, it tends to focus on detection after anomalies occur. This limits applicability in critical infrastructure environments, where attack anticipation and prevention are crucial.  
In parallel, another group of researchers has focused on using IoT to improve security in smart electrical networks. A relevant study in this context is the work of [15], which explores how IoT devices can provide an additional layer of anomaly detection by constantly monitoring the status of power grid assets [16]. This approach aligns with the growing trend of using IoT devices to collect real-time data and enable faster responses to anomalies or threats. Although this approach offers notable advantages in early anomaly detection, it is essential to ensure the security of IoT devices and the integrity of the data they collect.  
One of the most notable advances of this proposal is the focus on real-time anomaly detection in critical infrastructure. Although some previous work, such as the study by [17], has used artificial intelligence for anomaly detection, it often focuses on identifying anomalies after they have occurred. This work differentiates itself by prioritizing real-time detection, meaning we can proactively anticipate and respond to cyber threats, thereby reducing the impact of potential attacks and improving the resilience of critical infrastructure. Another innovative element is the integration of IoT devices in the anomaly detection process. The work of [18] has explored the use of IoT devices for constant monitoring of power grid assets, which is valuable. However, this proposal furthers this idea by incorporating real-time IoT device data into our machine-learning approach. This allows us to not only detect anomalies based on historical data but also use real-time information to make more informed and adaptive decisions.  
Compared to the works above, the proposed work differs by addressing real-time anomaly detection in smart power grids and threat prevention through a combination of artificial intelligence algorithms and the integration of IoT devices [19]. This methodology seeks to anticipate and prevent cyber-attacks before they cause significant damage, which is essential in critical environments. Furthermore, reviewing previous works that focus on specific aspects of cybersecurity in critical infrastructure is considered, strengthening our theoretical and methodological base. Although there is valuable research in the field of cybersecurity in smart power grids, our study stands out by addressing real-time detection and prevention of threats using a combination of artificial intelligence and IoT devices [20]. This holistic approach aligns with the growing need for critical infrastructure security in today's digital age.