Introduction

Public safety is a key part of a stable and functioning society, involving various systems, policies, and technologies designed to protect the lives, health, and property of people and communities from many different dangers1. These threats include natural phenomena such as earthquakes, floods, hurricanes, wildfires, and pandemics, as well as human-induced crises such as terrorist attacks, industrial accidents, hazardous material spills, and mass transportation incidents2. Recently, the frequency, intensity, and impact of these emergencies have shown a consistent upward trajectory, driven by multiple global factors including climate change, rapid urbanization, environmental degradation, and increased geopolitical tensions3. Urban environments, in particular, face increased risk due to population density, infrastructure complexity, and the concentration of critical resources and assets. As cities expand and become more interconnected, the probability of cascading effects where one failure triggers a series of others becomes increasingly likely, thereby complicating emergency management and amplifying potential damage4. According to the United Nations Office for Disaster Risk Reduction (UNDRR), between 2000 and 2020, the number of natural disasters reported worldwide increased by more than 80% compared to the previous two decades5. This surge not only reflects the growing volatility of our environment, but also indicates an urgent need for strategies to reduce disaster risk adaptively and responsively. Furthermore, the World Health Organization (WHO) reports that road traffic accidents now constitute one of the leading causes of death worldwide, resulting in over 1.3 million deaths and up to 50 million people with long-term injuries or habilitates6. These records highlight the stark reality that delayed responses and ineffective safety infrastructure are affecting or claiming millions of lives.

Despite the advances made in fields such as data science, communications, and automation, many current public safety systems remain encumbered by outdated protocols, manual processes, and fragmented communication channels. Emergency response frameworks in several parts of the world are still predominantly reactive, relying heavily on eyewitness reports or distress calls to initiate action7. This model introduces critical delays in response time, particularly during the “golden hour,” the crucial period immediately following a traumatic incident when timely medical or logistical intervention can significantly improve outcomes. Moreover, existing systems often lack real-time data integration and dynamic situational awareness, limiting the capacity of first responders to make informed decisions on the fly8. For example, during large-scale natural disasters or urban fires, emergency personnel may enter dangerous zones without precise information about environmental conditions, structural integrity, or the presence of civilians, increasing risks to both responders and victims. Furthermore, the usual way of making decisions and giving orders is often slowed down by red tape, poor teamwork between agencies, and a lack of digital tools that can handle a lot of crisis data. Public alert mechanisms such as sirens, television announcements, or radio broadcasts are often generic and fail to deliver geo-targeted or context-specific information, leaving citizens uncertain about what actions to take or where to seek shelter9. In such scenarios, confusion and panic can spread rapidly, complicating evacuation procedures and often resulting in secondary incidents such as stampedes, traffic congestion, or misinformation10.

In complex emergencies with multiple dangers, like fire, flooding, and gas leaks, the flaws of traditional public safety systems worsen11. In such dynamic environments, static systems prove insufficient for managing the multidimensional nature of threats. Furthermore, socio-economic disparities mean that marginalized and underserved communities often face greater barriers to accessing timely alerts and resources, resulting in disproportionate vulnerability. The scale, speed, and complexity of contemporary emergencies overwhelm traditional systems12. The increasing dependency of modern life on critical infrastructure such as electricity, water supply, transportation, and digital communications also means that disruptions in one sector can paralyze others, leading to widespread societal impact13. These cumulative challenges highlight the necessity for a paradigm shift toward technologically advanced, decentralized, and intelligent public safety infrastructures. In particular, the integration of real-time data acquisition, automated decision-making, and rapid communication technologies can play a transformative role in enhancing preparedness, response, and recovery capabilities14. Consequently, the development of next-generation public safety alert and emergency response systems must prioritize immediacy, accuracy, adaptability, and inclusivity in their design, implementation, and operation.

We present a novel IoT-based emergency response and public safety alert system that addresses the above limitations through real-time sensing, decentralized computation, and low-latency alert dissemination. A functional prototype was designed and implemented, and its performance was evaluated in a smart-city simulation lab that closely mimics real-world emergency conditions, including fires, traffic accidents, gas leaks, and medical distress events.

This system integrates edge computing nodes, wireless communication protocols (Wi-Fi, LoRa, 5G), and cloud analytics to enable high responsiveness and scalability. Its ability to support over 12,000 connected devices with sub-500 ms alert latency makes it a strong candidate for large-scale deployment in urban and high-risk environments.

Challenges in current public safety systems

Despite the technological strides made in areas such as telecommunications, cloud computing, and artificial intelligence, public safety infrastructure in many regions remains outdated, siloed, and ill-equipped to meet the demands of modern emergencies. Traditional public safety systems are largely centralized and reactive, relying on manual processes and human intervention to detect, report, and respond to incidents15. This approach introduces significant delays and limits the scalability of emergency services, particularly during high-impact events that affect large populations or infrastructure. One of the most critical limitations is the delayed detection and response mechanism inherent in these systems. Emergency services typically receive alerts only when a witness initiates a call or when personnel physically detect a threat. In urgent scenarios such as structural fires, chemical leaks, or vehicular collisions, even a delay of a few minutes can lead to exponential increases in damage, casualties, and recovery time. In some cases, emergencies may go unreported entirely due to a lack of access to communication or human oversight, resulting in missed opportunities for timely intervention16.

Moreover, these systems often operate in information silos, severely limiting situational awareness for first responders and decision-makers. Without access to real-time data from the incident site, emergency teams must act on fragmented or outdated information, hindering their ability to make informed decisions or prioritize resources effectively. This issue is particularly acute in complex scenarios such as multi-vehicle accidents on highways or disasters spanning multiple jurisdictions, where coordination is essential but rarely seamless17. Another pressing issue is the prevalence of communication gaps during emergencies. Infrastructure such as mobile networks or radio towers may become overloaded, damaged, or entirely inoperable during large-scale events, leading to breakdowns in coordination between agencies. Firefighters, police, emergency medical services, and disaster management authorities often operate on incompatible communication protocols, making real-time information sharing and collaborative decision-making challenging. This lack of interoperability can delay response efforts, duplicate resource deployment, and compromise the safety of both responders and civilians18.

A related challenge lies in the inefficient allocation of critical resources. Traditional systems lack predictive capabilities and often depend on static emergency plans rather than dynamic, data-driven decision-making. As a result, emergency resources such as ambulances, drones, firefighting units, and medical supplies may be dispatched either in insufficient quantities or in excess, both of which can hamper effective crisis resolution19. Under-allocation leaves certain areas underserved, while over-allocation to one incident can deplete resources available for concurrent or subsequent events. Furthermore, without smart data analysis and flexible response plans, emergency management does not make the best use of resources based on current situations and what needs to be prioritized20. Finally, a crucial and often overlooked aspect of modern public safety is public awareness and behavioral response. Most traditional alert systems, such as public address announcements, television broadcasts, or air-raid sirens, are broad and non-specific, lacking the ability to tailor messages based on geographic proximity, individual needs, or hazard type. This limitation often results in widespread confusion, panic, or non-compliance with evacuation procedures. People may either overreact, flooding emergency services with non-urgent calls, or underreact, failing to grasp the seriousness of a threat due to the generic nature of the alert21. In densely populated or linguistically diverse communities, these communication shortcomings can magnify the crisis rather than mitigate it22.

Taken together, these challenges paint a sobering picture of the deficiencies in current public safety and emergency response infrastructures. They reveal the urgent need for a comprehensive transformation one that emphasizes decentralized, data-driven, and real-time solutions powered by modern technologies23. A public safety system that is prepared for the future needs to combine IoT, artificial intelligence, mobile networks, and cloud-based coordination platforms to quickly detect issues, improve communication, and smartly use resources. Only by addressing these fundamental gaps can we move toward a more resilient, responsive, and inclusive emergency management paradigm capable of withstanding the complexities of twenty-first century crises24.

