Design and Implementation of Air Pollution Monitoring System in Mosul City

ABSTRACT


INTRODUCTION
The air quality is influenced by increased emissions from vehicles in Mosul city, Iraq, which is considered a significant environmental threat [1].One of the most significant challenges facing the modern environment is the issue of air pollution and maintaining air quality [2].In recent times, studies from the USA and Europe have focused on airborne toxins such as nitrogen dioxide (NO2), ozone (O3), carbon monoxide (CO), and particulate matter (PM), which are considered real health threats.Data on air quality is expressed in parts per million (ppm) and displayed on LCD screens online, making it easy to monitor its effects on health, where new electronic devices could be used for this purpose [3,4].The data has been analyzed and collected from sensor nodes as temperature, and IoT assist in transferring the values to the cloud [5].Real-time air quality surveillance systems have been developed, relying on wireless communication technology [6,7].A pollution sensor has been used to monitor and detect air quality on mobile wireless devices [8].Machine learning with IoT has been implemented to monitor and reduce vehicle emissions of air pollution [9].Appropriate procedures are taken to understand if the pollutant persists [10].

LITERATURE REVIEWER
In the study conducted by Zhao et al. [11], an air quality meter was developed by deploying sensor nodes attached to Unmanned Aircraft vehicles using LoRa technology.They successfully collected information from sensor devices using UAVs that traveled a total distance of about 200 m during 118 seconds.Air quality monitoring system was introduced using unmanned aerial vehicle (UAV) which achieved two goals [12].It could perform in real time scheme, in addition to, it could perform sensing tasks.The researchers try to deploy new techniques for sensor nodes that are able to measure parameters and then send information to the cloud via LoRa-WAN technology [13].The CO2 and PM2.5 levels were successfully monitored for air quality in the kitchen of the cafeteria and the laboratory of the University of Rwanda.According to most research, PM2.5 at or below 12 μg/m 3 is considered safe.The data was analyzed over the course of eleven months.The results revealed elevated CO2 levels of more than 800 ppm and PM2.5 levels of more than 100 μg/m 3 in the kitchen environment, while there was a concentration of 500 ppm of CO2 and 0 μg/m 3 of PM2.5 inside the laboratory [14].A smart, scalable method for monitoring air quality in Myanmar was proposed using low-cost sensor nodes and the LoRa-WAN protocol for long-range communication [15].The sensor nodes collect data on parameters: such as dust, humidity, temperature, and carbon dioxide from the air, and then send it online in real-time using LoRa technology for monitoring and predicting air pollution effects in the Yangon region.Users can examine the gathered data on the Grafana dashboard, by using their Google login credentials to access the Grafana server.The results show a temperature range of 26-32℃, humidity range of 79-100% H, dust range of 1-70, and carbon dioxide range of 406-529 ppm.The air pollution due to the use of pesticides, fertilizers, and industrialization in India was introduced [16].They designed a system that contains integrated sensor nodes with microcontrollers and sends sensor data wirelessly using LoRa technology, then displays air quality data online on the IoT platform ThingSpeak.Portable devices can be used in different fields to send and receive data.They sent this data to the cloud ThingSpeak using wireless LoRa models to enable users to read the data online [17].The results showed elevated levels of PM2.5 pollution ranging from 300 to 1,000 μg/m 3 , and elevated levels of PM10 pollution ranging from 305 to 1,013 μg/m 3 .The air quality within building ducting systems was done by integrating microcontrollers and smart sensor nodes with mobile robots using wireless LoRa technology and the instrument of DAQM to solve non-line-of-sight transmission problems.The sensor nodes measured carbon dioxide, carbon monoxide, PM2.5, and smoke levels in a multiple-story building.The findings presented an improvement in the area of coverage due to enhancements in the Packet Delivery Ratio (PDR) and RSSI (received signal strength indicator).Different distances within the campus were covered to analyze the performance of the data transmission.They noted that data packet transmission failure and network disturbance were caused by a low RSSI value.The results indicated that the PDR and RSSI were the lowest at 59.42% and −108 dBm, and the highest values recorded for PDR and RSSI were 100% and −91 dBm, respectively.An air quality monitoring system (AQMS) was developed using LoRa technology-based IoT with Arduino via the TTN platform.This system is powered by recharging batteries with sustainable solar photovoltaic panels.The sensor nodes collect data from the air, such as SO2, CO, NO2, CO2, PM2.5, humidity, and temperature, and send updates to the cloud.The data updates are displayed via a dashboard on the web and a graphical interface using the Virtuino mobile application.The system successfully recorded temperature at 31℃, humidity at 74%, CO2 at 220 ppm, CO at 0.19 ppm, NO2 at 0.17 ppm, SO2 at 0.12 ppm, and PM2.5 at 120 μg/m 3 , and transmitted them from the LoRaWAN network to the IoT server [18,19].The optimization of the system parameters was achieved which influences the performance of a LoRa system and this could transform agriculture field into a new perspective of smart cultivation [20].OMNeT++ is a modular, extendable, and component-based C++ simulation toolkit and framework used for creating network simulators for wired and wireless communication.It supports sensor networks and provides a powerful GUI for simulating network protocols like LoRaWAN.OMNET++ also creates a trace file that includes all relevant information about the scenario.

