Design and Implementation of Scalable IoT Platform
Design and Implementation of Scalable IoT Platform
A Thesis
Submitted to the Electrical Engineering College
in Partial Fulfillment of the Requirement for the Degree of Master
in Computer Engineering Technique.
By
Taha Essam Mahmood
Supervised by
Dr. Osama Abbas Hussein
Assist. Prof. Dr. Alaa Khamees K Al-azzawi
[ سورة يوسف ]
Supervisor Certification
Signature:
Name: Osama Abbas Hussein
Title: Dr.
Date:
Signature:
Name: Alaa khamees K Al-azzawi
Title: Assist. Prof. Dr.
Date:
Linguist Certification
I certify that I have read this thesis entitled Design and Implementation
of Scalable IoT Platform for Environmental Pollution Monitoring
System: A Case Study of Iraq by Taha Essam Mahmood I examined the
language of the thesis and in my opinion, it is free of linguistic and
grammatical errors.
Signature:
Name: Raghad Hassan Hussein
ََ Title: Assist. Prof. Dr.
Date:
Signature:
Name: Assist. Prof. Dr. Muhamed Ibrahim Shujaa
Head of Computer Engineering Techniques Department
Date:
Examining Committee Certification
We are members of the examining committee certify that after reading this
thesis Design and Implementation of Scalable IoT Platform for
Environmental Pollution Monitoring System: A Case Study of Iraq and
examining the student Taha Essam Mahmood in its contents. In our opinion,
the thesis is adequate for the award of Degree of Master of Technical in
Computer Techniques Engineering.
Signature:
Title: Assist. Prof. Dr.
Name: Muhamed Ibrahim Shujaa
Date:
(Chairman)
Signature: Signature:
Title: Assist. Prof. Dr. Title: Dr.
Name: Ammar Ibrahim Majeed Name: Basman Monther Jawamer
Date: Date:
(Member) (Member)
Signature: Signature:
Title: Dr. Title: Assist. Prof. Dr.
Name: Osama Abbas Hussein Name: Alaa Khamees Khudair
Date: Date:
(Supervisor 1) (Supervisor 2)
Signature:
Name and Title: Prof. Dr. Adel Ahmed Obed
Dean of Electrical Engineering Technical Collage
Date:
DEDICATION
My father, my mother....
Taha E. Mahmood
Acknowledgments
Always the greatest praise and thanks be to "Allah" Almighty. The blessings
of Allah upon us are countless. There are so many blessings of Allah that we can’t
even write them down. If we start writing them all, our life will come to an end,
but Allah’s grace will never finish. Allah said: “… And If you would count
the blessings of Allah you would not be able to count them …”
[Surah Ibrahim 14:34].
I would like to express my sincere respect and gratitude to the Head of the
Computer Engineering Techniques Department (Assist. Prof. Dr. Muhamed
Ibrahim Shujaa) and to the Rapporteur of the Computer Engineering Techniques
Department (Prof. Dr. Mahmood Farhan Mosleh) for their kindness and support to
complete the requirements of presenting this thesis as soon as possible.
I would like to thank the faculty of the graduate studies department at the
Electrical Engineering Technical College for their assistance and support.
Finally, I would like to show my great appreciation to my family & friends for
their continuous encouragement.
II
Abstract
Recently published researches confirmed the existence of widespread pollution
in the cities of Iraq, where many residents of these cities suffer from injuries directly
related to dangerous environmental pollutants. This is accompanied by the lack of
monitoring systems in place to detect air pollutants, for example: particulate matter,
sulfur dioxide, ground-level ozone, carbon monoxide, nitrogen dioxide, and
radioactive pollution. Thus, it required the use of systematic application solutions to
reduce the impact of these pollutants.
The thesis focused in-depth on studies and research that introduced many
innovations and design solutions related to real-time air pollution monitoring
systems, looking to obtain an integrated system design that is suitable and serviceable
in terms of comprehensive coverage of air pollutants and the general population
of Iraq.
Given the apparent deficiency in the backend design for this kind of system,
it was concluded that there is a need for an ideal integrated design pattern supported
by the most appropriate technologies with the least consumption of computing
resources, this represents the main contribution of this thesis that was focused on.
In practice, the proposed system receives the sensing nodes’ readings over the
Internet periodically, in turn analyzing and collecting it systematically, and storing it
in a special database. On the other hand, the system displays the results of analyzed
data (cities pollution levels) in real-time to the population through a special web
application, emphasizing the high pollution rates and the need to find the appropriate
solutions to them.
To emphasize, the JavaScript Object Notation (JSON) message format is used
in this thesis due to its ease of reading, parsing, and generation, along with the
Constrained Application Protocol (CoAP) of the lowest bandwidth and
communication overhead compared to MQTT protocol for exchanging data between
the distributed nodes (T-Call ESP32 modules) and the system's web application, as
well as for organizing and displaying the content of pollution sites on Google Maps.
In addition, a MongoDB is used as a database to store the large-scale system
data received from the sensing nodes due to its efficiency in managing JSON-
formatted documents with less query execution time compared to MySQL and
Cassandra databases, while the MySQL database is used to store and manage system
relational data represented by information of (supervisors, sensing locations,
departments, and notifications) due to its efficiency to manage such data. Finally, the
results showed that there is a clear reduction in data query execution time, bandwidth,
and consequently, a noticeable increase in the overall system performance efficiency.
III
List of Contents
Page
Acknowledgments …………………………………………...………... I
Abstract ……………………………………………………..………… II
List of Contents …………………………………...…………………... III
List of Figures …………………...……………..……………………... VI
List of Tables ………………………………………..………....……... VIII
List of Abbreviations ……………………………………..…....……... IX
List of Symbols …………………………………………………..…… XI
CHAPTER ONE: Introduction
1.1 Overview ……………..………………………………..………….. 1
1.2 Literature Survey …….………………………………..………...… 1
1.3 Problem Statement …....……………………..……………………. 9
1.4 Thesis Objective ……….………………………………………..… 9
1.5 Thesis Contribution ……………………………………………….. 10
1.6 Organization of the Thesis …………………………………..……. 10
CHAPTER TWO: Theoretical Background
2.1 Introduction ………………………………………………...……... 12
2.2 Air Pollution …....………………..……………………………….. 12
2.2.1 Air Quality Standard ……………….……………..………… 12
2.2.2 Air Pollution Sensors ………..……………………..……..… 15
2.3 Radioactive Pollution ...………………….……....………..………. 18
2.3.1 Radioactive Thermometer ……….…………………..…….... 19
2.3.2 Radiation Detector .…………………………………..…....… 20
2.4 Transmission Unit …………………………………………...……. 20
2.5 JSON Message Format …………………...…………………….…. 22
IV
2.6 System Architecture ……….……………………………………… 23
2.7 IoT Messaging protocols ……………………….……………...….. 23
2.7.1 MQTT Protocol …………………...……………………..….. 24
2.7.2 CoAP Protocol …………………………………….………… 26
2.8 Databases ………………………………………………………...... 31
2.8.1 MySQL Database …………………………………………… 31
2.8.2 Cassandra Database ……………...……………………..…… 32
2.8.3 Mongo Database ……………………...…………………...… 33
2.9 Google Maps API …………………………………………………. 33
2.9.1 Loading the Maps API ……………………………………… 34
2.9.2 Adding a Marker …………………………………………..... 34
2.9.3 Adding an InfoWindow ……………………………………... 35
2.9.4 Adding Google Charts …………………………………….… 35
CHAPTER THREE: Proposed System
3.1 Introduction ……………………………………………………….. 38
3.2 Optimum Sensing Locations ………...…………………...……….. 38
3.3 System Design …………………………………………………….. 41
3.3.1 Sensing Unit Design ………………………………………… 41
3.3.2 Cloud Computing Design …………………………………… 44
3.3.3 Messages Format Design …………………………………… 46
3.3.3.1 Type-1 Message Format ……………………………. 46
3.3.3.2 Type-2 Message Format ……………………………. 47
3.3.4 Web-Application Design …..………………………………... 47
3.3.4.1 Administrator Dashboard Webpage ………….……... 47
3.3.4.2 Supervisors Control Panel Webpage ………………... 60
3.3.4.3 Main Webpage/Citizen Service Webpage ……...…… 61
3.4 Deployment Recommendations …………………………………... 62
V
CHAPTER FOUR: Results and Discussion
4.1 Introduction ……………………………………………………….. 64
4.2 System Messages ………………………………………………..… 64
4.2.1 Type-1 Message Format …...………………………………... 64
4.2.2 Type-2 Message Format ...…………………………………... 64
4.3 System Messaging Protocol ………………………………………. 65
4.3.1 MQTT Protocol ……………………………………………... 65
4.3.2 CoAP Protocol ………………………………………………. 65
4.4 System Database ….………………………………………………. 65
CHAPTER FIVE: Conclusions and Future Work
5.1 Conclusions ………………………..…………………………….... 72
5.2 Future Work ……………………..….……………………………... 73
References …………………………………………………... 75
Appendix ……………………………………...……….……. 81
VI
List of Figures
Figur
Title Page
e
VII
3.1 The Proposed System Pictorial Representation ….…...…….… 40
3.2 The Proposed Flowchart of the Sensing Module Software Design 42
3.3 Sensing Unit Diagram ………………………….…….…………. 43
3.4 System Cloud Computing Components Structure ……….…....… 45
3.5 Administrator Dashboard Webpage …………………………..… 48
3.6 Supervisor’s Management Webpage ………………………......... 48
3.7 Supervisor Add/Edit Webpage ……………………………….…. 49
3.8 Sensor Management Webpage ………………………………..… 50
3.9 Sensor Add/Edit Webpage …………………………………….... 50
3.10 Department Management Webpage ………………………….…. 51
3.11 Department Add/Edit Webpage ………………………………..... 52
3.12 Ads Bar Management Webpage ……………………………….... 53
3.13 Ads Add/Edit Webpage ……………………………………….… 53
3.14 Data Search Engine Webpage ……………………………….….. 54
3.15 Data Search Results Webpage ………………………………...… 55
3.16 Latitude and longitude Finder Webpage ………………………... 56
3.17 Flowchart of The Sensor-Checking Algorithm …………….…… 58
3.18 Sensors Checking Results Webpage ………………………......... 59
3.19 Supervisors Control Panel Webpage ……………………….…… 60
3.20 Citizens Service Webpage ……………………………………..... 62
VIII
List of Tables
Table Title Page
IX
List of Abbreviations
Abbreviation Description
AJAX Asynchronous JavaScript And XML
AMQP Advanced Message Queuing Protocol
AP Access Point
API Application Programming Interface
APP Application
AQI Air Quality Index
AQMI Air Quality Monitoring Instrument
CDC Centers for Disease Control and Prevention
CO Carbon Monoxide
CoAP Constrained Application Protocol
CSS Cascading Style Sheets
DDS Data Distribution Service
DNA Deoxyribonucleic Acid
DNS Domain Name Service
DT Decision Tree
GIS Geographic Information Systems
GM Geiger–Müller
GPP Green Public Procurement
GPRS General Packet Radio Service
GSM Global System for Mobile Communications
HTML Hyper Text Markup Language
HTTP HyperText Transfer Protocol
IoT Internet of Things
JSON JavaScript Object Notation
LPWA Low-Power Wide-Area
X
MCU Microcontroller
Mobile-DAQ Mobile Data-Acquisition Unit
MongoDB Mongo Database
MQTT Message Queuing Telemetry Transport
MSE Mean Square Error
MySQL My Structured Query Language
NO2 Nitrogen Dioxide
NoSQL Non Structured Query Language
O3 Ground-Level Ozone
PHP Personal Homepage (Hypertext Preprocessor)
PM Particulate Matter
RAM Random Access Memory
RD Radiation
RDBMS Relational Database Management System
SDR Software Defined Radio
SEMAR Smart Environment Monitoring & Analytic in Real-time
SMS Short Message Service
SO2 Sulfur Dioxide
SVM Supporting Vector Machines
TCP Transmission Control Protocol
UDP User Datagram Protocol
US EPA US Environmental Protection Agency
VaaMSN Vehicle as a Mobile Sensor Network
WMS Web Map Service
WSN Wireless Sensor Network
XML Extensible Markup Language
XMPP Extensible Messaging and Presence Protocol
XI
List of Symbols
Symbol Description
XII
Chapter One
[Introduction]
Chapter One Introduction
Chapter One
Introduction
1.1 Overview
The number of automobiles, buses, trucks, heavy construction
equipment, and local generators has increased greatly in Iraq since 2003.
In addition to the pollution resulting from dust storms, which constitute the
highest levels of pollution in the air and threaten the lives of many people due to
their negative effects on health and the country's economy [1 - 3]. As well as, the
remnants of wars that have caused high environmental problems, according to the
statistics of the effects of radioactive pollution on the lives of citizens resulting
from the destruction of the 14-Tammuz nuclear reactor in 1981, in addition, the
recent wars in Iraq (1991 to 2015) where sophisticated ammunition that contained
depleted uranium were used in combat. The usage of these weapons severely
impacted humans, animals, and the surrounding environment [4 - 7].َ
However, some researchers gave recommendations to design a map
showing all polluted areas in Iraq due to the increasing statistics of the population
affected by pollution symptoms [7].
Giving the severity of the topic, it is clear that Iraqi society truly needs a
real-timeَservice that helpsَmonitor and observe changes in the concentration of
environmental pollutants for all polluted areas. That is why this thesis delves into
the design of a scalable distributed system for such service.
1.2 Literature Survey
Several studies have been carried to design and implement outdoor
air pollution monitoring systems. A review of some of these is presented
in this section, with the hope of getting an idea about the design approach,
techniques, and system architecture that can be used to design an integrated
system as a service for monitoring air pollutants in real-time for Iraq.
1
Chapter One Introduction
2
Chapter One Introduction
data and transmit it to the control center through SMS via GSM, where the
sensor data is stored in a database. Users can make inquiries about historical
data and the latest updated data through a webpage supported by the database.
5) In 2013, A. R. Kasar, D. S. Khemnar, and N. P. Tembhurnikar [12] have
developed a structure for identifying nodes and their interaction with an air
pollution monitoring system, the system design uses easy-to-use methods
such as tables and line graphs to visualize aggregate data from WSN as reports
on a daily or monthly basis as well as real reports - time notifications during
serious air pollution situations for use by authorities Competent. The proposed
hardware architecture design consists of an ATMEGA16 microcontroller
connected to SO2, CO2, and NO2 sensors, a GPS module, and a ZigBee
modem using an RS-232 interface.
6) In 2014, G. Swagarya, S. Kaijage, and R. S. Sinde [13] proposed an industrial
air quality monitoring system based on WSNs. This system uses the Global
System for Mobile Communications (GSM) and the Zigbee communication
protocol. The system consists of a set of sensors, a control center, and a
database in which sensor data can be stored for future plans and history. Each
sensor node consisted of an onboard GPS unit, a microcontroller, and sensors
to detect the O3, CO, and NO2. The node uses Bluetooth to send data to the
gateway in a car and store the data locally into memory when there is no Wi-
Fi hotspot to transmit the data to the server where the data would be processed
and published on the sensor Map portal.
7) In 2014, V. K. Ustad, A. S. Mali, and S. S. Kibile [14] proposed a system
consists of a Mobile Data-Acquisition Unit (Mobile-DAQ) and a fixed
Internet-Enabled Pollution Monitoring Server. The Mobile-DAQ unit
integrates a single-chip microcontroller, air quality sensors array, and GPS
Module. The Mobile-DAQ unit collects air pollutants levels (CO, NO2, and
SO2), and packs them in a frame with the GPS physical location, date, and
time. The frame is transmitted to the Pollution-Server via a Zigbee module.
3
Chapter One Introduction
The Central-Server uses Google Maps to show the location of the hardware
units. It can connect the database server to the Pollution- Server for storing
the concentration of the pollutants for further usage by various clients.
8) In 2015, F. Ye, X. Liu, and Y. Liu [15] proposed a design of the urban air
quality real-time forecast system is implemented based on the monitoring sites
and the Thiessen polygon. They proposed a three layered system architecture
including the data service layer, parsing and controlling layer, and
visualization layer. The proposed system was developed in Shanghai city.
They used AJAX technology to asynchronously read the air quality data and
send it in JSON format via HTTP. Each message format contains multiple
attributes (such as AQI, PM2.5, Station Code, Area Code, and Observation
Time, etc.). They used ArcGIS Thiessen Polygon tool to create Thiessen
polygons based on on-site location and Shanghai administrative boundaries.
At last, using ArcGIS Server, the Thiessen polygons will be published as
WMS for the visual representation layer.
9) In 2016, N. Kaur, et al. [16] proposed a new framework a WSN based on data
transmission and acquisition. The parameters selected for monitoring are
temperature, humidity, CO, CO2, smoke, alcohol. The reading of these
parameters is sent using Zigbee to a base station where they can be monitored.
The value of temperature and humidity are sent over Bluetooth technology
also so that every person within the range of the system can check it over their
laptops and smart mobile. CO is monitored with more precaution; a text
message is sent using a GSM unit to the base station whenever its
concentration exceeds a particular safe limit.
10) In 2016, K. Zheng, et al. [17] implemented an air pollution monitoring system
using Internet of Things platform technologies. With the help of the LPWA
network, air sensing data is collected over a large coverage area and
transferred to the IoT cloud in a timely manner. Gateway control points have
been developed to facilitate deployment and can operate all day with a solar
4
Chapter One Introduction
5
Chapter One Introduction
relatively low, and thus the end product will be cheaper in turn. In the
proposed system, the MQ2 gas sensor detects gases like Butane, Methane,
LPG, Smoke, etc. The MCU reads the sensor data and sends it to the IoT cloud
using the Esp8266 Wi-Fi module. The data collected and analyzed are
processed in the IoT cloud. This system makes it easy for the general public
to purchase and install in their homes, workplaces, etc.
14) In 2018, T. S. Gunawan, et al. [21] presented a cost-effective and portable
system for measuring air pollutants using four sensors and an Arduino board.
The proposed device allows people to measure Air Pollutant Index form
anywhere. It is able to measure the particulate matter, CO, and O3 and convert
the readings into an Air Pollutant Index value. The proposed system was
tested by comparing the current Air Pollutant Index measured in Malaysia at
several sites to the Air Pollutant Index measured from this device. The
obtained results show the system metering reliable and effective.
15) In 2018, Y. Y. F. Panduman, et al. [22] proposed a system consisting of a
Vehicle as a Environment Monitoring and Analytic in Real time-SEMAR
cloud computing and a Smart Mobile Sensor Network-VaaMSN as advanced
computing. The VaaMSN is a package of GPS, 4G Wi-Fi modem, air
pollution sensors, and single-board computing. SEMAR cloud computing
includes a database for real-time monitoring, big data environment, and
analytics using Decision Tree (DT) algorithm and Supporting Vector
Machines (SVM). The system output form consists of a table, a graph
visualization, and maps. The evaluation obtained from the results of the
experiment showed that the accuracy of the two algorithms is more than 90%.
However, the SVM's Mean Square Error_MSE value is about 0.03076293,
but the DT algorithm has an MSE value 10 times smaller than the SVM
algorithm.
16) In 2019, S. Chowdhury, et al. [23] proposed a monitoring system that
embodies a device made of various gas sensors, a GSM module, a cloud
6
Chapter One Introduction
server, and a mobile application. In the implemented device, one can easily
access the data from the server and app to monitor the air pollution condition.
Also, it consists of an alert system to send notifications when the pollution
parameters exceed the standard limitation. The hardware section divided into
two subdivisions: (1) Data Acquisition Sensors of CO2, Ammonia, CH4, CO,
Humidity, temperature, and PM. and (2) Data Transmission: Wi-Fi/GPRS
module). They designed an Android application using java language to
display the collected data. The system server collects data from the GSM
module in JSON format. While the Android application extracts the data from
the JSON messages received and displays them.
17) In 2019, D. V. Mahammad [24] designed an air monitoring system with an
ESP8266 Wi-Fi module and an Optical Dust Sensor as host controller and
sensor respectively. The cloud platform blink application is used as a platform
to control many IoT boards like Arduino. The dust density in the air can be
monitored via a smartphone at any time and from anywhere. The system was
successfully constructed and tested.
18) In 2019, P. Purwanto, S. Suryono, and S. Sunarno [25] designed an air
pollution monitoring system using WSN that can be accessed via web and
smartphone. The development of WSN systems consists of two steps, the first
step being assembling sensor nodes and hosting a web server. The next step
is to test and calibrate the system. The experiment results show that the system
is able to detect various air pollution, such as nitrogen oxides, sulfur dioxide,
carbon dioxide, and other parameters such as humidity, temperature, and wind
speed.
19) In 2019, T. H. Nasution, M. A. Muchtar, and A. Simon [26] designed an Air
Quality Monitoring System for an Internet of Things platform to display air
quality levels in a region. The system will be monitored with sensors to see
levels of PM, O3, SO2, and CO. Read sensor data via Arduino MCU. The
data sent to the ThingSpeak Cloud using the Wi-Fi module for accessing the
7
Chapter One Introduction
8
Chapter One Introduction
9
Chapter One Introduction
10
Chapter One Introduction
11
Chapter Two
[Theoretical Background]
Chapter Two Theoretical Background
Chapter Two
Theoretical Background
2.1 Introduction
This chapter presents in general terms the proposed system from a
theoretical background in the context of analyzing air pollutants, how to calculate
the air quality index, system architecture(s), sensors, IoT message format, IoT
messaging protocols, databases, and how to design and display sensors view on
a Google maps API.
12
Chapter Two Theoretical Background
Table 2.1. AQI Scale [31].
Health concern of
Meaning
AQI levels
Good
This level has no risk; this air quality level is perfect.
(0-50)
Moderate This level is acceptable; it may affect a small group of
(51-100) Unusually sensitive people to air pollutants.
Unhealthy for
The sensitive group of people may suffer negative
Sensitive Group
health effects. But people are not totally affected.
(101-150)
The population may begin suffering negative health
Unhealthy
effects; the sensitive groups of people may suffer more
(151-200)
serious health effects.
Very Unhealthy Health alert; the entire populationَ may suffer more
(201-300) serious health effects.
Hazardous Health warning of emergencies; the entire populationَis
(301-500) more likely to be affected.
13
Chapter Two Theoretical Background
To illustrate the cells of Table 2.2-B, the first cell information 0-54 (24hr)
represents the average concentration of Particulate Matter (PM10) measured over
24 hours period, which corresponds to the risk level (0-50) of the AQI.
The Air Quality Index (AQI) value is calculated based on Equation 2.1 [31].
𝐼𝐻𝑖𝑔ℎ −𝐼𝐿𝑜𝑤
𝐴𝑄𝐼 = (𝐷 − 𝐷𝐿𝑜𝑤 ) + 𝐼𝐿𝑜𝑤 (2.1)
𝐷𝐻𝑖𝑔ℎ −𝐷𝐿𝑜𝑤
Where:
ILow = index breakpoint corresponding to DLow,
IHigh = index breakpoint corresponding to DHigh,
D = pollutant concentration,
DLow = pollutant concentration breakpoint ≤ D,
DHigh = pollutant concentration breakpoint ≥ D
For example, suppose that a system recorded an average concentration of
1000 ppb for Nitrogen Dioxide (NO2) through one-hour sensor reading, the result
of AQI value can be calculated as follows [31]:
300 − 201
𝐴𝑄𝐼 = (1000 − 650) + 201
1249 − 650
= 258.85
This result value means that the air quality is in the "Very Unhealthy" level.
14
Chapter Two Theoretical Background
15
Chapter Two Theoretical Background
16
Chapter Two Theoretical Background
2) PM Sensor
SDS011 Module is used to detect particulate matter concentration in both
types (PM10 and PM2.5 range: 0.0-999.9 μg/m3). The working principle of this
module is based on the laser scattering that occurs when particles enter the
detection area using a built-in fan. The scattered light is converted into electrical
signals and then amplified and processed to get the diameters and number of
detected particles. This module can be easily connected via the UART
communication protocol [33]. Figures 2.3 shows the front and back view of the
SDS011 Module.
3) SO2 Sensor
2SH12 Module is used to detect the sulfur dioxide (SO2) gas concentration
range: 1 to 500 ppm [34]. Figure 2.4 shows the front view of the 2SH12 module.
17
Chapter Two Theoretical Background
4) O3 Sensor
MQ-131 Module is used to detect the ozone gas concentration range: 10 –
1000 ppm [35]. Figure 2.3 shows the front and back view of the MQ-131 Module.
18
Chapter Two Theoretical Background
The study, which was adopted by the World Health Organization (WHO),
showed that exposure to a dose between (50mSv-100mSv or higher) can cause
cancer in humans (mostly in children and adolescents than adults) and may cause
damage to fetal brain. Exposure to a dose of (1000mSv or higher) may weaken
humans tissue and body functions causing severe effects such as hair loss, skin
redness, and syndrome acute radiation and radiation burns [37].
Radiation dose in
Alerts/Warnings
mSv
19
Chapter Two Theoretical Background
20
Chapter Two Theoretical Background
Hardware Specifications:
Chipset: ESP32 240MHz single-/dual-core 32-bit Microprocessor.
FLASH Memory: PSRAM 8MB /QSPI flash 4MB.
SRAM: 520 KB.
On-board clock: 40MHz crystal oscillator.
Modular interface: LED PWM, TV PWM, UAR, SPI, SDIO, I2C, I2S,
IRGPIO, capacitor touch sensor, DACLNA pre-amplifier, ADC.
SIM card: Supports Nano SIM card.
Wi-Fi Specification:
Frequency range: 2.4GHz~2.5GHz.
Communication distance: 300m.
Protocol: 802.11 b/g/n -- speed up to150Mbps.
Bluetooth Specification:
Protocol: Bluetooth BLE standard and v4.2BR/EDR.
Radio frequency: -97dBm sensitivity NZIF receiver Class-3, Class-2 &
Class-1 emitter AFH.
21
Chapter Two Theoretical Background
Software Specification:
Wi-Fi Mode: Station/ SoftAP+Station/SoftAP/P2P
Security mechanism: WPA2-Enterprise/WPA/WPS/WPA2.
Networking protocol: TCP/UDP/MQTT/HTTP/FTP, IPv4/IPv6, SSL.
OS: Free RTOS.
22
Chapter Two Theoretical Background
23
Chapter Two Theoretical Background
Noting that the system air pollution data is considered non-confidential
information (it is publicly posted online).
Therefore, one of the following discovered messaging protocols of lower
overhead and bandwidth will be chosen in managing communications of the
proposed system.
24
Chapter Two Theoretical Background
25
Chapter Two Theoretical Background
26
Chapter Two Theoretical Background
request/response model for exchanging messages. CoAP uses of GET, PUT,
POST, and DELETE methods similarly to HTTP. CoAP model employs the two
layers (request/response layer and message layer) as shown in Figure 2.10 [47].
27
Chapter Two Theoretical Background
b) Unreliable message transport: In the event that it does not require reliability
for a particular message it can be sent as a Non-confirmable Message (NON).
It is not acknowledged, but still has a message ID to detect duplicates, Figure
2.12 represents this process. When the recipient cannot process a Non-
confirmable message, it may reply with an RST message [47].
Figure 2.13. The failure and successful response results of GET method [47].
b) Separate response: If the server is unable to immediately respond to a request
transmitted in a CON message, it responds with a blank ACK message so that
28
Chapter Two Theoretical Background
the client stops resending the request. If the response is ready, the server sends
it in a new CON message (that should be acknowledged by the client). This
process is called a "separate response", as shown in Figure 2.14 [47].
29
Chapter Two Theoretical Background
30
Chapter Two Theoretical Background
CoAP vs MQTT
2.8 Databases
Databases represent the data-stores in the proposed system and are the most
expensive part in any backend system thus a major effort will be devoted towards
optimizing the database operations starting with the main challenge of using the
relational or non-relational approach. Then to decide among the many available
industry implementations like MySQL and the like.
31
Chapter Two Theoretical Background
such as INSERT, DELETE, UPDATE, or other activities on the database.
Figure 2.18 shows an example illustrating SQL Statements [49].
32
Chapter Two Theoretical Background
33
Chapter Two Theoretical Background
34
Chapter Two Theoretical Background
35
Chapter Two Theoretical Background
36
Chapter Two Theoretical Background
37
Chapter Three
[Proposed System]
Chapter Three Proposed System
Chapter Three
Proposed System
3.1 Introduction
In this chapter, the proposed system design has been presented
which consists of sensor distribution, sensing unit design, cloud computing
backend architecture, messages design, web application design, and deployment
recommendations.
38
Chapter Three Proposed System
Hospitals (where there are patients who are undergoing surgery or have
chronic diseases, also some hospitals may use some radioactive materials
in some types of treatments, and this also need to be monitored to be aware
of any radiation leakage cases).
The cost of installing and maintaining the sensors towers and their wireless
connections.
The cost of network devices and equipment (including routers, switches,
wires, and other connectivity supplies).
The cost of hardware and security software, which protect the network
from hacking and viruses, as it is a large network that requires a data center.
The cost of network labor for connecting, monitoring and managing, as
well as the required software for that.
The cost of network power supply with their spare devices such as;
generators, UPS to keep sensors running continually.
Figure 3.1. Shows the proposed pictorial map along with the system and
its sensor distribution.
39
Chapter Three Proposed System
40
Chapter Three Proposed System
The flowchart shown in Figure 3.2 illustrates the working steps of the
proposed sensing module software (for more detail about system messaging
design, see Section 3.3.3), while Figure 3.3 presents the component diagram of
the proposed sensing unit.
41
Chapter Three Proposed System
Figure 3.2. The Proposed Flowchart of The Sensing Module Software Design.
42
Chapter Three Proposed System
43
Chapter Three Proposed System
44
Chapter Three Proposed System
(1) Initially, the locations of the sensors (city, district, longitude and latitude)
must be entered in order to enable the system to display them on the Google Map.
(2) The CoAP server receives sensor readings in the form of JSON messages from
all sites every 7.5 minutes and every hour.
45
Chapter Three Proposed System
(4),(5) The CoAP server instantly transfers each received JSON message to
Mongo database server using a specific script.
(6),(7) The web server prepares a JSON message hourly using the latest saved
data in the MySQL and Mongo databases to be ready to display all sensor
locations, pollutant concentrations, and AQIs at the request of the website visitor.
(8),(9) Finally, the website visitor is able to view the sites and data of all the
sensors on Google Map at any desired time.
3.3.3 Messages Format Design
The system messages are split into two JSON message formats that clients
(Wi-Fi/GPRS Modules) use to carry sensors data to the CoAP server which in
turn transfer these messages to the Mongo database server using a specific script,
the purpose of this partitioning is to give the system database the advantage of
horizontal sharding technique, which adds horizontal scalability and optimizes
the overall performance of system queries, the following shows more details
about these messages:
3.3.3.1 Type-1 Message Format
This type of message is sent every 7.5 minutes (8 messages per hour)
to the system and is approximately the size of 52 bytes, this size varies with the
number of digits of the sensing values or the number of pollutants carried by the
message as needed, this message format carries the sensing unit ID as well as the
concentration of pollutants (Sulfur Dioxide (SO2), Nitrogen Dioxide (NO2), and
ionizing radiation (RD)). The purpose of retransmitting this message in shorter
intervals than the Type 2 message was to allow for the most serious pollutant
concentration to be sent as quickly as possible to the system, as well as to take
advantage of the close timestamp in order to keep the sensors checked.
An example of what this message might look like is, {"ID":597,"NO2":
5.85493,"SO2":112.45158,"RD":2.0588}.
46
Chapter Three Proposed System
3.3.3.2 Type-2 Message Format
This type of message is sent every 1 hour to the system and is
approximately the size of 61 bytes, this size varies with the number of digits of
the sensing values or the number of pollutants carried by the message as needed,
this message format carries the sensing unit ID as well as the concentration of
pollutants (Carbon Monoxide (CO), Ground-Level Ozone (O3), Particulate
Matter (PM2.5µg), and Particulate Matter (PM10µg)).
An example of what this message might look like is, {"ID":106,"PM10":
620.8764,"PM2":749.8257,"CO":4.21,"O3":8.45}.
3.3.4 Web Application Design
To ensure the achievement of comprehensive access coverage to the
system application and all visitors and users of the World Wide Web for cities in
Iraq, the proposed system has been implemented to achieve this requirement.
47
Chapter Three Proposed System
48
Chapter Three Proposed System
49
Chapter Three Proposed System
50
Chapter Three Proposed System
3) Department Management [Add/Delete/Modify/Visibility]. It includes three
sub-webpages responsible for adding, modifying, and displaying all the
information required for managing system departments that used to
distribute the management responsibilities of each sensor site to the
system users according to the sensor location, as shown in Figure 3.10 and
Figure 3.11.
51
Chapter Three Proposed System
4) Sensors Monitoring Map. In this sub-webpage, the Google Maps API has
been used to display the average concentration of all pollutants and air
quality indexes for all sites and showing their risks to human health, it has
a similar design to the Citizen Service Webpage, that is shown in detail later.
5) Notifications Bar Management [Add/Delete/Modify/Activate]. It includes
three sub-webpages responsible for adding, modifying, and displaying all
the information required for managing system notifications such as
(notification text, posting date, publisher user, publisher department, and
activation status), as shown in Figure 3.12 and Figure 3.13.
52
Chapter Three Proposed System
53
Chapter Three Proposed System
54
Chapter Three Proposed System
55
Chapter Three Proposed System
7) Latitude and Longitude Finder. It has a sub-webpage used as a tool to
facilitate obtaining the latitude and longitude of any location on the Google
Map in order to determine the placement of the required new site, as shown
in Figure 3.16.
56
Chapter Three Proposed System
supervisors can obtain the sensors inspection report at any time by running
the proposed algorithm script.
Check the timestamp of the last received data for each site which
leads us to use the (Sdata7.5min collection) of Mongo database
because its data contains the closest period of received data (it Receives
data every 7.5 minutes from the sensors), if the timestamp does not
exist in the collection, that indicates the sensors' Wi-Fi device is
(OFF/Deactivated) or there may be a problem in the Internet network.
If the timestamp is present, it allows finding the difference between the
timestamp and the time of the current date if the result value is greater
than 10 minutes. This indicates that the sensors' Wi-Fi device is
(OFF/Deactivated) or there may be a problem in the Internet network
and if the result is less than or equal to 10 minutes that means that the
Wi-Fi is active and it is possible to switch to the next stage of checking.
The next checking stage takes place on each sensor of each site this
stage is done by checking the received value of each sensor from
(Sdata7.5min and Sdata1hour collection) if existed and is numeric, go
to the final checking, if the reading value of the sensor within the range
of the sensor's datasheet that indicates the sensor is active and has no
problem, otherwise there is a problem in this sensor and it may need to
be replaced.
The last stage displays the results of the inspection algorithm as a
readable report in the form of a webpage familiar to system
administrators and supervisors as needed, as shown in Figure 3.18.
57
Chapter Three Proposed System
58
Chapter Three Proposed System
59
Chapter Three Proposed System
3.3.4.2 Supervisors Control Panel Webpage
The webpage layout is shown in Figure 3.19. It provides some system
Administrator Dashboard Webpage features with permission restricted to the
logged-in supervisor's area sensors, as shown below:
Notifications Bar Management [Add/Delete/Modify].
Data Search Engine.
Latitude and Longitude Finder.
Sensors Inspection. Here the supervisors use the same algorithm proposed for
the administrator control panel to verify that the system sensors are working
properly.
Sensors Management [Add/Delete/Modify].
60
Chapter Three Proposed System
61
Chapter Three Proposed System
62
Chapter Three Proposed System
63
Chapter Four
[Results & Discussion]
Chapter Four Results and Discussion
Chapter Four
Results and Discussion
4.1 Introduction
In this chapter, the obtained practical results of the tested techniques
(system messages, messaging protocols, and system databases) have been
presented, in order to clarify the efficiency of back-end system technologies that
have been selected based on the best results.
64
Chapter Four Results and Discussion
65
Chapter Four Results and Discussion
For this reason, this study takes care to choose the most appropriate
database for storing the system messages, by testing the system main scripts
with three main categories of open source databases that support JSON message
format (MySQL RDBMS, Cassandra NoSQL Column DB, and Mongo NoSQL
Document DB), as shown in Table 4.1. Note: All the tested databases were
indexed equally and loaded with one-year estimated data for fairness during
the comparison.
Table 4.1. Databases Performance Comparison.
(MySQL) (Cassandra) (MongoDB)
Script Description
Execution Time Execution time Execution time
Insert It is responsible for importing type-1 JSON 4.266 sec 1.924 sec 0.946 sec
type-1 message format which sends every 7.5
message minutes from all sensing units to the system
database.
This script has been tested to archive 1000
messages (1000 sites), each message
consists of reading data of three pollutants.
Use JSON insert query to save this kind
of messages plus timestamp for each
message received.
Insert It is responsible for importing type-2 JSON 4.437 sec 2.269 sec 0.979 sec
type-2 message format which sends every 1 hour
message from all sensing units to the system
database.
This script has been tested to archive 1000
messages (1000 sites), each message
consists of reading data of four pollutants.
Use JSON insert query to save this kind
of messages plus timestamp for each
message received.
66
Chapter Four Results and Discussion
Hourly It is responsible for carrying out the 1.525 sec 1.430 sec 0.886 sec
Auto following actions every hour:
Running Calculating the average concentration
and AQI values for all pollutants for all
sensor sites from which the data was
recently received (stored in the database).
Archiving the calculated result in the
database server to be ready for bringing them
in case of need.
Organizing and archiving the result values as
JSON format to provide a fast display for the
latest received sensors’ information on
Google Map.
This script has been tested for 18 sites (each
site consists of 7 sensors) with one-year of
estimated data.
Use select query to fetch and extract a
number of the last keys' values of the two
received JSON messages from all sites.
Use insert query to archive AQI and Avg.
of pollutants concentrations for all sites.
Sensors In this script, the system checks the working 280.22 sec 0.659 sec 0.303 sec
inspection of all transmitter units (Wi-Fi/GPRS
Module) based on the timestamp of the
latest received data, as well as verifying the
truth of the data received from all sensors,
and preparing a visual report for the system
administrators/supervisors when needed.
This script has been tested for 19 sites with
one-year of estimated data).
Use select query to fetch and extract the
last keys' values of the two received JSON
messages from all sites.
67
Chapter Four Results and Discussion
Chart It is responsible for displaying the AQI 6.544 sec 23.216 sec 2.811 sec
values for any sensor for last month's
reading. This chart is available online and
allows all people to view it.
Use count query to count AQI column/key
that includes 487787 values for a single
site.
Use select query to fetch the last 720
values of AQI column/key using the count
result as an offset.
Search This script is available only to the system 4.943 sec 14.623sec 1.353 sec
administrators/supervisors to give all
information available about any sensor for
any chosen period.
This script has been tested to fetch 26288
docs/rows (Each doc/row contains all
pollutant concentrations and AQI for one
site).
Use select query to fetch multiple-
column/key values, some of the selected
columns/keys restricted by a range of
values.
What was observed from the execution of the six main scripts shown above
of the proposed system, especially after testing the system with more than one
database, as shown in Table 4.1, that there is a significant impact of some queries
used in reading and writing data through which it was found that MongoDB
database preferred to the work, for the following reasons:
Scripts 1, 2: These scripts show that MongoDB has better performance for
importing JSON messages into the system database because MongoDB
does not need to split the received messages into structured separate storage
68
Chapter Four Results and Discussion
units like tables and columns, it drops the message as a single piece due to
its native JSON data store.
Scripts 3, 4: The select queries used in these scripts are very complex due
to their duties related to searching inside JSON messages which have
variable formats from site to site as needed, so these types of queries
require certain features to fetch the last stored messages that carry a
specific sensor ID and pollutant key which means that every query needs
(searching inside all stored messages to obtain values of the required keys,
and sorting all documents in descending order to get the last messages for
the specified keys, in addition to that these sorted messages need to be
limited to a number of messages). These queries got the best results with
MongoDB as shown in Table 4.1 because MongoDB works with simpler
data structures that make data retrieval tend to be faster in it especially for
large volumes of unstructured data such as JSON messages that the system
handles.
Scripts 5: This script requires two queries one of which is to count all
archived AQI values of a specific sensor ID that are stored in the collection
or table depending on the database used, then use the count result in another
query as an offset to fetch the last 720 documents or rows to be displayed
on a chart. MongoDB gave a faster execution time to show this chart as
shown in Table 4.1 because MongoDB has a simple document-oriented
data structure that helps to do the duty of this operation in a very high-
speed manner.
Script 6: This script relies on a flexible select query to fetch a set of
unorganized values as needed for multiple keys or columns (including
timestamps, averages of pollutants, and AQIs), and this query has been
greatly affected by the database indexing, so the tested databases have been
indexed fairly before testing them. As can be seen from Table 4.1,
69
Chapter Four Results and Discussion
MongoDB achieved a great result in performing this process compared to
other databases due to its flexibility and ease of navigation between the
multiple indexed objects in the same document, which showed better
results than moving between multiple indexed columns bound by a set of
values that required more complex tasks.
70
Chapter Four Results and Discussion
71
Chapter Five
[Conclusions & Future Work]
Chapter Five Conclusions and Future Work
Chapter Five
Conclusions and Future Work
5.1 Conclusions
In this thesis, a guide is provided for selecting the most suitable
technologies that can be used to design and implement nation-wide integrated
system that meets the requirements of real-time environmental pollution
monitoring as a wide-scale community service. The following techniques have
been adopted to build this system due to the best cost and practical results
observed from testing and re-architecting the main system aspects:
The system web application is to be built with standard web-technology
instead of using custom proprietary applications to save on the system costs
by using (web-sockets, HTML5, HTTP-servers, MySQL Database, and
Mongo Database).
The JSON message format is to be used to exchange the data between the
sensors and the system web application, as well as displaying the results
on the Google map. It has been chosen due to its ease of reading, parsing,
and generation compared to other data-interchange formats.
The CoAP messaging protocol has been chosen for the target system due
to its minimum overhead and bandwidth required for message exchanged
in comparison to the MQTT protocol. Thus, using a CoAP server instead
of an MQTT server (industry norm) reduced the download bandwidth by a
factor of 76% and the upload bandwidth by a factor of 84% when receiving
and sending system messages. It should be emphasized that a difference of
1KB is not of a big importance on the sensor side, but for the target scale,
the aggregation is the one that makes the difference. That 1KB/s quickly
escalates to 1GB/s with 1,000,000 reads and write operations. A finding
72
Chapter Five Conclusions and Future Work
73
Chapter Five Conclusions and Future Work
74
References
References
References
[1] M. T. Chaichan, H. A. Kazem, and T. A. Abed, “Traffic and outdoor air
pollution levels near highways in Baghdad, Iraq”, Environment, Development
and Sustainability, 20(2), 589-603, 2018.
[2] S. H. Shehabalden, and N. M. Azeez, “Air quality index over Basra province,
south of Iraq”, International Journal of Technical Research and Applications,
2017.
[3] D. Khoshnevisan, et al., “Environmental pollution in the common borders
between Iran and Iraq and the international governing documents”, EurAsian
Journal of BioSciences, 13(1), 541-548, 2019.
[4] N. A. Al-Ansari, S. Knutsson, and R. Pusch, “Environmental Implications of
Depleted Uranium in IRAQ and Principles of Isolating It,” Waste
Management, 367-376, 2014.
[5] S. A. Menkhi, F. H. Shanoon, and B. A. Almayahi, “Radiation pollution and
cancer risks in Sulaimaniyah and Ninawa Cities, Iraq”, Annual Research &
Review in Biology, 1-9, 2017.
[6] I. T. Al-Alawy, and O. A. Mzher, “Radiological characterization of the irt-
5000 (14-Tammuz) research nuclear reactor at Al-Tuwaitha nuclear center in
Iraq”, Environmental Earth Sciences, 1-9, 2019.
[7] F. H. Shanoon, et al., “Spatial and Temporal Variability of Environmental
Radioactivity in Basra and Baghdad Cities, Iraq”, Annual Research & Review
in Biology, 1-9, 2017.
[8] S. A. Mishra, D. S. Tijare, and G. M. Asutkar, "Design of energy aware air
pollution monitoring system using WSN", International Journal of Advances
in Engineering & Technology, 1(2),107, 2011.
[9] Y. J. Jung, et al., "Design of sensor data processing steps in an air pollution
monitoring system", Sensors, 11(12), 11235-11250, 2011.
75
References
[10] J. Ikram, et al., "View: implementing low cost air quality monitoring solution
for urban areas", Environmental Systems Research, 1(1), 1-8, 2012.
[11] D. Yaswanth, and S. Umar, "A Study on Pollution Monitoring system in
Wireless Sensor Networks", International Journal of Science, Engineering
and Computer Technology, 3(9), 324, 2013.
[12] A. R. Kasar, D. S. Khemnar, and N. P. Tembhurnikar, "WSN based air
pollution monitoring system", International Journal of Science and
Engineering Applications, 2(4), 55-59, 2013.
[13] G. Swagarya, S. Kaijage, and R. S. Sinde, "Air pollution monitoring system
based on wireless networks simulation", Innovative Systems Design and
Engineering, 5(8), 1727-2222, 2014.
[14] V. K. Ustad, A. S. Mali, and S. S. Kibile, "Zigbee based wireless air
pollution monitoring system using low cost and energy efficient
sensors", International Journal of Engineering Trends and Technology, 10(9),
456-460, 2014.
[15] F. Ye, X. Liu, and Y. Liu, "Design and Implementation of Real-Time
Forecasting System of Urban Air Quality Based on Observation Sites and
Thiessen Polygon", 2nd International Conference on Sensors, Instrument
and Information Technology, China, 2015.
[16] N. Kaur, et al. "Air quality monitoring system based on Arduino
microcontroller", International Journal of Innovative Research in Science,
Engineering and Technology, 5(6), 9635-9646, 2016.
[17] K. Zheng, et al., "Design and implementation of LPWA-based air quality
monitoring system", IEEE Access, 4, 3238-3245, 2016.
[18] Y. Chen, J. Li, and C. Qi, "Design and implementation air quality monitoring
robot", IOP Conference Series: Earth and Environmental Science, China,
Vol. 52, No. 1, p. 012089, 2017.
76
References
77
References
[27] R. Bhambare, and S. Khairnar, "IOT BASED NOISE AND AIR QUALITY
MONITORING SYSTEM", International Research Journal of Engineering
and Technology (IRJET), 2020.
[28] P. Shinde, et al., "Android based Air Pollution Monitoring System", Mukt
Shabd Journal, 9(VI), 2020.
[29] Y. U. Tong, et al., "Design of air quality monitoring system based on light
scattering sensor", IOP Conference Series: Earth and Environmental
Science, China, Vol. 647, No. 1, p. 012196, 2021.
[30] A. Singh, H. Joshi, A. Srivastava, R. Kumar, and N. Hasteer, “An Analysis
of Polluted Air Consumption and Hazards on Human Health: A Study
Towards System Design”, 10th International Conference on Cloud
Computing, Data Science & Engineering (Confluence), India, pp. 532-539,
2020.
[31] D. A. Vallero, “Air pollution calculations: Quantifying pollutant formation,
transport, transformation, fate and risks”, Elsevier, 2019.
[32] SGX., “CO, NO2, NH3 Gas Sensor Datasheet”, [online] Available at:
<https://datasheetspdf.com/pdf/1350171/SGX/MiCS-6814/1> [Accessed 15
March 2021].
[33] ETC., “Particulate Matter (PM10, PM2.5) Sensor Datasheet”, [online]
Available at: <https://datasheetspdf.com/pdf/1226510/ETC/SDS011/1>
[Accessed 15 March 2021].
[34] Hanwei Electronics, “SO2 Gas Sensor Datasheet”, [online] Available at:
<https://datasheetspdf.com/pdf/904646/HANWEIELECTRONICS/MQ-
136/1> [Accessed 15 March 2021].
[35] ETC., “Ozone Gas Sensor Datasheet”, [online] Available at:
<https://datasheetspdf.com/pdf/770517/ETC/MQ-131/1> [Accessed 15
March 2021].
78
References
79
References
80
Appendix
Appendix
Appendix
List of Papers:
1) Taha E. Al-jarakh, Osama A. Hussein, Alaa K. Al-azzawi, and Mahmood F.
Mosleh, “Design and implementation of IoT based environment pollution
monitoring system: A case study of Iraq,” IOP Conference Series: Materials
Science and Engineering, Iraq, 2020. (Indexed by: Scopus).
81
Appendix
82
الخالصة
مؤخرا وجود تلوث واسع النطاق في مدن العراق ،حيث يعاني العديد
ً أكدت األبحاث المنشورة
من سكان هذه المدن من إصابات مرتبطة بشكل مباشر بملوثات بيئية خطيرة ،مصاحبا ً ذلك عدم وجود
أنظمة مراقبة للكشف عن ملوثات الهواء ،على سبيل المثال :الجسيمات المادية ،غاز ثنائي أوكسيد
الكبريت ،غاز االوزون ،غاز أحادي أوكسيد الكاربون ،غاز ثنائي أوكسيد النيتروجين ،باالضافة الى
التلوث االشعاعي ،هذا يتطلب استخدام حلول تطبيقية منظمة للحد من تأثير هذه الملوثات.
ركزت األطروحة بعمق على الدراسات والبحوث التي قدمت العديد من االبتكارات والحلول
التصميمة المتعلقة بأنظمة مراقبة تلوث الهواء ذات العرض الفوري للبيانات تطلعا ً للحصول على تصميم
نظام متكامل ومناسب وصالح للخدمة من حيث تغطية جميع ملوثات الهواء لعموم سكان العراق.
نظرا ً للنقص الواضح الحاصل في التصميم المعماري الخلفي لهذا النوع من االنظمة ،
تم التوصل إلى أن هناك حاجة إلى نمط تصميم متكامل ومثالي مدعوم بأنسب التقنيات ذات األقل استهالكا ً
لموارد الحوسبة ،وهذا يمثل المساهمة الرئيسية لهذه األطروحة التي تم التركيز عليها.
في الناحية العملية ،يستقبل النظام المقترح قراءات عقد االستشعار عبر شبكة االنترنت بشكل
دوري ليقوم بدوره بتحليلها وجمعها بشكل منظم وخزنها في قاعدة بيانات خاصة .من ناحية أخرى ،
يعرض النظام نتائج البيانات التي تم تحليلها (مستويات التلوث في المدن) بشكل مباشر للسكان خالل تطبيق
ويب خاص ،مؤكدا ً على معدالت التلوث المرتفعة وضرورة إيجاد الحلول المناسبة لها.
نظرا لسهولة قراءتها وتحليلها وتوليدها
تم استخدام صيغة الرسائل JSONفي هذه األطروحة ً
جنبًا إلى جنب مع بروتوكول التراسل CoAPذو االقل حمل وحزمة اتصال مقارنةً ببروتوكول
الـ MQTTلتبادل البيانات بين العقد الموزعة (وحدات )T-Call ESP32وتطبيق الويب الخاص بالنظام
وكذلك لتنظيم وعرض محتوى مواقع التلوث على خرائط .Google
باإلضافة إلى ذلك ،يتم استخدام MongoDBكقاعدة بيانات لتخزين بيانات النظام ذات االعداد
نظرا لكفاءتها في إدارة المستندات الخاصة بصيغة الرسائل JSON
الكبيرة الواردة من عقد االستشعار ً
بأقل وقت لتنفيذ االستعالم مقارنةً بقواعد البيانات MySQLو ،Cassandraبينما تم أستخدم قاعدة بيانات
MySQLللتخزين وإدارة بيانات النظام العالئقية المتمثلة بمعلومات (المشرفين ،مواقع االستشعار ،
ضا واض ًحا
نظرا لكفاءتها في إدارة مثل هذه البيانات .تظهر النتائج أن هناك انخفا ً
األقسام ،االشعارات) ً
في وقت تنفيذ االستعالم عن البيانات وعرض حزمة االنترنت المستهلكة ،وبالتالي زيادة ملحوظة في كفاءة
أداء النظام بشكل عام.
جمهوريةَالعراق َ
وزارة التعليم العالي والبحث العلمي
الجامعة التقنية الوسطى
الكلية التقنية الهندسية الكهربائية
تصـمـيـمَوتنـفـيـذَنظـامَ(إنتـرنتَاالشــيـاء)َقـابــلَللـتــوسعـــةَ
لرصـدَالـتلـوثَالـبيئيَالخـاصَبدراسـةَحـالـةَالـعراق
رســالــةَ
مقدمـةَالىَمجـلسَالـكليةَالـتقنيةَالهندسيـةَالكهربائيـةَكجـزءَمنَمتطلبـاتَ
الحـصولَعلىَشهـادةَالمـاجستيرَفيَهندسـةَتقـنياتَالـحاسوب
مقدمـةَمنَالطـالبَ
طـه عصـام محـمود نـجم
بأشــراف
الـدكـتـور أســامـة عــبـاس حــسـيـن
األستاذ المساعد الدكتور عـالء خميس خضير