IoT in public safety

The emergence of the Internet of Things (IoT) has introduced a transformative paradigm in the field of public safety, offering a scalable, intelligent, and responsive framework for monitoring, detecting, and managing emergencies in real-time. At its core, IoT refers to an interconnected network of physical devices ranging from sensors and actuators to smart appliances and wearable technologies that collect, transmit, and act upon data via the internet or dedicated communication networks25. These devices are embedded in everyday infrastructure such as buildings, vehicles, roads, bridges, and public spaces, enabling them to continuously monitor environmental, structural, and human parameters. The key advantage of IoT in public safety lies in its ability to provide real-time situational awareness and automated response mechanisms, which significantly reduce the time between incident occurrence and mitigation26.

A critical aspect of IoT-enabled public safety lies in real-time monitoring through a dense network of heterogeneous sensors. Devices such as temperature gauges, smoke detectors, accelerometers, motion sensors, and GPS trackers constantly collect data on environmental and behavioral conditions27. These inputs feed into centralized or distributed platforms that analyze the data in real-time, enabling the rapid identification of anomalies such as fires, floods, gas leaks, structural failures, or vehicle crashes28. Furthermore, video surveillance systems with AI image recognition can check how many people are in a crowd, notice if someone is breaking in, and highlight any suspicious behavior, all helping to create a complete and up-to-date understanding of the surroundings29.

This ecosystem is effectively illustrated in Fig. 1, which depicts a smart city environment where embedded sensors such as fire, gas, motion detectors, and smart cameras continuously transmit data via wireless communication networks including Wi-Fi, LoRa, and 5G. The data is processed in real-time by cloud-based or edge computing platforms, which apply advanced analytics and machine learning models to interpret the incoming information. Upon detecting critical events, the system automatically triggers alerts to appropriate emergency response units such as police departments, fire services, or ambulance dispatch centers while simultaneously notifying nearby civilians through mobile devices, public digital signage, or home assistants. This integration enables a rapid and coordinated response, minimizing delays and enhancing operational efficiency during emergencies.

Beyond automated alerting, IoT provides a robust foundation for inter-agency coordination and communication. One of the longstanding challenges in emergency response has been the siloed nature of operations across agencies. IoT platforms address such an issue by aggregating data from multiple domains and presenting it through interoperable interfaces accessible to all relevant stakeholders30. Firefighters, law enforcement, healthcare professionals, and disaster management authorities can operate on a shared situational picture, allowing for informed, synchronized decision-making. During large-scale events, such as floods or building collapses, this integration is vital for managing traffic control, evacuation routes, triage points, and supply chain logistics31.

Moreover, IoT empowers emergency systems with predictive analytics and decision support capabilities. By using past data and current information in machine learning models, IoT platforms can predict risks like how likely a wildfire will spread based on wind and temperature, or suggest the best way to use resources depending on the type and seriousness of the incident32. Smart infrastructure, such as bridges or tunnels, can be equipped with structural health monitoring sensors that predict fatigue or stress failure before catastrophic events occur, enabling preemptive maintenance and intervention33.

Equally important is the role of IoT in citizen engagement and public awareness. Mobile phones, wearables, and in-home devices act as endpoints that receive real-time alerts customized to the user’s location and risk profile. This process ensures that information dissemination is not only fast but also contextually relevant34. For example, individuals in an active flood zone can receive evacuation maps and shelter locations, while those outside the area are advised to avoid traffic congestion or unsafe roads35. Furthermore, two-way communication channels allow citizens to report incidents, request assistance, or share live updates, turning the public into active participants in the safety network36.

In summary, the incorporation of IoT technologies into public safety infrastructures transforms the methods of detecting, analyzing, communicating, and mitigating emergencies. The combination of widespread sensors, fast internet connections, cloud/edge processing, and automatic alert systems creates a smart and flexible system that can respond quickly37. This shift from reactive to proactive emergency management not only saves lives but also builds resilience within communities and critical infrastructure. As cities become more complex and risk landscapes evolve, IoT will serve as the backbone of next-generation public safety systems interconnected, intelligent, and inclusive.

Objective and scope of the paper

This paper presents the design, development, and evaluation of a real-time IoT-based public safety alert and emergency response system. The proposed system addresses the critical need for rapid, automated detection and communication in emergency scenarios by leveraging a network of distributed sensors, cloud-based data processing, and intelligent alerting mechanisms. The primary objectives of this research are:

  • To develop an integrated IoT-based system architecture capable of real-time monitoring of diverse emergency indicators, including environmental parameters, motion events, and user-reported incidents.

Fig. 1
figure 1

Conceptual architecture of an IoT-based public safety system.

  • To implement low-latency communication protocols that ensure the timely transmission of alerts to emergency services, system operators, and affected populations.

  • To establish automated decision-making capabilities through the use of embedded rules and edge computing that allow localized responses in case of connectivity disruptions or critical delays.

  • To evaluate the system performance under simulated and real-world conditions in terms of detection accuracy, alert propagation time, system reliability, and user accessibility.

  • To compare the proposed system with existing emergency response solutions to highlight its advantages, limitations, and areas for future improvement.

The scope of the paper includes the deployment of a prototype IoT system in a controlled environment to simulate real world emergency scenarios, such as fire outbreaks, vehicular accidents, and hazardous gas leaks. The system incorporates a combination of hardware (sensors, microcontrollers, communication modules), software (data aggregation and alert generation algorithms), and cloud infrastructure (for data storage and visualization). While the current implementation focuses on urban settings, the architecture is designed to be scalable and adaptable to rural or industrial environments.

By systematically addressing the limitations of traditional public safety systems, this research aims to contribute a practical and scalable solution for improving community resilience, reducing emergency response times, and ultimately saving lives. The findings are expected to be of interest to researchers, urban planners, emergency response agencies, and policymakers working at the intersection of technology and public safety. organization of paper.

Organization of paper

The structure of this paper is as follows: “Related work” reviews existing literature on public safety systems and IoT applications in emergency response. “System architecture” outlines the methodology and system architecture, including hardware, communication protocols, and automation logic. “Methodology” describes the system implementation and simulated scenarios. “Experimental setup and results” presents performance evaluations based on accuracy, latency, and reliability. “Discussion” compares the proposed system with existing solutions. “Conclusion” discusses key findings and limitations, while the final part 8 concludes the study and suggests directions for future research.

Related work

Ensuring public safety during emergencies has long been a critical concern for urban planners, disaster management authorities, and emergency response teams. Traditional public safety systems such as emergency sirens, radio broadcasts, and manual dispatch have historically formed the foundation of disaster communication infrastructures38. However, the limitations of these systems have become increasingly apparent in the face of modern urban challenges. In response, researchers and governments have explored more advanced, integrated, and technology-driven frameworks to support faster and more coordinated emergency response.

Public safety is a multidisciplinary domain that integrates emergency management, urban planning, communication networks, and information technologies to mitigate the effects of disasters and rapidly respond to crises39. Over the past two decades, the growing frequency of both natural and anthropogenic disasters has stimulated research into more responsive and integrated safety systems. From early warning platforms to smart surveillance and IoT-enabled sensing, numerous technological interventions have been introduced. However, gaps in real-time decision-making, interoperability, and system resilience continue to challenge the effectiveness of current systems.

Traditional systems for public safety and emergency response

