## 2 IoT and Smart City  
### Internet of Things (IoT)  
IoT refers to a network architecture that enables physical objects to communicate with each other and with other systems over the internet. This technology is applied across various domains, from daily life to industrial applications, facilitating the development of more efficient, intelligent, and interconnected systems. The concept of IoT was first introduced in 1999 at the Auto-ID Laboratories of the Massachusetts Institute of Technology. In 2005, the International Telecommunication Union (ITU) provided an official definition in the \"ITU Internet Report 2005: Internet of Things\". IoT can be defined as a system in which all objects interact with each other through technologies such as sensors and mobile devices to perform a common function [24]. Various definitions of IoT have been proposed in the literature. It is often described as a platform that enables seamless communication and appropriate information sharing among sensors and digital devices within an intelligent environment. It is also seen as a comprehensive system regulating data sharing, communication, and decision-making processes among physical objects [7; 25]. IoT devices continuously communicate through wireless technologies such as Bluetooth, WiFi, ZigBee, WSN, LPWAN, and cellular networks. These devices are directly integrated with the physical world, receiving commands from computer-based systems to manage data and enhance living standards. It is anticipated that over 50 billion devices, including sensors, smartphones, laptops, and gaming consoles, will be connected to the internet via heterogeneous access networks enabled by technologies like radio-frequency identification (RFID) and wireless sensor networks [6]. An IoT system generally comprises devices, infrastructure, services, and applications, which are organized into several layers. As depicted in Figure 1, IoT architecture consists of several layers. The Interface Layer provides a user-friendly interface for interacting with the system, facilitating the presentation of information and enabling user interaction with IoT applications. It plays a crucial role in managing communication between the user and the underlying IoT infrastructure, ensuring a seamless user experience. The Service Layer manages and delivers services based on processed data, ensuring the smooth operation of IoT applications by handling tasks such as data analytics, resource allocation, and service orchestration. Positioned between the Network Layer and the Service Layer, the Fog Layer enables local data processing, preprocessing, and filtering near the data source. Specifically, raw data from IoT sensors are transmitted to fog nodes, where tasks such as noise filtering, initial feature extraction, and data compression are performed. These preprocessing tasks reduce the burden on centralized Cloud Servers, significantly minimise latency, and enable real-time responses for applications requiring immediate action. Additionally, the Fog Layer can host pre-trained machine learning models for tasks such as anomaly detection or noise classification, further enhancing the system's responsiveness. This approach ensures efficient data handling, improves scalability, and reduces reliance on Cloud Servers by distributing the computational workload closer to edge devices [26]. The Network Layer ensures connectivity between devices and the internet or other networks, facilitating data transmission via various wireless technologies such as Bluetooth, WiFi, ZigBee, and LPWAN [27]. Lastly, the Sensing Layer captures and collects data through smart sensors, RFID devices, and other IoT-enabled components, providing foundational real-world information that is transmitted to higher layers for processing [28]. By incorporating the Fog Layer into the traditional IoT architecture, this study aims to demonstrate how real-time data processing and local decision-making can be enhanced.