METHODOLOGY AND SCHEMES OF SIMULATE LORA TECHNOLOGY
FLoRa (Framework for LoRa) is a framework that enables network simulation and end-to-end simulation of LoRa networks.It relies on the OMNeT++ network simulator and the INET framework.FLoRa allows the construction of LoRa networks using modules for LoRa nodes, gateways, and network servers.Application logic can be installed as standalone modules connected to the network server.The network server and nodes enable dynamic management of configuration parameters, including Adaptive Data Rate (ADR).Additionally, each node gathers statistics on energy consumption.
The framework includes both the physical layer and the MAC layer and is freely available as open-source software.The network infrastructure consists of sensor devices, gateways, and servers.In this study, the regional characteristics for the physical layer of LoRa in Europe were used, as shown in Table 1.The simulation time was set to one day to demonstrate the concept of daily air quality monitoring within the University of Mosul. Figure 1 shows a screenshot of the LoRa window, which displays eight sensor nodes, deployed with the central gateway in the deployment region.This paper focuses on the impact of different parameter settings on RSSI, and the total number of received packets at the network server.The parameters of the sensor nodes were measured at eight sites within Mosul University, as depicted in Figure 2.

HARDWARE PART
The fundamental approach of this study is to measure air quality parameters using sensors and transfer the data wirelessly using Lora technology.
The transmitter consists of a serial port RS485 to LoRa converter (type ZLAN9700) and sensors that collect air quality data.The RS485-LoRa converter was used to address the issue of installing RS485 cables for monitoring various sensor nodes with RS485 interfaces.The LoRa-RS485 converter provides flexibility in wireless applications and can easily connect to any sensor, with RS485 interfaces.The RS485-LoRa (type ZLAN9700) allows users to monitor and control RS485 devices at long ranges (2-8km).RS485 is a serial communication protocol that uses differential signal transmission.This approach improves RS485's resistance to interference, making it suitable for noisy industrial environments where noise can affect both wires simultaneously.However, RS485 can still accurately interpret the data.
The receiving device collects data using the LoRa communication (type ZLAN 9743) of the gateway.The LoRa -RS485 converter in the gateway takes in the data and sends it to a USB adapter via an RS485-USB converter.The data is then processed by the air quality program on the laptop.Setting up the LoRa-RS485 converter is easy with its utility software, and it provides end-to-end encryption.To configure the RS485-LN, you need to send commands from your PC using a USB-RS485 converter.
The diagram of air quality monitoring is shown in Figure 3.