Historically, public safety systems have relied on centralized infrastructures and manual processes, which are often ill-suited to the dynamic nature of emergencies. The Federal Emergency Management Agency (FEMA) in the U.S. has used broadcast based public alert systems, such as the Emergency Alert System (EAS) and Wireless Emergency Alerts (WEA), to notify citizens of imminent threats. These systems, while widely adopted, lack personalization and cannot deliver precise, localized instructions. Reference40 observed that such systems are often too generic and fail to address the unique needs of communities in multi-hazard environments.

Efforts to improve public safety through smart city platforms began gaining momentum in the 2010s. For instance41, discussed how data from transportation networks, energy systems, and environmental sensors could be integrated into urban dashboards to support situational awareness. Yet, they acknowledged that these dashboards often lack automation, and responses still require human intervention, introducing latency.

Research by looked at the problems with disaster response models in China, which included poor communication, slow coordination between agencies, and no digital integration. Similarly42, reported that in urban India, fire response times were severely affected due to outdated call routing systems and manual dispatch, even though GPS-enabled vehicles and mobile apps.

were available.

IoT applications in public safety and emergency management

The Internet of Things (IoT) has emerged as a key enabler for building intelligent, real-time safety systems. IoT enables a sensor-rich environment, capable of detecting, processing, and transmitting data at high frequencies and with minimal human intervention. Were early advocates for integrating IoT into smart cities, proposing architecture models for sensing, communication, data processing, and application layers. Their work laid the groundwork for more specialized safety systems in the years that followed.

IoT-based fire detection systems, such as the one proposed by43, utilize temperature, smoke, and gas sensors that are connected to a central node via ZigBee. Their system was able to detect early signs of fire with high precision and automatically alert emergency services. Reference44 extended this model by adding edge computing to reduce latency and ensure alerts are issued even during cloud connectivity failures.

In transportation45, proposed an IoT-based accident detection and vehicle tracking system that uses accelerometers, GPS modules, and GSM communication to instantly alert authorities in case of high-impact collisions. Their prototype reduced average response time by over 35% in pilot tests. Such systems highlight the critical advantage IoT offers in minimizing the delay between incident occurrence and emergency notification.

For environmental hazards46, designed a flood prediction and alerting system using water level sensors connected via LoRaWAN to a cloud platform. Their system not only issued warnings but also predicted overflow risks using machine learning algorithms trained on historical data.

Real-world deployments further validate these concepts. Barcelona’s Urban Platform, for instance, integrates thousands of sensors across the city to monitor air quality, noise levels, traffic flow, and pedestrian density. Although originally intended for sustainability, these sensors have been repurposed for emergency evacuation modeling and situational mapping during crises, as noted by47.

Communication protocols, interoperability, and edge computing

Beyond sensing, communication, and interoperability are crucial elements in IoT-based safety systems48. provided a comparative study of communication protocols like MQTT, CoAP, and AMQP, highlighting the trade-offs in latency, energy consumption, and reliability. They emphasized that while MQTT is suitable for real-time alerts due to its publish-subscribe model, it lacks built-in security layers unless extended with TLS/SSL.

To address connectivity challenges49, suggested a hybrid communication model where critical alerts are routed via 5G or Wi-Fi, and backup messages use LoRa or NB-IoT to ensure delivery even in low-power, long-range environments. Their research demonstrated the value of using multi-protocol frameworks for redundancy.

In parallel, the rise of edge computing has transformed the latency-performance trade-off in safety systems. Reference50 proposed that computation-heavy analytics (e.g., image processing from CCTV cameras and anomaly detection) can be performed at the edge, while historical data storage and pattern analysis are handled by cloud platforms. Reference51 showed that edge–cloud collaboration reduces alert latency by over 40, which can be life-saving in scenarios such as industrial gas leaks or traffic pileups52.

Public engagement and human-centric design

One of the most underexplored yet critical areas in public safety literature is public engagement. The design of most existing systems prioritizes infrastructure and institutional response, often overlooking the role of citizens as both sensors and responders. Reference53 argued that involving citizens through mobile apps, crowdsourced reporting, and social media integration significantly improves data granularity and response accuracy.

Reference54 developed a mobile app that allowed users to report fire or accident events by submitting geo-tagged images, which were then verified using AI before notifying emergency services. Their system increased incident detection rates by 27% over traditional 911-style systems. Likewise55, emphasized the importance of push notification systems with location-aware, personalized content, which reduce confusion and prevent overcrowding in evacuation zones56.

Moreover57, addressed psychological dimensions, suggesting that alert systems should consider behavioral response patterns to minimize panic and non-compliance. This can be achieved through contextual messaging, visual maps, and step-by-step guidance, rather than binary warnings.

Security, privacy, and ethical concerns

As IoT systems increasingly handle sensitive data such as individual health metrics, location traces, and behavioral insights, privacy and security emerge as significant concerns. Reference58 warned of common vulnerabilities such as weak encryption in sensor nodes, insecure firmware updates, and lack of access control in cloud platforms. They proposed a three-tier security model involving lightweight cryptography, access control lists (ACLs), and anomaly-based intrusion detection.

Additionally59, highlighted the ethical implications of surveillance-based systems, particularly facial recognition during evacuations or lockdowns. While these tools can expedite identification and rescue, they must be balanced against individual rights and regulated through policy.

Gaps in literature and motivation for this study

From this extensive review, it is evident that while IoT-based safety systems have evolved rapidly, they remain fragmented across use cases and technologies. Most models cater to specific hazards such as fire, flood, or traffic, and they lack cross-domain interoperability. There is a pressing need for modular frameworks that can adapt to multi-hazard scenarios and support seamless inter-agency coordination.

Additionally, despite advancements in sensor networks and edge computing, many existing systems lack robust resilience mechanisms against network disruptions, cyberattacks, or overload during disasters60. Finally, most research underrepresents the importance of citizen integration, adaptive messaging, and participatory safety models.

This paper addresses these gaps by proposing a comprehensive IoT-based architecture that integrates environmental sensing, edge-cloud analytics, inter-agency coordination, and personalized public alerting. It emphasizes low latency, real-time data flow, interoperability across safety agencies, and citizen feedback loops for adaptive response61. We design the model to be scalable, secure, and robust, making it suitable for deployment in both developed and resource-constrained urban areas.

System architecture

The design of a real-time IoT-based public safety system necessitates an integrated architecture that facilitates data acquisition, low-latency communication, robust processing, and intelligent decision-making. The architecture consists of multiple interconnected layers where each optimized for a specific role in the system pipeline: sensing, communication, processing, and action.

Overview of system components

The proposed IoT-based public safety and emergency response system is built upon a distributed architecture comprising four fundamental layers: sensing, communication, computation, and alert dissemination. Each layer is carefully engineered to optimize real-time responsiveness, scalability, and interoperability between devices and stakeholders. The overall architecture of the proposed IoT-based public safety system is illustrated in Fig. 2. It comprises five distinct layers: the Sensor Layer, which includes a range of environmental, motion, video, and biometric sensors; the Communication Layer, supporting protocols such as LoRa, 5G, and Wi-Fi for transmitting data; the Edge Computing Layer, which handles local preprocessing and inference; the Cloud Layer, for data aggregation, analytics, and long-term storage; and finally, the User Interface Layer, which connects emergency services, control rooms, and end users through intuitive dashboards and alert systems.

Sensors and IoT devices

