Hybrid
Hybrid
A PROJECT REPORT ON
Submitted By
Siddika Shaikh Roll No 32
Aditya Rokade Roll No 63
Sajid Nadaf Roll No 64
Affaan Attar Roll No 50
Is a bonafide work carried out by his/her under the supervision of Prof. Prasanna
Kandekar and it is approved for the partial fulfillment of the requirement of Sav-
itribai Phule Pune University, Pune for the award of the degree of Bachelor of
Engineering (Computer Engineering)
Place : Pune
Date : 21/10/2024
2
ACKNOWLEDGEMENT
We take immense pleasure in presenting the complete project report on ’IoT-Enabled Gas
Leakage Detection System for Enhanced Safety and Remote Monitoring’. We extend our deep-
est gratitude to our guide and project co-ordinator Prof. Prasanna Kandekar, co-guide,Prof.
Avneet kuar, for their unwavering support and guidance. We also wish to thank our Head of
Department, Prof. Sagar. Rajebhosale, for his invaluable insights. Our heartfelt appreciation
goes to Dr. Sandeep Kadam, Principal of our institution, and Prof. Y.R. Soman, Director,
for their encouragement and cooperation throughout the project. This project would not have
been possible without the support of our faculty members, laboratory assistants, dear parents,
and friends.
3
Abstract
This research explores the integration of essential hardware components and advanced soft-
ware systems to enable effective gas leak detection and timely response in industrial, commercial,
and residential environments. Gas leaks pose serious risks, including fire hazards, environmental
damage, and health threats. Traditional monitoring methods, often reliant on manual checks,
are prone to delays in emergency situations. This paper outlines the design, implementation,
and evaluation of an Automated Gas Leak Detection and Prevention System that leverages IoT-
enabled gas sensors, real-time data acquisition, and intelligent control mechanisms to enhance
safety. By offering a systematic approach to system design and application, this study advances
gas leak detection technology, demonstrating how automated solutions can significantly improve
safety standards, mitigate risks, and boost operational efficiency across diverse settings.
Keywords— Gas sensor, IoT, Automated response, Safety enhancement, Gas Leakage De-
tection, Real-time monitoring, Environmental protection, Smart control mechanisms, Isolation
Forest Model
4
Contents
1. Introduction 8
1.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Organization of Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5. Implementation 46
5.1 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.1.1 Gas Leakage Detection and Prevention System Algorithm . . . . . . . . . 46
5.1.2 Predictive Maintenance Algorithm . . . . . . . . . . . . . . . . . . . . . . 46
5.2 Flow of Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4 Psuedo Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.5 Screen Shots of Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Conclusion 54
References 56
5
List of Figures
2.1 Agile methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 System Architechture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.3 Gantt Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.4 use case diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.5 use case diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.6 Sequential Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.7 Activity diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.8 State Chart Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.9 Package Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.10 Deployment Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.11 Communication Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.12 ER Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.13 Level 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.14 Level 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.15 Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.16 Simulation Diagram - 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.17 Simulation Diagram -2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.18 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.19 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6
CHAPTER 1
INTRODUCTION
7
INTRODUCTION
1.1 Purpose
The purpose of this project is to create a robust and responsive gas leakage detection sys-
tem that leverages IoT technology to improve safety in residential, commercial, and industrial
environments. Gas leaks present serious hazards, including fire risks, health concerns, and
environmental damage, which can have devastating consequences if not detected early. An
IoT-enabled system integrates advanced sensors with real-time data transmission, allowing for
continuous monitoring of gas levels and immediate alerts to users and emergency services via
smartphones or other connected devices. This proactive approach enhances safety by enabling
remote monitoring, early detection, and automatic preventive measures, such as shutting off gas
supplies. The need for such a system is driven by the increasing use of gas-based equipment,
the growing focus on smart homes and industrial automation, and the demand for reliable,
real-time safety solutions.
1.2 Scope
The scope of this project extends to various environments, including residential buildings, in-
dustrial plants, commercial facilities, public infrastructure, and high-risk areas such as chemical
manufacturing sites, oil and gas refineries, food processing plants, pharmaceutical factories,
public utilities, waste management facilities, and marine operations. This gas leakage detection
system is designed to address safety needs in locations where hazardous gases like methane,
propane, or ammonia are commonly used, stored, or processed. In such settings, undetected
gas leaks can pose significant risks to personnel, the environment, and infrastructure. By pro-
viding real-time monitoring, automated response mechanisms, and remote access capabilities,
this system offers a proactive solution for gas safety. Furthermore, its versatility allows it to be
customized to meet specific safety requirements in various industries, enhancing security and
operational reliability across diverse applications.
1.3 Application
1. Residential Safety: The IoT-enabled gas leakage detection system can be implemented
in households to detect leaks from common cooking gases like LPG. This helps prevent
fires, explosions, and health risks by sending real-time alerts to homeowners, even when
they are away.
2. Industrial Gas Safety Monitoring: Many industrial facilities handle hazardous gases,
such as in chemical manufacturing, oil and gas, and pharmaceuticals. This system can
monitor gas levels continuously, providing immediate alerts to staff and automated re-
sponses like shutting off valves, thus enhancing workplace safety and protecting personnel.
8
safety for both employees and customers. The system provides a reliable solution for
early leak detection and immediate response, reducing the risk of accidents in high-traffic
areas.
6. Healthcare Facilities: Hospitals and medical laboratories that use gases like oxygen
and nitrous oxide can integrate this system to ensure the safe handling and storage of
gases. The system aids in maintaining patient safety by alerting staff to any leaks that
may compromise air quality in critical areas.
8. Marine and Offshore Operations: Offshore drilling platforms, ships, and other marine
vessels often handle combustible gases like methane or natural gas. An IoT-enabled
detection system helps manage gas safety in these high-risk environments, where quick
detection and response are essential to avoid accidents in remote, challenging-to-access
locations.
9. Oil and Gas Extraction Sites: This detection system is ideal for oil and gas fields where
flammable gas leaks could lead to serious accidents. By providing real-time monitoring
and immediate alerts, it helps to secure operations at extraction sites, protecting both
workers and the surrounding environment from the effects of gas leaks.
10. Hotels and Hospitality Industry: Hotels and restaurants use gas for cooking, heating,
and other operations. This system can improve guest and staff safety by continuously
monitoring for leaks and enabling prompt responses, even if the facilities are operating
around the clock.
11. Educational Institutions and Campus Safety: In schools and universities where
science laboratories may contain gases for instructional purposes, the detection system
ensures a safe environment by alerting faculty and staff to leaks, safeguarding students
and minimizing risks in educational facilities.
9
1.4 Organization of Report
This report on the ”IoT-Enabled Gas Leakage Detection System for Enhanced Safety and Re-
mote Monitoring” is organized to provide a comprehensive overview of the project’s purpose,
design, and impact. It starts with formal sections like the title page, certification, acknowledg-
ments, and an abstract summarizing key findings. The introduction covers the system’s purpose,
scope, and application across various environments. Next, the Project Perception and Study
section discusses the problem background, literature insights, and objectives, establishing the
project’s importance in addressing gas safety challenges. System Architecture and Requirement
Analysis outlines the technical requirements, feasibility, risk management, and cost planning,
while System Modeling and Designing includes diagrams and flowcharts to illustrate data flow
and system structure. In Implementation, the report describes the algorithm, methodology,
and screenshots for better understanding of system operation. The conclusion highlights the
project’s effectiveness and proposes future advancements. A references section lists all sources,
ensuring the report is thorough and well-structured for academic and practical insights.
10
CHAPTER 2
PROJECT PERCEPTION AND
STUDY
11
Project Perception and Study
12
2.2 Literature Review
1. Paper Title: “Gas Detection And Environmental Monitoring Using Raspberry
Pi Pico”
Authors: Ch.Lasya, Y.Sirisha, S.Parvathi, Y.Geetha Kusuma
Published Year: 2024
Observations: This study employs an LCD display for real-time gas monitoring and utilizes
temperature and humidity sensors to enhance detection accuracy. Real-time alerts are provided
through both audible and visual mechanisms. Custom threshold values are set for different
gases, though the system lacks remote monitoring and has a limited detection range, which
could lead to false alarms[2].
3. Paper Title: “Gas Leakage Detection System Using IoT and Cloud Technology”
Authors: V. Sharma,R. Dugyala,V.Padmavathi,G. Vijendar Published Year: 2023
Observations: The system detects gas leaks using IoT and cloud technology for real-time
monitoring and alerts. It depends on stable internet connectivity for cloud communication,
which may impact reliability in areas with unstable connections. Regular sensor calibration is
required to maintain accuracy, highlighting the importance of ongoing maintenance for optimal
performance[3].
4. Paper Title: “A Smart Natural Gas Leakage Detection and Control System for
Gas Distribution Companies of Bangladesh using IoT”
Authors: Md. Monirul Kabir, Mohammad Khalid Saifullah, Hilton Paul
Published Year: 2021
Observations: This system integrates app-controlled on/off valves for safety, as well as an
insulating kit. Real-time monitoring is provided via an LCD display, though the reliance on
threshold values can lead to data overload, which might reduce system effectiveness[4].
5. Paper Title: “Smart Gas Leakage Detection with Monitoring and Automatic
Safety System”
Authors: S.M. Zinnuraain, Mahmudul Hasan, Md. Akramul Hakque, Mir Mohammad Nazmul
Arefin
Published Year: 2019
Observations: Utilizing both visual and auditory alerts, this system provides real-time gas
leakage monitoring through an LCD display and the Blynk app. However, its threshold-based
system carries a risk of false alarms, and the paper provides limited additional information on
preventative measures[5].
13
6. Paper Title: “Gas Detection And Environmental Monitoring Using Raspberry
Pi Pico”
Authors: Y.Geetha Kusuma, S.Parvathi, Y.Sirisha, Ch.Lasya
Published Year: 2019
Observations: This system includes weight monitoring and an automated booking system,
notifying users via mobile devices. However, it lacks functionality for preventing gas leakage,
which limits its safety applications in industrial settings.
10. Paper Title: “GSM Based Gas Leakage Detection System Using Arduino”
Authors: A. Beliraya, Yenepoya
Published Year: 2017
Observations: This compact, cost-effective system detects gas leaks and sends SMS alerts
via GSM. However, reliance on GSM limits its use in areas with poor signal, and the lack of
automatic shut-off makes it less ideal for high-risk industrial settings.[10]
14
2.3 Observations of Literature Review
Pub-
Sr. Findings
Paper title Authors lished Methodology
no
year
Environmental
Gas sensors detect
factors affect sensor
leakage, and an Arduino
GSM Based Gas accuracy, and GSM
microcontroller triggers
Leakage Detection A. Beliraya, network reliability
1 2017 an alarm and sends SMS
System Using and Yenepoya can delay alert
alerts via GSM when gas
Arduino. notifications in
levels exceed the
areas with poor
threshold.
signal coverage.
Sensor performance
may degrade due to
Gas sensors detect leaks,
Metta environmental
and data is processed by
Santiputri conditions, and the
IoT-based Gas Leak a microcontroller, which
2 and 2018 system requires
Detection Device sends information to the
Muhammad continuous power
cloud for monitoring and
Tio and stable internet
alerts.
for reliable
operation.
Shruthi Sensor accuracy is
Unnikrishnan, LPG gas sensors detect affected by
Mohammed leaks and send data to a temperature and
LPG Monitoring
Razil, Joshua microcontroller, which humidity, and the
3 and Leakage 2018
Benny, triggers alerts via a system depends on
Detection System.
Shelvin mobile app or IoT a continuous power
Varghese, and platform. supply and stable
C.V. Hari network connection.
S.M.
Zinnurain, Real-time monitoring Risk of false alarms,
Smart Gas Leakage Mahmudul using an LCD display, reliance on
Detection with Hasan, Md. with alerts and threshold values for
4 Monitoring and Akramul 2019 notifications provided via detection, and
Automatic Safety Haque, Mir the Blynk app; includes limited details on
System Mohammad audible and visual alert additional
Nazmul mechanisms functionalities.
Arefin
Risk of false alarms
Suma V, Monitors container due to
Gas Leakage Ramya R, weight; automated threshold-based
5 Detection Based on and Shekar 2019 booking system; provides detection; mainly
IoT Akshay notifications to users’ focused on
Kumar A mobile devices. household
applications.
15
Pub-
Sr.
Paper title Authors lished Methodology Findings
no
year
Accuracy is
influenced by
J. Vijaya
Implementation of Ammonia gas sensors environmental
Lakshmi, Dr.
Ammonia Gas detect leaks, with data conditions, with
G.
Leakage Detection sent to a microcontroller stable power and
6 Puthilibhai 2019
and Monitoring for processing and network
and
System using monitoring via IoT-based connectivity
S.R.Leoram
Internet of Things. platforms. necessary for
Siddarth
consistent
functionality.
A Smart Natural
Gas Leakage Md. Monirul
On/Off valves using app;
Detection and Kabir, Depends on
real-time monitoring
Control System for Mohammad threshold values;
7 2021 using LCD display;
Gas Distribution Khalid potential for data
includes an insulating kit
Companies of Saifullah, overload.
for safety
Bangladesh using Hilton Paul
IoT
Requires stable
Gas sensors send internet for cloud
V. Sharma, real-time data to a cloud communication, and
Gas Leakage
R. Dugyala, platform via a sensor calibration is
Detection System
8 V. 2023 microcontroller for necessary to
Using IoT and
Padmavathi, monitoring and maintain accuracy
Cloud Technology.
G. Vijendar generating alerts when in varying
gas exceeds thresholds. environmental
conditions.
Medabalimi
Abhinay, Primarily suitable
Monitors container
Manda Paul for household
weight; automated
IoT Based Gas Pramod, applications with
9 2024 booking system; provides
Leakage Detection Mandapati limited scalability
mobile application
Usha, Bala to industrial
interface
Brahmeswara settings.
Kadaru
The system offers
Lacks remote
real-time monitoring on
Ch.Lasya, monitoring, limited
Gas Detection and an LCD, customizable gas
Y.Sirisha, detection range,
Environmental thresholds, alerts, and
10 S.Parvathi, 2024 potential false
Monitoring Using temperature-humidity
Y.Geetha alarms, and relies
Raspberry Pi Pico sensing with
Kusuma on threshold-based
audible-visual
detection.
notifications.
16
2.3.1 Summary
The reviewed projects highlight limitations in existing gas detection systems, revealing several
key challenges. Most systems lack remote monitoring capabilities, limiting their usability in
industrial settings where constant oversight is essential. Reliance on threshold-based detection
methods can lead to frequent false alarms, affecting reliability and making systems less suitable
for environments requiring high precision. Some projects depend on stable internet or GSM con-
nectivity, which can compromise functionality in areas with poor signal strength. Additionally,
while many systems provide real-time alerts, few offer preventive control measures, restricting
their effectiveness in fully preventing gas leakage incidents. These gaps emphasize the need for
a more reliable, preventive, and adaptive gas leakage detection system that can overcome the
limitations of threshold reliance, improve accuracy, and extend remote monitoring capabilities,
particularly for industrial applications.
2.5 Motivation
Gas leaks are a significant hazard in both industrial and residential environments, leading to
dangerous situations that can result in catastrophic accidents, property damage, and loss of
life. The motivation behind developing this system is driven by the pressing need to enhance
safety measures, particularly in environments where gas leaks can escalate into life-threatening
situations.
A real-life incident that underscores the critical need for such a project occurred in 2017 at an
industrial plant in Visakhapatnam, India, where a gas leak led to a devastating accident. A leak
of styrene gas—a toxic substance—spread rapidly from the plant, affecting nearby residential
areas. The tragedy resulted in several fatalities, hundreds of injuries, and widespread health
impacts on the community. This incident highlighted the gaps in existing gas detection and
safety mechanisms, which lacked both real-time alert systems and automatic preventive actions.
The delay in detecting and responding to the gas leak exacerbated the situation, with severe
consequences that could have been mitigated through timely intervention.
The proposed system aims to prevent similar incidents, Such a system would offer an addi-
tional layer of protection, ensuring quick detection and response to gas leaks, thereby signifi-
cantly reducing the risks posed by gas-related hazards.
17
2.6 Goals and Objectives
Goals
4. Support Environmental Protection: Prevent gas leaks that can lead to environmental
contamination, contributing to eco-friendly operations by minimizing harmful emissions
and promoting safe gas handling practices.
Objectives
18
2.7 Principles
• Safety First: The primary principle of this project is to enhance safety by minimizing
the risks associated with gas leaks. Every aspect of the system—design, functionality, and
performance should prioritize the prevention of accidents, ensuring the safety of people,
property, and the environment.
• Reliability and Accuracy: The system must provide precise and reliable gas detection,
even in challenging or changing environments. It should be designed to accurately detect
various gas types and respond instantly, minimizing false alarms and ensuring dependable
performance.
• Data Privacy and Security: Given the system’s IoT-enabled functionality, ensuring
the privacy and security of data is essential. Data related to system performance, gas
levels, and user information should be protected from unauthorized access, aligning with
industry data security standards.
19
2.8 System Methodology
This project follows an Agile SDLC methodology, emphasizing iterative and incremental
development. The focus is on delivering functional components in short sprints, ensuring con-
tinuous feedback and improvement.
We chose the Agile model for this project due to its flexibility and iterative approach, which suit
the evolving needs of an IoT-based safety system. Agile allows us to adapt quickly to changes
and integrate stakeholder feedback, essential for a project involving real-time gas detection and
remote monitoring. The model’s emphasis on delivering functional increments ensures that
critical features—such as alerts, automatic shut-offs, and remote monitoring—are continuously
tested and refined. Agile’s adaptability also enables us to address potential hardware-software
integration challenges early, reducing safety risks and ensuring a robust, reliable system that
aligns with user expectations. This collaborative and responsive approach makes Agile the ideal
choice for developing a proactive gas leakage detection solution.
20
1. Planning Phase (Sprint 1 & Ongoing in Each Sprint)
• Gather requirements from stakeholders (end-users, safety experts, maintenance teams).
• Break down requirements into user stories and create a product backlog.
• Implement the automatic shut-off feature for enhanced safety during hazardous gas levels.
Deliverables: Functional IoT integration, remote monitoring interface, alert notification mod-
ule.
• Conduct user acceptance testing (UAT) with end-users to ensure ease of use and reliability.
21
6. Review and Retrospective Phase (End of Each Sprint)
• Conduct sprint reviews to demonstrate completed features.
22
2.9 Benefits of system
1. Real-Time Monitoring with a Live Dashboard: The system features an easy-to-use
dashboard that provides real-time information about gas levels and sensor data. As soon
as gas levels exceed safety limits, users are alerted instantly through notifications and
visual cues on the dashboard, enabling them to take quick action.
2. Reducing False Alarms using Machine Learning: False alarms are common in
traditional gas detection systems due to sudden sensor spikes. Our system overcomes
this by using the isolation forest machine learning model, which analyzes sensor data
to distinguish between normal variations and actual leaks. This improves accuracy and
reduces unnecessary alarms.
3. Predictive Pipeline Maintenance: The system doesn’t just detect gas leaks but also
monitors pipelines in real-time, tracking important factors like temperature, and gas
composition outside the pipes. By analyzing this data, the system can predict when
maintenance is needed, preventing failures before they happen.
5. Remote Valve Control: One of the standout features of the system is its ability to con-
trol gas flow remotely. From the dashboard, users can shut off gas valves in an emergency,
stopping leaks before they cause serious damage.
23
CHAPTER 3
SYSTEM ARCHITECTURE AND
REQUIREMENT ANALYSIS
24
3.1 System Architecture
This system architecture is a high-level design for a gas leak detection and monitoring system
using predictive maintenance and real-time alerting.
Components:
1. Sensors:
• Temperature Sensor: Monitors the temperature, which can help detect abnormal
heating related to gas leaks.
• Gas Sensor: Continuously monitors gas levels to detect any leaks or hazardous
levels.
2. Data Storage:
• Sensor Data DB: Stores real-time data from sensors, which can be used for mon-
itoring and trend analysis.
• Maintenance Logs DB: Stores maintenance-related data, such as logs generated
from predictive maintenance processes, ensuring the system can track and schedule
maintenance effectively.
25
3. Predictive Maintenance Service:
• Isolation Forest Model: This machine learning model analyzes the sensor data
for anomalies, such as unusual temperature or gas readings. It helps in identifying
potential issues before they escalate, reducing false alarms and predicting equipment
or sensor maintenance needs.
5. Live Dashboard:
• Provides real-time data to the user, showing sensor readings and any detected
anomalies. It enables remote monitoring, allowing users to keep track of gas levels
and take immediate action if necessary.
Workflow:
1. The temperature and gas sensors continuously send data to the Sensor Data DB.
2. The Predictive Maintenance Service, powered by the Isolation Forest Model, monitors
this data. If the model detects an anomaly, it logs this information in the Maintenance
Logs DB and alerts the Alarming and Actuating System if necessary.
3. When abnormal readings are detected (e.g., gas concentration exceeding safe limits), the
Alarming and Actuating System activates, triggering alarms and potentially shutting off
gas valves or activating exhaust fans to mitigate the leak.
4. The Live Dashboard provides a real-time interface for users to monitor the system’s status
and receive alerts, allowing prompt action when required.
This architecture emphasizes safety, reliability, and proactive maintenance, aiming to mini-
mize the risk of gas leaks through automated monitoring, alerting, and preventive measures.
26
3.2 Functional Requirements
1. Gas Detection and Monitoring: The system must be able to continuously detect
various gases such as LPG, methane, and other industrial gases using integrated sensors.
Real-time data collection should be maintained for effective monitoring.
4. User Interface for Remote Access: A user-friendly interface is required for monitor-
ing gas levels, system status, and settings control, allowing users to manage the system
remotely.
5. Data Privacy and Security: The system must protect data related to gas levels and
user information from unauthorized access, ensuring compliance with data security stan-
dards.
2. Real-Time Responsiveness: It should detect gas leaks and send alerts instantly, al-
lowing users to respond promptly. Automated mechanisms like shutting off valves must
function without delay to prevent hazardous situations.
3. Scalability and Flexibility: The system must be adaptable to various settings, from
small homes to large industrial sites, and support integration with other IoT devices and
control systems, enhancing flexibility
27
3.4 Feasibility Study
To assess the feasibility of the gas leak detection and monitoring system, we analyze several
critical areas:
• Isolation Forest Model: The Isolation Forest model is applied to sensor data to
detect anomalies. Detection accuracy is measured with the following metrics:
– Precision (P): Measures the model’s accuracy in correctly identifying gas
leaks.
∗ True Positives (TP): Correctly detected gas leaks.
∗ False Positives (FP): Instances where a gas leak is incorrectly detected.
– Recall (R): Measures the model’s sensitivity in detecting all actual gas leaks.
∗ False Negatives (FN): Instances where a gas leak is missed.
– F1 Score: Provides a balanced measure of precision and recall to assess model
reliability.
– Model Optimization: The Isolation Forest parameters, such as contamina-
tion factor and number of trees, should be optimized to achieve a high F1
Score.
• Latency Calculation: The total time delay from gas leak detection to alarm/valve
shutoff is modeled as:
• Supposed Values:
600ms = 250ms + 50ms + 300ms
– Detection Latency (Ldetection ): Time taken by sensors to detect gas con-
centration above threshold.
– Processing Latency (Lprocessing ): Time taken by the Isolation Forest model
to process data and detect anomalies.
– Response Latency (Lresponse ): Time taken by the system to shut off the
valve and activate alarms.
• Real-Time Response Goal: Minimize the total latency, ideally keeping it under
a specific safety threshold (e.g., 1 second for industrial standards).
3. Cost Feasibility
• Initial Costs:
• Supposed Values:
2270 = 900 + 800 + 570 + 1000
28
– Sensor Costs (Csensors ): Includes costs of MQ2 gas sensors, temperature
sensors, and additional sensors.
– Microcontroller Costs (Cmicrocontroller ): Cost of a Raspberry Pi Pico or
other microcontroller.
– Hardware Costs (Chardware ): Includes alarms, valves, and exhaust systems.
– Software Development Costs (Csoftware ): Cost to develop and maintain a
live dashboard.
• Operational Costs:
– Maintenance Costs (Cmaintenance): Routine checks, sensor calibration,
and predictive maintenance costs.
– Energy Consumption Costs (Cenergy ): Based on energy consumption of
sensors and microcontrollers.
• Predictive Maintenance Model
– Failure Rate Prediction: The predictive maintenance algorithm assesses
sensor and pipeline health based on a failure rate model.
– Mean Time Between Failures (MTBF): Mean Time Between Failures
(MTBF) is a metric that indicates the average time a system or component
operates before experiencing a failure. It is commonly used to predict the re-
liability and expected uptime of equipment, helping in planning maintenance
and minimizing downtime. A higher MTBF value signifies greater reliability
and longer operational lifespan. Calculated as:
1
MTBF =
λ
where λ is the failure rate.
– Maintenance Scheduling: Based on MTBF values, schedule regular mainte-
nance to reduce downtime and extend system life.
• Scalability Feasibility
– System Expansion Potential: The system should scale from single installa-
tions (e.g., households) to industrial applications.
– Scalability Factor (S): Defined as the maximum number of sensors and de-
vices the system can support without performance degradation. Calculated
based on processing power, bandwidth, and response times.
By analyzing these factors, we assess the feasibility of implementing the gas leak detection and
monitoring system. High detection accuracy, minimal latency, reasonable costs, and scalability
are essential metrics indicating a feasible and effective solution. This feasibility study provides
a quantitative foundation for assessing the practical and economic viability of the proposed
system.
29
3.5 Risk Management
Effective risk management is essential for ensuring the safety, reliability, and operational effi-
ciency of a gas leak detection and monitoring system. The following are key risks identified for
the system, along with corresponding mitigation strategies:
1. Sensor Malfunction
• Risk: Gas sensors (e.g., MQ2) or temperature sensors may malfunction, leading to
incorrect gas concentration readings or failing to detect leaks.
• Impact: Failure to detect a gas leak promptly can result in accidents, property
damage, or environmental hazards.
• Mitigation Strategy:
– Implement predictive maintenance algorithms to monitor sensor health and
trigger maintenance alerts.
– Perform regular sensor calibration to maintain accuracy.
– Use redundant sensors (multiple sensors for the same area) to cross-check data
for reliability.
2. False Alarms
• Risk: The system may trigger false alarms due to environmental changes, interfer-
ence, or algorithm inaccuracies.
• Impact: Frequent false alarms can lead to ”alarm fatigue,” causing users to ignore
alarms, or can disrupt operations.
• Mitigation Strategy:
– Optimize the Isolation Forest model to reduce false positives by refining thresh-
old settings.
– Use temperature and humidity sensors alongside gas sensors to provide contex-
tual data, reducing the likelihood of false alarms.
– Alert users via a dashboard notification to verify the situation before activating
safety mechanisms like shutting off valves.
3. Power Failure
• Risk: A power outage can disable the gas leak detection system, leaving the area
unmonitored.
• Impact: If a gas leak occurs during a power failure, it could go undetected, increas-
ing the risk of accidents.
• Mitigation Strategy:
– Incorporate a backup power supply (e.g., UPS or battery backup) to keep the
system operational during outages.
– Implement fail-safe mechanisms that automatically activate alarms and shut-off
valves if power is lost.
30
4. Network Connectivity Issues
• Risk: The system relies on network connectivity for real-time monitoring and alerts,
which may be disrupted due to connectivity issues.
• Impact: Loss of connectivity could prevent the system from sending alerts, affecting
timely responses to gas leaks.
• Mitigation Strategy:
– Design the system to store data locally and synchronize once connectivity is
restored.
– Implement a notification system that alerts users to connectivity issues so they
can take manual precautions.
• Risk: The system must comply with industry standards and regulations regarding
gas detection and safety.
• Impact: Non-compliance could lead to legal repercussions, fines, and lack of certi-
fication for industrial use.
• Mitigation Strategy:
– Ensure the system design adheres to relevant industry standards (e.g., OSHA,
NFPA).
– Conduct regular compliance audits to verify that all aspects of the system align
with regulatory requirements.
– Keep updated on regulatory changes and adjust the system design and operation
accordingly.
31
3.6 Planning and Scheduling
32
The Gantt chart illustrates the project timeline for creating a gas leakage detection and monitor-
ing system. It starts with Project Planning and Requirement Gathering from September
4 to September 13, 2024, involving the definition of system requirements and identification of
both hardware and software components. System Design takes place between September 11
and September 27, focusing on architecture creation, software requirements definition, and pre-
liminary design. Hardware and Component Procurement follows from September 30 to
October 10, involving identification, purchase, inspection, and testing of hardware. The final
phase, Live Dashboard and Control System Development, spans October 10 to October
20, focusing on building a live monitoring dashboard for real-time tracking and control.
33
CHAPTER 4
SYSTEM MODELING AND
DESIGNING
34
4.1 UML Diagrams
1. Class Diagram
The diagram represents the static structure of the system, showing its classes, attributes,
methods, and relationships. Includes entities like GasSensor, Microcontroller, Actuator, and
their attributes and methods. Highlights associations, such as Microcontroller controlling Ac-
tuator and triggering Alarm. Provides a blueprint for system design and implementation.
35
2. Use-Case Diagram
Illustrates functional requirements by capturing interactions between users (actors) and the
system. Includes actors like User and use cases such as Monitor Gas Levels and Trigger Alarm.
Shows how actors interact with specific system functionalities. Ensures all user requirements
are accounted for.
36
3. Sequence Diagram
Captures the sequence of interactions between system components over time. Includes ob-
jects like GasSensor, Microcontroller, and Alarm. Depicts the order of messages exchanged to
achieve functionalities like gas monitoring. Ensures clarity on interaction timing and order.
37
4. Activity Diagram
Visualizes the dynamic behavior and workflow of the system’s processes. Includes activities
like Detect Gas Levels, Log Data, and Trigger Alarm. Depicts the flow of control from one
activity to another, including decision points. Helps in understanding system operations and
refining workflows.
38
5. State Chart Diagram
Represents the states and transitions of system components, particularly for dynamic be-
havior. States like Idle, Monitoring, and Alarm Triggered. Shows how the system transitions
between states based on events like Gas Detected. Aids in defining system behavior under
different conditions.
39
6. Package Diagram
Organizes the system into logical groups to manage dependencies and structure. Packages
like Sensor Module, Control Module, and User Interface. Shows how these packages depend on
or interact with each other. Simplifies system design by modularizing components.
40
7. Deployment Diagram
Illustrates the physical deployment of system components on hardware. Nodes like Micro-
controller, Gas Sensor, and Actuator. Shows how components are connected, such as Microcon-
troller controlling Actuator. Helps in planning hardware configuration and system deployment.
41
8.Communication Diagram
Focuses on the interactions between system objects, emphasizing communication links. Ob-
jects like GasSensor, Microcontroller, and User. Shows message exchange paths to achieve tasks
like data logging and alerting. Complements sequence diagrams by showing object relationships
and interactions
42
4.2 ER Diagram
43
Figure 4.12: ER Diagram
4.3 Data Flow Diagram
The data-flow diagram (DFD) illustrates the flow of data within the system, highlighting how
information is processed and exchanged between different components. It consists of elements
such as GasSensor, Microcontroller, Actuator, and User, showing data movement through pro-
cesses like Monitor Gas Levels, Log Data, and Trigger Alarm. Data stores, if used, represent
repositories where information is stored for later use. The diagram emphasizes the inputs and
outputs for each process, providing a clear view of how data travels and is transformed within
the system. This ensures efficient data handling and helps in identifying potential bottlenecks
or redundancies in the workflow.
44
CHAPTER 5
IMPLEMENTATION
45
5.1 Algorithm
5.1.1 Gas Leakage Detection and Prevention System Algorithm
1. Start: The algorithm begins by starting the gas leakage detection system.
• The system initializes all sensors (such as the MQ2 gas sensor and temperature
sensor) and other essential components needed for data collection and analysis.
• The system gathers real-time data from both the gas sensor (for gas concentration)
and the temperature sensor.
• Condition: If a gas leak is detected based on the Isolation Forest model (an
anomaly detection model):
– Action: The system shuts off the gas valve and activates an alarm.
• Else Condition: If no gas leak is detected, the system continues monitoring.
• The system runs a separate predictive maintenance algorithm to ensure sensors and
pipelines are functioning properly.
• All collected and processed data is displayed on the user dashboard for real-time
monitoring.
8. End: The algorithm completes its cycle, restarting or looping for continuous monitoring.
46
– spike limit: Defines the maximum allowed false spikes before flagging the
sensor for maintenance.
• The algorithm continuously monitors the sensors to collect data and detect irregu-
larities.
• For each sensor reading, the algorithm checks for false spikes.
• After flagged components are maintained, the algorithm resets all counters.
9. End: The predictive maintenance algorithm concludes, restarting for continuous moni-
toring.
47
5.2 Flow of Project
The gas leak detection and monitoring system begins by initializing the sensors and components,
followed by data collection from MQ2 gas sensors and temperature sensors. The system first
checks if the temperature exceeds 50°C; if so, it triggers an alert on the dashboard and activates
an alarm to warn of potential risks. If the temperature is within safe limits, the system proceeds
to run a predictive maintenance algorithm to assess the condition of the pipelines and sensors,
helping to anticipate any potential failures. The MQ2 gas sensor data is analyzed using the
Isolation Forest model, which detects anomalies in gas concentration that may indicate a leak.
If a gas leak is identified, the system automatically shuts off the valve to stop the gas flow and
triggers an alarm to alert users. All collected data and system status updates are displayed on
a live dashboard for continuous monitoring. This process ensures real-time detection of unsafe
conditions, immediate alerts, and automated preventive actions to maintain safety.
48
5.3 Methodology
The IoT-based gas leakage detection and monitoring system is designed to provide comprehen-
sive, real-time safety management. First, gas, temperature, and humidity sensors are strate-
gically installed in high-risk areas to continuously monitor environmental conditions. These
sensors transmit data to a central microcontroller, which preprocesses it by filtering out noise
and unnecessary information. This refined data is then analyzed by an isolation forest model,
a machine learning algorithm that detects anomalies in the sensor readings. By identifying
unusual patterns, the system distinguishes between genuine leaks and false alarms, a common
issue in traditional threshold-based systems. Custom thresholds for various gases are also im-
plemented to detect specific leaks according to safety standards.
Real-time monitoring is conducted through a live dashboard, which provides an accessible in-
terface displaying current gas levels, temperature, and humidity data. When gas levels surpass
safe limits or an anomaly is detected, the system triggers alerts via visual cues and audible
notifications on the dashboard, along with user notifications. Additionally, the system includes
predictive maintenance features for both pipelines and sensors. By analyzing environmental
data around pipelines, it can predict maintenance needs to prevent unexpected failures. Simi-
larly, the system monitors sensor performance over time, tracking response speed and accuracy
to detect early signs of deterioration. This predictive functionality ensures reliable system op-
eration and reduces downtime due to sensor failures.
In critical situations, the system allows authorized users to remotely control gas flow by shutting
off valves through the dashboard, a feature that enables quick emergency response to potential
leaks. If a severe leak is detected, the system automatically activates alarms and other safety
responses, notifying on-site personnel and stopping machinery as needed to prevent further
hazards. Incident and sensor data are continuously logged, enabling a comprehensive record
for future analysis and system improvement. This integrated approach to monitoring, anomaly
detection, and automated safety interventions provides robust protection for industrial settings,
enhancing both safety and operational efficiency.
49
5.4 Psuedo Code
Algorithm for Triggering alarm and sending alerts
50
5.5 Screen Shots of Implementation
51
Figure 5.18: Implementation
52
CONCLUSION
53
CONCLUSION
The implementation of advanced gas leak detection systems, as discussed in the reviewed papers,
is crucial in addressing the increasing need for reliable and scalable solutions that prioritize per-
sonnel safety, environmental protection, and operational efficiency. These systems, which incor-
porate real-time monitoring, wireless communication, and automatic response mechanisms such
as alarms and shut-off valves, provide immediate and effective responses to potential gas haz-
ards. By utilizing sophisticated technologies like FPGA, GSM modules, and microcontrollers,
these solutions ensure timely detection and mitigation of gas leaks, whether in industrial or do-
mestic settings. The successful adoption of such systems will play a significant role in creating a
safer, more efficient industrial landscape, reinforcing the commitment to health, safety, and en-
vironmental stewardship. Specifically, the integration of real-time monitoring and alert systems
allows companies to swiftly respond to potential gas leaks, preventing accidents, minimizing
environmental damage, and enhancing overall production efficiency. This shift towards more
proactive and automated gas leak detection is essential for fostering a safer, more sustainable
future across various sectors.
54
REFERENCES
55
REFERENCES
[1] Bala Brahmeswara Kadaru (2024). IoT Based Gas Leakage Detection.
[2] Y. Geetha Kusuma (2024). Gas Detection and Environmental Monitoring Using Rasp-
berry Pi Pico.
[3] V. Sharma, R. Dugyala, V. Padmavathi, and G. Vijendar (2023). Gas Leakage Detection
System Using IoT and Cloud Technology.
[4] Mohammad Khalid Saifullah (2021). A Smart Natural Gas Leakage Detection and Control
System for Gas Distribution Companies of Bangladesh using IoT.
[5] S. M. Zinnuraain (2019). Smart Gas Leakage Detection with Monitoring and Automatic
Safety System.
[7] J. Vijaya Lakshmi, Dr. G. Puthilibhai, and S. R. Leoram Siddarth (2019). Implementa-
tion of Ammonia Gas Leakage Detection and Monitoring System using Internet of Things.
[9] Shruthi Unnikrishnan (2017). LPG Monitoring and Leakage Detection System.
[10] A. Beliraya and Yenepoya (2017). GSM Based Gas Leakage Detection System Using
Arduino.
56