Figure 3. Diagram of air quality monitoring system
The system comprises the following sensors: (1) Industrial Carbon Dioxide Sensor (CO2, humidity, and temperature to RS485 Transmitter).The purpose of this sensor device is to detect high-sensitivity gas with a stable signal and excellent precision.One of its features is a broad measurement range and a communication interface with good linearity: RS485 communication) protocol.The IPV65 shell is fully watertight and suitable for usage in severe environments.An analog CO2 Gas Sensor (MG-811 Sensor) is used in this system.The image of this sensor could be seen in Figure 4. (2) PM2.5 PM10 sensor PM1.0 pollution particles TSP dust detector.This device, utilizes a magnetic proximity sensor.Parameters can be configured using the included configuration software through the 485 interface.Resolution is 1 μg/m 3 .The image of this sensor could be seen in Figure 5.The accuracy of the sensor is shown in Table 2.The majority of Internet of Things (IoT) sensor nodes are built with battery lifespans of at least 1-3 The lifetime of battery utilization depends on battery type, distance between sensor node and gateway, frequency of data transmission, and usage of sensor nodes.
Specifically, the temperature sensor has a resolution of 0.01℃ and an accuracy of ±0.5℃, operating in the range of −40℃ to ±85℃, while the humidity sensor has a range of 0% RH to 100% RH, with an accuracy of ±3% RH and a resolution of 0.008% RH.
Figure 6 shows the parameters of the air quality displayed on the dashboard.

DISCUSSION RESULTS AND SIMULATION SCENARIOS
Sensor nodes have been deployed in optimal locations to achieve the best coverage in the area.Many factors have been considered that influence the efficiency of sensor nodes, such as the type of sensor node, climate, topography, vegetation, number of nodes available, and communication potential.
RSSI (Received Signal Strength Indicator) is a relative measurement that helps determine the sufficient strength of the received signal in a LoRa gateway to establish an acceptable wireless connection from the transmitter device.Since LoRaWAN supports two-way communication, RSSI is an essential measurement for both sensor nodes and gateways.RSSI has a negative value and is expressed in dBm.The strength of the received signal increases as the RSSI number approaches zero.RSSI is higher for shorter distances between the sensor node and the gateway.
This study offers two scenarios to evaluate the performance of LoRa networks.The LoRa network utilizes multiple sites within the University of Mosul.
The network consists of eight sensor devices placed in the simulation network and one gateway placed at the end of the network.The simulation ran for a full day.1) In the first scenario, multiple sensor nodes were installed inside Mosul University to measure air quality.The eight sensor nodes were installed in eight sites inside Mosul University to measure temperature, CO2, PM1.0, PM2.5, PM10, humidity, and Air Quality Index (AQI) in the morning and afternoon.The results of the parameter values are shown in Table 3 below.The levels of air pollution are not always the same; they can change depending on weather conditions, different times of the day, and the season.To gain a deeper understanding of these trends and patterns in pollution, different locations and times have been selected inside the university.
2) In the second scenario, the LoRa network was used to simulate data transmission from sensor nodes to the LoRa gateway at Mosul University which then communicates with the server through the Internet's cloud platform.The Thing Speak (TTN) of LoRa-WAN technology allows free access with a fair access policy.However, the daily air time is limited to 30 seconds.The shortest time interval between transmissions allowed is 30 seconds.In order to accurately examine the air quality, a transmission time interval of 1,000 seconds was chosen to allow for changes in the air molecules Increasing the time interval between transmitted packets reduces the number of times packets are sent during the simulation period of one day, resulting in a decrease in the number of packets received.The performance of the LoRa network was evaluated by analyzing the effect of the transmission time interval on the total received packets at the network server.The total received packets decreased from 309 to 104 when the transmission time interval increased from 1,000 seconds to 5,000 seconds, as shown in Figure 8.According to the Lora Alliance document, the maximum transmission power is 14 dBm at 868MHz.
The study aimed to examine the effect of the distance between the sensor devices and the gateway on the received signal strength indicator (RSSI) for a transmission power of 14 dBm as shown in Figure 9.In the simulation scenario, data from the sensor devices was gathered, and transferred through the wireless network to the LoRa gateway, before reaching the network server.The network server controls the type of application that a user can use to customize the transmission duration and parameter values for each sensor device.To improve the performance of LoRa technology, it is necessary to research the impact of the distance separation between the sensor devices and the LoRa gateway on the received signal strength indication (RSSI).The RSSI is the strength of the signal received by a specific LoRa gateway from the sensor devices.
Additionally, the total number of received packets at the network server was calculated to ensure the quality of the connection and achieve efficient data transfer.
It should be noted that the LoRa WAN application layer is managed by the application server, which includes tasks such as downlink data encryption and encoding, downlink data queuing, and uplink data decoding and decryption.
The network server, which is the fundamental component of the star topology, is responsible for adjusting the data rate.It connects the application servers to the gateways.The cloudbased network server consists of a processor, router, and moderator.Its job is to ensure that no packets are duplicated by scheduling different acknowledgments.The network server is responsible for both decoding received and eliminating duplicate packets.