The sensing layer forms the backbone of the system, where an array of heterogeneous sensors and smart IoT devices continuously capture dynamic environmental and situational data. These include environmental sensors that monitor temperature (T), humidity (H), gas concentrations (e.g., CO2, CO, and NO2 and air quality index (AQI); motion sensors such as passive infrared (PIR), Doppler radar, and accelerometers for detecting unauthorized movement in sensitive zones; wearable devices for first responders and vulnerable individuals that track GPS coordinates, heart rate, and blood oxygen saturation (SpO2); and surveillance systems, including high-resolution cameras and thermal imaging units that support video-based event detection and anomaly tracking.

Let the complete sensor network be represented as a set \(\:S\:=\:\left\{{s}_{1},{s}_{2},\dots\:,{s}_{n}\right\}\), where each \(\:{s}_{i}\) corresponds to a specific sensor node. The real-time data stream generated by each sensor si is defined as a multivariate time-series function:

$$\:{D}_{i}\left(t\right)=\:\left\{{x}_{{i}_{1}}\left(t\right),\:{x}_{{i}_{2}}\left(t\right),\dots\:..,\:{x}_{{i}_{m}}\left(t\right)\right\},\:\:\:t\:\in\:\:\left[0,\:T\right]$$
(1)

where \(\:{x}_{{i}_{j}}\) represents the \(\:{j}^{th}\) parameter measured by the \(\:{i}^{th}\) sensor at time \(\:t\), and \(\:T\) is the total observation window. These streams serve as inputs to the next stage of the architecture.

Communication layer

To facilitate real-time data transmission, the system employs a multi-protocol communication model that intelligently integrates short-range (e.g., Wi-Fi, ZigBee) and long-range low-power (e.g., LoRaWAN, NB-IoT) wireless communication technologies. High-bandwidth emergency transmissions, such as live video and bulk sensor logs, leverage cellular networks like LTE and 5G, providing low latency and high throughput.

The communication latency, denoted by \(\:{\tau\:}_{comm}\), can be modeled by the Shannon-Hartley theorem, capturing the relationship between bandwidth, noise, and payload:

$$\:{\tau\:}_{comm}=\frac{P}{B\bullet\:{\text{log}}_{2}\left(1+\frac{SNR}{N}\right)}$$
(2)

where P is the payload size in bits, B is the channel bandwidth in Hz, SNR is the signal-to-noise ratio, N is the noise power spectral density. Optimizing communication protocols to reduce τcomm is essential to maintain system responsiveness, especially in mission-critical situations.

Edge and cloud computing

The computational backbone of the system follows a hybrid cloud-edge paradigm, allowing data to be preprocessed close to the source while leveraging cloud infrastructure for high-level analytics and coordination. Edge nodes, deployed near sensors or gateways, are responsible for filtering, anomaly detection, and preliminary threat assessment using lightweight machine learning models. For instance, environmental outliers or abnormal motion patterns are immediately flagged and evaluated locally.

Let the processing latency at an edge node \(\:{e}_{k}\) be denoted as:

$$\:{\tau\:}_{edge}\left({e}_{k}\right)=\sum\:_{i=1}^{n}\left[f\left({x}_{i}\left(t\right)\right)+{\delta\:}_{i}\right]$$
(3)

Here, f(xi(t)) is the function modeling the computational time required to process sensor input\(\:{x}_{i}\left(t\right)\), and \(\:{\delta\:}_{i}\) denotes the queuing delay introduced by task scheduling and concurrent processing. To make fast decisions, the system uses a binary classifier \(\:\phi\:\left(X\left(t\right)\right)\) that assigns a label based on an input vector \(\:X\left(t\right)\), which aggregates values from multiple sensors at time \(\:t\):

$$\:\phi\:\left(X\left(t\right)\right)=\left\{\begin{array}{c}1,\:\:\:\:if\:{P}_{alert}\left(X\left(t\right)\right)\ge\:\:\theta\:\\\:0,\:\:\:\:Otherwise\end{array}\right.$$
(4)

where \(\:{P}_{alert}\left(X\left(t\right)\right)\) is the predicted probability of a critical event (e.g., fire, gas leak, intrusion), \(\:\theta\:\:\in\:\:\left[0,1\right]\) is a tunable threshold. Only if the risk level exceeds this threshold does the system escalate the event to emergency responders via the cloud tier.

The cloud servers perform asynchronous batch processing, historical trend analysis, and AI model training using large-scale event data. These models are periodically deployed back to the edge to update inference capabilities without human intervention.

Emergency services and citizen notification

Once an event is classified as a high-risk emergency (i.e., \(\:\phi\:\left(X\left(t\right)\right)=\:1\)), the system initiates an automated alert chain, wherein real-time information is dispatched simultaneously to multiple stakeholders. This includes:

  • Emergency services: Fire, police, and ambulance units are notified through secure APIs, which interface with dispatch systems and GIS mapping tools.

  • Citizen notification: Using mobile push notifications, SMS, and app-based alerts, the system disseminates localized instructions such as “Evacuate North Exit” or “Shelter-in-Place.”

  • Physical alerts: Sirens, electronic signboards, and actuator-based visual alerts (e.g., flashing lights) are triggered at affected zones.

These actuators form part of the control loop and can also execute automated tasks, such as closing fire doors or disabling electrical circuits. The total system response latency can be modeled as:

$$\:{\tau\:}_{total}\:=\:{\tau\:}_{sense}\:+{\tau\:}_{comm}\:+{\tau\:}_{edge}\:+{\tau\:}_{decision}\:+{\tau\:}_{notify}$$
(5)

where \(\:{\tau\:}_{\text{s}\text{e}\text{n}\text{s}\text{e}}\) is the time for sensor data acquisition, \(\:{\tau\:}_{comm}\) is the communication latency (as defined by bandwidth and SNR), \(\:{\tau\:}_{edge}\) is the edge processing latency, \(\:{\tau\:}_{decision}\) refers to the classification and decision time, \(\:{\tau\:}_{notify}\) is the latency in disseminating alerts to emergency services and citizens and each component denotes latency from sensing to notification. System optimization ensures that \(\:{\tau\:}_{total}\le\:\:500 \; ms\), which is deemed acceptable for emergency scenarios in urban environments. The detailed data flow through this architecture is presented in Fig. 3, which outlines the full communication pipeline. It begins with raw event detection, followed by edge processing and threshold-based evaluation, then proceeds to alert distribution through secure protocols, and finally synchronizes all relevant data to the cloud for logging and analytics. Decision checkpoints and alert channels are visualized to highlight the system’s reactive flow. Figure 4 shows the performance modeling and optimization curves of the system, highlighting how various factors like sensor frequency, communication bandwidth, and edge processing load affect overall responsiveness. The graph demonstrates that with proper tuning and resource allocation, the system consistently maintains latency under 500 ms crucial for real-time emergency detection and response. This confirms the effectiveness of edge-cloud coordination and adaptive scaling in sustaining low-latency performance across different conditions.

System design considerations

Designing an IoT-based public safety architecture for real-time emergency management demands rigorous attention to three critical system attributes: low latency, scalability, and robustness. These qualities ensure the system remains responsive, adaptable to urban expansion, and resilient in adverse operating conditions.

Low latency

Low latency is essential to facilitate immediate response and intervention during emergencies. To minimize the delay from data sensing to actionable decision-making, the system adopts a computational offloading strategy, wherein raw data is processed at the network edge. Edge computing nodes execute anomaly detection and classification tasks locally, reducing the dependence on cloud round-trip times.

The total system latency \(\:{\tau\:}_{total}\) is defined as the cumulative sum of the following four components:

$$\:{\tau\:}_{total}\:=\:{\tau\:}_{sense}\:+{\tau\:}_{comm}\:+{\tau\:}_{edge}\:+{\tau\:}_{decision}$$
(6)

where \(\:{\tau\:}_{sense}\) is Sensor acquisition and buffering latency (typically 10–20 ms), \(\:{\tau\:}_{comm}\) is the Communication latency from the sensor node to the edge/cloud (network-dependent, ranging 50–200 ms), \(\:{\tau\:}_{edge}\) is the Edge-side processing latency (inference/classification; 100–150 ms depending on model size), and \(\:{\tau\:}_{decision}\) is the final decision and alert triggering delay (typically < 100 ms).

Assumptions: All sensors are synchronized using an NTP-like protocol. Network conditions are modeled using empirical latency distributions observed during testing.

Validation: As shown in Table 1, the system achieved total latency values ranging from 410 to 450 ms across various scenarios, validating that \(\:{\tau\:}_{total}\le\:\:500 \; ms\), the threshold required for real-time emergency response.

Scalability

To accommodate expanding sensor deployments and increasing event data in smart urban ecosystems, the architecture incorporates modular and horizontally scalable design principles. Data processing logic is distributed through microservices deployed in containerized environments (e.g., using Docker and Kubernetes), enabling isolated service updates without impacting system availability.

Moreover, the system employs serverless computing paradigms (e.g., AWS Lambda, Azure Functions) for backend event handling. These functions are automatically instantiated based on trigger events (such as detected anomalies), allowing the platform to scale elastically in response to thousands of concurrent sensor streams without resource bottlenecks.

Let the system load \(\:L\left(t\right)\) denote the number of concurrent sensor events at time \(\:t\), and let \(\:\mu\:\) be the average handling capacity per processing node. Then, the system auto-scales to \(\:\left[\frac{L\left(t\right)}{\mu\:}\right]\) processing units to maintain performance under load spikes. This dynamic scaling ensures a high-throughput and low-latency event handling pipeline, even during large-scale emergencies such as earthquakes or festival crowd surges.

$$\:N\left(t\right)=\left[\frac{L\left(t\right)}{\mu\:}\right]$$
(7)

Assumptions:

  • Sensor arrival patterns follow a Poisson distribution during non-peak hours and a bursty process during emergencies.

  • Docker and Kubernetes-based orchestration enables horizontal scaling within < 300 ms.

Validation: In simulated crowd surge and fire scenarios, the system handled over 12,000 sensor streams concurrently (see Table 3), confirming linear scalability under load.

Robustness

The system is engineered to be fault-tolerant and resilient, even under conditions of infrastructure failure or malicious disruption. The communication backbone uses mesh networking protocols (e.g., ZigBee Mesh, Thread), which enable devices to reroute messages through neighboring nodes if a link fails—ensuring persistent connectivity.

Additionally, a multi-modal failover mechanism is implemented using satellite uplinks and cellular fallback (LTE/5G) to maintain operational integrity when primary communication lines are down. This guarantees geographical redundancy, particularly important in remote regions or post-disaster scenarios where terrestrial networks may be damaged.

Robustness is quantitatively evaluated through Mean Time to Failure (MTTF) and system availability A, given by:

$$\:A=\frac{MTTF}{MTTF+MTTR}$$
(8)

where MTTR is the Mean Time to Repair. High availability \(\:\left(>99.99\%\right)\) is targeted by redundant system components, intelligent load balancing, and real-time health monitoring agents embedded within the infrastructure.

Design optimization strategy

The optimization objective is to minimize τtotal while maximizing system availability and processing throughput. The constrained optimization problem can be formulated as:

$$\:{min}\left\{{\tau\:}_{comm},\:{\tau\:}_{edge},\:{\tau\:}_{decision}\right\}\:subject\:to\:{\tau\:}_{total}\le\:\:500ms,\:A\ge\:0.9999\:$$
(9)

Solution strategy: The above constrained problem is approached using reinforcement learning-based resource tuning and empirical latency profiling.

This optimization problem is solved using a combination of system simulation, load testing, and AI-based resource provisioning algorithms, ensuring that the architecture can sustain both normal operational loads and crisis-scale surges without degradation in performance.

Fig. 2
figure 2

System architecture of the IoT-based public safety framework.

Fig. 3
figure 3

Data flow and communication pipeline.

Data flow and communication model

A reliable and responsive IoT-based public safety system must be built on a robust, low-latency data flow pipeline. The architecture is designed as a multi-layered model, where real-time sensor data is collected, processed at the edge, evaluated for anomalies, and, if necessary, relayed through secure channels to stakeholders. The following sections describe each step in detail, supported by formal mathematical representations of the data and processing pipeline.

  1. 1.

    Sensor data collection: The foundation of the system is a network of heterogeneous sensors \(\:S\:=\:\left\{{s}_{1},{s}_{2},\dots\:,{s}_{n}\right\}\), each tasked with monitoring a particular environmental or physical variable such as temperature, gas concentration, motion, or visual surveillance. Each sensor \(\:{s}_{i}\) streams a multivariate time-series data sequence defined in Eq. (1). The sampling frequency for each sensor is denoted as:

$$\:{f}_{s}=\frac{1}{\varDelta\:t}$$
(10)

where ∆t is the sampling interval. All raw data is forwarded wirelessly to the nearest edge node for further analysis using protocols such as BLE, ZigBee, or LoRaWAN, depending on the deployment environment.

  1. 2.

    Edge preprocessing and anomaly detection: To reduce transmission loads and enable fast threat detection, initial processing is executed at edge computing nodes. These edge nodes carry out noise filtering and aggregation of incoming data streams. The temporal smoothing is handled by techniques such as moving average or Kalman filtering, formally expressed as:

$$\:{\stackrel{-}{x}}_{ij}\left({t}_{k}\right)=\frac{1}{w}\sum\:_{l=0}^{w-1}{x}_{ij}\left({t}_{k}-l\varDelta\:t\right)$$
(11)

where w is the window size for aggregation. Following preprocessing, a lightweight machine learning model (e.g., logistic regression, decision tree) deployed on the edge device evaluates the threat level of the input using a classification function \(\:\phi\:\), applied to the aggregated feature vector \(\:X\left(t\right)\) by using Eq. 6. If \(\:\phi\:\left(X\left(t\right)\right)=\:1\), an emergency alert is generated and sent upstream.

  1. 3.

    Alert transmission via secure protocols: Once an alert is generated, it is serialized in a structured format (e.g., JSON, Protocol Buffers) and transmitted over secure communication protocols such as MQTT or HTTPS. MQTT is preferred for its low overhead and publish-subscribe architecture. To ensure confidentiality and data integrity, Transport Layer Security (TLS 1.3) is employed.

The latency involved in this communication phase is modeled as by using Eq. (2). Minimizing \(\:{\tau\:}_{comm}\) is essential for achieving real-time alert propagation, especially in emergency contexts such as fires or industrial leaks.

Fig. 4
figure 4

Performance modeling and optimization curves for real-time responsiveness.

  1. 4.

    Cloud synchronization and logging: All events regardless of alert status are synchronized with a cloud database for historical logging, analytical model training, and cross-agency reporting. The cloud backend utilizes scalable storage solutions and time-series databases like InfluxDB or Amazon Timestream. Furthermore, machine learning algorithms such as Long Short-Term Memory (LSTM) networks are employed on historical data to detect spatiotemporal patterns in emergency events.

Each incoming alerts A(t) is timestamped and geo-tagged as:

$$\:A\left(t\right)=\:Encrypt\left(\phi\:\left(X\left(t\right)\right),X\left(t\right),Location,Timestamp\right)$$
(12)

This ensures both the integrity and traceability of all recorded events.

  1. 5.

    Stakeholder notification and response activation: Upon confirmation of an emergency event, notifications are dispatched to relevant stakeholders through multi-modal communication interfaces:

    • Mobile device alerts: Alerts are delivered to citizens and on-ground personnel through mobile apps using Firebase Cloud Messaging (FCM) or Apple Push Kit. Geofencing APIs ensure that only users within a certain radius r of the event location receive the alert:

      $$\:Push\left(A\left(t\right)\right)\to\:Users\:\:if\:d\left(UserLoc,EventLoc\right)\le\:\:r$$
      (13)
    • Emergency command centers: Real-time dashboards are updated with alert metadata, sensor data plots, and video feeds. These interfaces are implemented using WebSocket or gRPC protocols for low-latency streaming.

    • First responders and agencies: APIs interface with dispatch software such as Computer-Aided Dispatch (CAD) systems, sending alerts to fire, police, and ambulance services. SMS or pager fallback mechanisms are employed in scenarios where IP-based connectivity is compromised.

Security and privacy considerations

Ensuring secure, reliable, and privacy-conscious data handling is paramount in any IoT-based public safety system, especially when real-time alerts and sensitive sensor data are involved. The proposed system implements a multi-layered security framework designed to maintain data confidentiality, integrity, and availability throughout the entire communication and processing pipeline.

  1. 1.

    Communication security: All data transmitted between edge nodes, gateways, and cloud services is secured using the MQTT protocol over Transport Layer Security (TLS 1.2+). This ensures end-to-end encryption for telemetry and control messages, protecting against man-in-the-middle (MITM) attacks and unauthorized interception. Certificate-based mutual authentication is enforced between clients and brokers to prevent spoofing and ensure trust.

  2. 2.

    Data anonymization and logging: To protect personally identifiable information (PII), the system employs anonymized data logging practices. Sensor data is tagged with unique device IDs and event timestamps but excludes user identity or geolocation beyond a generalized grid level unless explicit user consent is obtained. Raw logs are periodically rotated and stored using AES-256 encryption in the cloud storage layer.

  3. 3.

    Access control and authorization: A role-based access control (RBAC) mechanism is integrated into the backend microservices to limit system access based on predefined roles (e.g., administrator, responder, operator). Access to dashboards, data streams, and alert history is monitored and logged, with support for two-factor authentication (2FA) for privileged roles.

  4. 4.

    Resilience and fail-safe operation: In the event of internet or server outages, edge devices locally cache emergency alerts and sensor events using secure non-volatile memory. A retry mechanism ensures automatic data synchronization once connectivity is restored. This fail-safe design guarantees alert delivery continuity, especially in rural or low-bandwidth environments.

  5. 5.

    Validation and simulation: Security mechanisms were empirically validated in controlled simulations by inducing packet loss, broker failures, and malformed data injections. Results showed 100% resilience to TLS handshake failures and no unauthorized access under simulated brute-force attempts, while maintaining system latency under 600 ms for all encrypted channels.

These layered security and privacy measures collectively ensure that the proposed system is compliant with modern cybersecurity principles while being practical for deployment in dynamic, high-risk environments.

Methodology

The proposed IoT-based public safety system is designed through a multilayered methodology that encompasses sensor selection and integration, network communication protocols, real-time detection algorithms, prototype development, and emergency escalation mechanisms. The architecture aims for seamless coordination between hardware and software layers while ensuring low latency, reliability, and scalability.

Design and implementation

The foundation of the system begins with the integration of heterogeneous IoT sensors environmental (e.g., gas, temperature), motion (e.g., PIR, accelerometers), video (e.g., CCTV), and biometric (e.g., heart rate, pulse) strategically deployed across the monitored infrastructure. Each sensor si S generates real-time, timestamped time-series data modeled as in \(\:{D}_{i}\left(t\right)=\:\left\{{x}_{{i}_{1}}\left(t\right),\:{x}_{{i}_{2}}\left(t\right),\dots\:..,\:{x}_{{i}_{m}}\left(t\right)\right\},\:\:\:t\:\in\:\:\left[0,\:T\right]\), where \(\:{x}_{ij}\left(t\right)\) represents the \(\:{j}^{th}\) sensed parameter from the \(\:{i}^{th}\) device over the observation window \(\:T\). Once collected, the data is transmitted via lightweight and reliable protocols such as MQTT and CoAP over secure TLS, optimized for low-power and constrained networks. The communication latency \(\:{\tau\:}_{comm}\) is given by\(\:{\tau\:}_{comm}=\frac{P}{B\bullet\:{\text{log}}_{2}\left(1+\frac{SNR}{N}\right)}\), where \(\:P\) is the payload size (in bits), \(\:B\) is the bandwidth (in Hz), \(\:SNR\) is the signal-to-noise ratio, and \(\:N\) is the noise power. Minimizing this delay is crucial for urgent scenarios such as fire detection or impact events. Once the data reaches edge nodes (e.g., Raspberry Pi, ESP32), it undergoes preprocessing and rapid inference. The edge processing latency \(\:{\tau\:}_{edge}\left({e}_{k}\right)\) for edge node \(\:{e}_{k}\) is expressed as \(\:{\tau\:}_{edge}\left({e}_{k}\right)=\sum\:_{i=1}^{n}\left[f\left({x}_{i}\left(t\right)\right)+{\delta\:}_{i}\right]\), where \(\:f\left({x}_{i}\left(t\right)\right)\) denotes the processing time of the \(\:{i}^{th}\) feature and \(\:{\delta\:}_{i}\) is the associated queuing delay. After aggregation, the system invokes a binary classifier \(\:\phi\:\left(X\left(t\right)\right)\) to decide on emergency alerts, defined by \(\:\phi\:\left(X\left(t\right)\right)=\left\{\begin{array}{c}1,\:\:\:\:if\:{P}_{alert}\left(X\left(t\right)\right)\ge\:\:\theta\:\\\:0,\:\:\:\:Otherwise\end{array}\right.\), where, \(\:X\left(t\right)\) is the aggregated feature vector, \(\:{P}_{alert}\left(X\left(t\right)\right)\) is the probabilistic output of a lightweight machine learning model, and \(\:\theta\:\) is a calibrated decision threshold. If the threshold is exceeded, immediate alerts are dispatched via MQTT or HTTP protocols to cloud endpoints and relevant emergency stakeholders. An end-to-end operational pipeline of the system is shown in Fig. 5. This diagram visualizes the workflow from sensor data acquisition through to emergency alert dissemination. Using color-coded arrows and icons, the flowchart highlights each processing stage i.e. sensor input, edge classification, cloud synchronization, and notification delivery allowing for a clear understanding of how the system transitions from sensing to action in real time.

Prototype development

The prototype development of the IoT-based emergency response system involves a layered hardware-software integration strategy, anchored on robust, low-cost microcontroller platforms such as the Raspberry Pi 4, ESP32, and Arduino UNO. These edge devices interface directly with environmental, motion, and biometric sensors to collect multi-modal data streams.

Depending on the application domain and range constraints, each device transmits data over appropriate network modules WiFi for local, high-bandwidth environments; LoRaWAN for low-power, long-range deployments; and 5G for ultra-low-latency video or mission-critical data transmissions.

The software architecture adopts a containerized microservices approach, enabling scalability, maintainability, and rapid deployment. Core services include: (1) Sensor Data Collector for streaming sensor input; (2) Edge Inference Engine, which performs local preprocessing and threat analysis; (3) Alert Dispatcher, which transmits emergency signals to stakeholders; and (4) Cloud Storage & Visualization Backend, which logs historical data and generates analytics. Each service runs in isolated Docker containers and is orchestrated using Kubernetes, providing resilience through automatic restarts and distributed.

workload management.

Cloud integration leverages platforms like AWS IoT Core for device provisioning and stream routing, Firebase Cloud Messaging (FCM) for push notifications to mobile users, and Mosquitto (an MQTT broker) for real-time publish-subscribe communication. The entire pipeline is optimized to maintain ultra-responsive performance. The total end-to-end system latency is defined mathematically as in Eq. (6). To ensure sub-second responsiveness, particularly in high-risk scenarios (e.g., fire detection or biohazard exposure), this cumulative latency τtotal is optimized to stay under 500 milliseconds, ensuring swift, reliable responses even in bandwidth-constrained or highly dynamic environments. For practical implementation, the system was prototyped using embedded devices and containerized software, as depicted in Fig. 6. This layered prototype architecture includes microcontroller units (e.g., Raspberry Pi, ESP32) at the edge, modular microservices running on Docker containers, cloud integration using AWS IoT Core and Firebase, and multiple communication pathways for real-time interaction. The diagram also annotates latency at each stage, reinforcing the design’s emphasis on low-latency performance.

Emergency response mechanism

The Emergency Response Mechanism forms the final and most critical layer of the IoT-based public safety framework. Once sensor data is ingested, preprocessed, and evaluated by the edge inference engine and decision logic, any detection of anomalous or hazardous patterns triggers a tiered alert dispatch system. This ensures that the right entities—emergency responders, control centers, and the public—receive contextualized and actionable information in real-time.

  1. 1.

    Alert dissemination structure: Upon confirmation of an emergency, the system generates a structured alert message encapsulating the essential metadata:

$$\:Alert\:=\:\left\{Event\:Type,Severity,Timestamp,Latitude,Longitude,Media\:URL\right\}$$
(14)

This JSON-like alert object is instantly propagated using multiple channels:

Emergency Responders (e.g., fire, ambulance, police) receive mobile notifications on terminals or pagers, which include live geolocation, event type (e.g., “Fire Detected”), and URLs to CCTV or bodycam streams.

Control Centers monitor a centralized dashboard interface that maps real-time events, supported by heatmaps and time-sorted event logs.

The General Public receives push notifications via Firebase Cloud Messaging (FCM), SMS alerts in remote regions, or even automated siren activation in high-density zones.

  1. 2.

    Severity determination model: To intelligently modulate the alerting mechanism, the system uses a composite severity scoring model that integrates multiple sensor domains. The severity score is calculated as:

$$\:Severity\:Score\:=\:\alpha\:{R}_{env}\:+\beta\:{R}_{motion}\:+\gamma\:{R}_{bio}\:+\delta\:{R}_{video}$$
(15)

where: \(\:{R}_{env}\), \(\:{R}_{motion}\)R, \(\:{R}_{bio}\), and \(\:{R}_{video}\) are normalized risk values derived from environmental sensors (e.g., gas, smoke), motion sensors (e.g., fall detection), biometric sensors (e.g., pulse, temperature), and real-time video analytics (e.g., flame or person detection); \(\:\alpha\:,\beta\:,\gamma\:,\delta\:\) are weighting coefficients calibrated using machine learning models on historical incident datasets.

Fig. 5
figure 5

End-to-end workflow of the proposed IoT-based emergency detection system.

Fig. 6
figure 6

Layered prototype implementation with microcontrollers and cloud services.

Escalation logic: The system supports multi-level escalation, automatically mapping the severity score to predefined emergency levels.

  • Level 1 (Minor): Only local alerts—citizens and nearby responders notified.

  • Level 2 (Moderate): Regional control centers and emergency units activated.

  • Level 3 (Critical): Triggers coordination with national disaster response agencies.

This autonomous, data-driven escalation mechanism ensures zero delays in mobilizing response resources, especially for multi-sensor verified crises such as “fire + structural collapse.” Figure 7 illustrates the multi-channel emergency alert dissemination mechanism. Once an alert is triggered, the system computes a severity score using weighted risk values from various sensor domains (e.g., fire, gas, biometric, motion). Depending on this score, alerts are routed to three stakeholders: emergency units (via map-based dashboards and mobile alerts), control rooms (with GIS overlays and logs), and the public (via push notifications, SMS, or public sirens). This layered notification logic ensures a proportional and targeted response based on threat severity.

Experimental setup and results

Testing environment

The proposed system was implemented and evaluated in a controlled smart-city simulation lab specifically designed to emulate real-world emergency conditions in a reproducible environment. This prototype testing setup included physically simulated emergency events such as gas leaks (via controlled release of gas into sensor chambers), indoor fires (with controlled smoke sources), vehicle collisions (via mechanical impact simulators), and medical distress (using biosensor simulators to mimic heart rate irregularities and falls).

Each IoT node was built using microcontroller-based platforms such as Raspberry Pi 4, ESP32, and Arduino UNO, equipped with a heterogeneous suite of sensors, including:

Fig. 7
figure 7

Multi-channel emergency alert dissemination based on severity fusion.

  • MQ-2/MQ-135 gas sensors (for smoke and hazardous gases),

  • Flame sensors (IR based),

  • Accelerometers and gyroscopes (for motion/fall/impact),

  • Pulse and SpO2 sensors (for vital monitoring).

These edge nodes communicated using Wi-Fi, LoRaWAN, and 5G networks depending on the range and bandwidth requirement. Data was processed on edge and synchronized with a cloud system using AWS IoT Core, Firebase, and Mosquitto MQTT broker. Alerts were dispatched to mobile devices, dashboards, and control rooms.

In case of network failure, edge nodes temporarily cached critical data and alert events locally and retried transmission until successful synchronization, ensuring fault tolerance. Alerts were disseminated across multiple channels, mobile notifications, web dashboards, and local public safety terminals.

Performance metrics

To evaluate the overall effectiveness and real-time capabilities of the proposed IoT-based emergency response system, a set of core performance metrics was used:

  1. 1.

    Latency: Measures the total time delay between the occurrence of an event (e.g., fire, medical issue, crash) and the initiation of an alert. Lower latency ensures faster response and improved safety outcomes.

  2. 2.

    Detection accuracy: The system’s ability to correctly classify emergency scenarios. It reflects how well the system distinguishes between genuine emergencies and false positives.

  3. 3.

    Response time: The time taken for alerts to be received by stakeholders such as first responders, control centers, and public interfaces after event classification.

  4. 4.

    Scalability: The number of concurrent devices and sensor streams the system can support while maintaining performance. It reflects system robustness under urban-scale deployments.

  5. 5.

    Reliability: The success rate of alert delivery and the system’s uptime under stress or partial failures. This includes the stability of communication protocols, edge-cloud synchronization, and alert infrastructure.

Quantitative results

The system was benchmarked against seven contemporary emergency response frameworks under identical conditions. These included: Legacy IoT, DeepSenseNet, EdgeGuard, SafeCity, QuickResponse IoT, RealAlert, and EM-Sense.

The proposed system consistently outperformed all alternatives in latency, accuracy, scalability, and reliability across all simulated scenarios (fire, accident, gas leak, and medical events).

Each metric was measured in a controlled testbed and compared with seven baseline or competitive systems. The quantitative evaluation of the proposed IoT-based emergency response system highlights its superior performance across multiple emergency scenarios when benchmarked against seven existing systems. As shown in Table 1, the system consistently achieved the lowest latency across fire, accident, and gas leak detection, ensuring swift alert dispatch critical for real-time response. Table 2 confirms its high detection accuracy, outperforming all others in correctly identifying fire, accident, and medical events, indicating reliable inference capabilities. In terms of scalability, Table 3 demonstrates the system’s ability to support over 12,000 devices concurrently, making it ideal for large-scale deployments. Finally, Table 4 validates its exceptional reliability, with the highest alert delivery success rate and system uptime, reflecting its robustness and operational consistency in diverse emergency scenarios. The results indicate that the proposed system demonstrates superior performance, particularly in latency reduction, detection accuracy, and system scalability. Below are the detailed results:

Table 1 Latency comparison across emergency types.
Table 2 Detection accuracy for various emergency types.
Fig. 8
figure 8

Multi-metric performance comparison of emergency response systems.

Fig. 9
figure 9

Latency comparison across emergency scenarios.

Fig. 10
figure 10

Detection accuracy comparison.

Fig. 11
figure 11

System scalability comparison.

Table 3 Maximum number of devices supported concurrently.
Table 4 Alert delivery success rate and system uptime.

Comparison with existing systems

To validate the uniqueness and superiority of the proposed IoT-based emergency response system, we compare it against three recently published and widely cited systems: DeepSenseNet, SafeCity, and EdgeAware. These systems serve as representative benchmarks in the domain of urban emergency monitoring and response. While each of them offers valuable contributions, they suffer from limitations in either latency, scalability, adaptability, or communication diversity.

Our system introduces several key advancements across architectural and functional dimensions. First, it integrates lightweight edge inference directly on IoT nodes, reducing reliance on centralized processing and achieving consistent sub-500 ms alert latency—an improvement over DeepSenseNet’s cloud-centric approach. Second, the use of modular microservices enables agile deployment and easier maintenance, unlike the monolithic design seen in SafeCity. Third, while EdgeAware supports only Wi-Fi/LTE communication, our system unifies Wi-Fi, LoRaWAN, and 5G under a secure MQTT-over-TLS protocol, ensuring reliable operation in both high-density urban areas and low-connectivity rural zones.

Moreover, the proposed framework employs a dynamic severity scoring algorithm that adjusts alert prioritization based on real-time sensor input and contextual risk. This is coupled with a comprehensive multi-channel alert dissemination strategy (mobile notifications, public dashboards, sirens), ensuring actionable information reaches relevant stakeholders quickly and contextually. Finally, the system demonstrates exceptional scalability and reliability, supporting over 12,000 concurrent devices and maintaining > 99% alert delivery success, exceeding the capacities reported by all compared systems. These comparative advantages are summarized in Table 5.

Table 5 Feature-level comparison of emergency response systems.

This comparison demonstrates the proposed system’s comprehensive advantage across responsiveness, scalability, adaptability, and architectural innovation, establishing it as a leading candidate for deployment in modern public safety infrastructures.

Discussion

The experimental evaluation results provide compelling empirical support for the proposed IoT-based emergency response system in terms of efficacy, reliability, and scalability. Across all major performance metrics, latency, detection accuracy, scalability, and uptime of the system consistently outperformed seven contemporary benchmark solutions: Legacy IoT, DeepSenseNet, EdgeGuard, SafeCity, QuickResponse IoT, RealAlert, and EM-Sense.

Figure 8 presents a radar chart capturing multi-dimensional performance, with the proposed system exhibiting the most extensive coverage across all five criteria. Figure 9 illustrates latency benchmarks for fire, accident, and gas leak scenarios, with alert delivery times maintained under 450 ms in all cases. This sub-second responsiveness is vital for real-time emergency mitigation and clearly surpasses the latency thresholds observed in legacy or cloud-dependent systems. Figure 10 highlights the system’s high detection accuracy, exceeding 95% across diverse scenarios, thereby reducing false alarms and enhancing trust in automated emergency recognition. Scalability results in Fig. 11 demonstrate the system’s ability to concurrently support over 12,000 devices without performance degradation, critical for city-wide deployments. Finally, Fig. 12 confirms the system’s robustness, achieving a 99.1% alert delivery success rate and 99.8% uptime even under partial network degradation and high concurrency stress.

These performance gains are largely attributed to the system’s decentralized architecture, which combines edge computing, containerized microservices, and lightweight inference engines. This design paradigm eliminates bottlenecks commonly associated with centralized processing by enabling autonomous decision-making at the node level. Secure and low-latency communication is achieved through MQTT over TLS, supporting real-time coordination among heterogeneous IoT nodes. The microservices architecture further enables seamless scalability and fault tolerance, ensuring reliable operation in dynamic or partially degraded environments.

Fig. 12
figure 12

System reliability comparison.

During real-world emulation and constrained deployment trials, several key challenges were observed:

  • Bandwidth limitations and intermittent connectivity, particularly in semi-urban and rural test zones;

  • Sensor calibration variability and drift across heterogeneous hardware modules;

  • Energy consumption on battery-powered edge nodes impacting long-term autonomy.

To address these, we implemented adaptive filtering algorithms for real-time sensor calibration, integrated message queuing and retry buffers for intermittent connectivity, and optimized inference workloads to minimize energy draw. Furthermore, the use of Docker and Kubernetes facilitated efficient container orchestration, dynamic load balancing, and simplified service recovery—proving essential under simulated stress conditions.

Looking forward, several enhancements can be explored to further strengthen the system’s applicability in complex urban ecosystems:

  • Integration of advanced AI/ML techniques for predictive event modeling and anomaly detection;

  • Dynamic prioritization of multi-event scenarios using context-aware inference;

  • Adoption of 5G and LPWAN communication for broader range and lower latency;

  • Self-healing mesh networking to enhance resilience during infrastructure failure;

  • Tighter integration with geographic information systems (GIS) and smart city platforms to enable spatial reasoning and coordinated multi-agency response.

In addition to the quantitative performance evaluation, we conducted an informal pilot test involving two emergency response personnel and three civilian users to gather preliminary qualitative insights into system usability and alert effectiveness. Feedback from first responders indicated that the real-time alerts were clear, concise, and actionable, while test users found the dashboard interface intuitive and responsive across mobile and desktop platforms. Although limited in scope, these initial impressions suggest strong usability and user acceptance, particularly under simulated stress conditions. As part of future work, we plan to conduct a comprehensive user study with a larger cohort of stakeholders including firefighters, paramedics, disaster coordinators, and citizens to formally evaluate human-computer interaction (HCI), cognitive load, and overall user experience. This will be essential to refining alert content, interaction flow, and trust calibration in high-stakes environments.

In conclusion, the proposed system presents a highly adaptable, resilient, and scalable framework capable of addressing the operational requirements of next-generation public safety infrastructure. Its demonstrated performance under diverse scenarios and its robustness in constrained environments position it as a strong candidate for real-world deployment in both urban and industrial contexts.

Conclusion

This study presents the design, implementation, and evaluation of a scalable IoT-based emergency response system that leverages edge computing, containerized microservices, and secure cloud integration to deliver low-latency, high-accuracy alerting across diverse emergency scenarios. Experimental results from controlled simulations demonstrate that the proposed system consistently achieves superior performance when benchmarked against seven state-of-the-art solutions. Specifically, it delivers sub-450 ms alert latency, over 95% detection accuracy, and supports more than 12,000 concurrent device connections while maintaining 99.1% alert delivery success and 99.8% system uptime. Comparative analyses underscore the system’s advantages in responsiveness, scalability, and fault tolerance, particularly in scenarios where centralized architectures fall short due to high network overhead or single points of failure. The multi-channel alert dissemination mechanism further enhances its utility in real-world deployments by enabling rapid and location-aware stakeholder engagement. Despite these promising outcomes, the current prototype has limitations related to edge device power consumption, sensor calibration drift, and reliance on stable connectivity for full cloud synchronization. Addressing these challenges will be the focus of future work, which includes optimizing hardware for energy efficiency, integrating the system with existing smart city infrastructures, and deploying AI-driven predictive analytics for early event forecasting and risk mitigation. In conclusion, the proposed system delivers a compelling and empirically validated framework for real-time public safety management. Its demonstrated performance, combined with its modular and scalable architecture, makes it a viable candidate for deployment in urban centers, industrial zones, and resource-constrained rural areas alike.