CONCLUSIONS
This paper provides an analysis and monitoring of the system's efficiency in a real setting in Mosul City.The air quality was assessed in different sites using 8 sensor devices inside Mosul University.The goal of this paper's strategy was achieved through LoRa technology, which shares air quality monitoring using the simulation tool OMNET++.This allows for the sending of sensor devices' data to the cloud for monitoring and performing the required actions in real-time, ultimately decreasing the probability of air pollution.
The RSSI metric was chosen as an indicator of network performance, due to its importance in all LoRa modules.RSSI is utilized to judge the strength of a wireless signal.It is a component of the layer used for wireless transmission and is utilized to assess the quality of the link and determine whether to increase the broadcast transmission strength.In summary, the purpose of RSSI is to measure the strength of wireless signals in the surrounding environment and determine whether the channel is occupied.Its purpose is to assess radio link quality, with a radio link being considered GOOD if its RSSI is greater than −115dB, and BAD if RSSI <= −120 dB.
Total received packets were chosen as a metric to indicate network performance due to the network server's function in the cloud, which manages the network by receiving packets from gateways, scheduling acknowledgments, packet decoding, and ensuring packet de-duplication.To more accurately assess air quality, a time interval of 1,000 seconds was selected between transmitted beams.This allows for anticipation of a change in air molecules when the durations between broadcast packets are extended from sensor nodes.As a result, transmitters will send fewer packets throughout the one-day simulation which leads to a lower number of packets received at the network server.
The results showed an increase in the concentration of CO2 and temperature in the presence of generators and parking cars, reaching 487 ppm and 41.3℃ respectively at 1:00 PM.The effectiveness of the network increased through improved network performance, represented by increased RSSI after setting the best distance between sensor devices and the gateway.Additionally, the total received packets increased from 104 to 309 when the transmission time interval decreased from 5,000s to 1,000s.
The President of Mosul University presented a strategy to reduce air pollution inside the university which includes increasing green space, relying on renewable energies, riding bikes, adjusting air conditioners, employing public transportation, and switching to electric cars.
Looking to the future, the work will focus on introducing additional types of sensor devices to measure Nitrogen Dioxide (NO₂), Wind Speed, Wind Direction, Ozone (O₃), and Black Carbon (BC) in order to improve the air quality in Mosul City.

Figure 1 .Figure 2 .
Figure 1.A screen capture shows the FLoRa window, there are eight sensor devices and one LoRa gateway linked to the cloud server by the wireless network

Figure 6 .
Figure 6.Air quality monitoring dashboard Figure 7 shows the implemented system.It consists of the transmitter part with the two sensors and a 24V power supply.This TX part is placed outside the window where the air quality will be measured.The receiver part consists of opening the Lora gateway module connected to the computer.

Figure 8 .
Figure 8.The total received packets at the server network vs. transmission time interval of packets employing one LoRa gateway and eight sensor devices

Figure 9 .
Figure 9.The RSSI versus the distance between the sensor devices and the LoRa gateway for 8 sensor nodes using a single LoRa gateway

Table 3 .
Parameters values of the sensor devices