Air Quality Monitoring Device for Vehicular Ad Hoc Networks: EnvioDev

Urban air pollution has become a major concern for numerous densely populated cities globally since poor air quality may cause various health problems. The first crucial step towards solving this important problem is to identify the most critical areas with the highest air pollution over the allowed limit. Nowadays, air pollution is monitored by various stationary measurement systems that are expensive, large, consume a big amount of energy and gathered data has a low spatial resolution. This paper presents EnvioDev, a mobile air quality and traffic conditions measurement device for Vehicular Ad hoc Networks (VANETs) that can be used on any type of a vehicle. EnvioDev was tested in a real-world urban environment measuring CO, CH4 and LPG concentrations, as well as air temperature and humidity in order to create a city pollution map and the results are presented in the paper. Moreover, in order to determine how many EnvioDev devices are required to obtain close to a realtime air quality map of an urban area, three experiments with Simulation of Urban Mobility (SUMO) simulator were conducted. In the experiments an urban city map was divided into five zones and data aggregation frequencies are varied during different traffic load periods in order to study the number of required vehicles with EnvioDev measurement device. The obtained results show that by increasing the data aggregation frequency the number of required vehicles with EnvioDev measurement device increases and it is depended on the size and topology of the testing area. Keywords—Air pollution; air quality; Arduino; sensors; SUMO; VANET


I. INTRODUCTION
Air pollution is one of the major global environmental problem and air quality is decreasing in numerous world's cities, especially in densely populated areas. Air pollution can be linked to many health issues, and therefore it is a main research subject for numerous scientists across the globe. One of the basic steps towards solving this important problem would be identifying the most critical areas with the highest air pollution over the allowed limit. It would be beneficial to have a real-time pollution map of the whole target area. However, stationary measurement systems are very expensive, need construction works, require special licenses and authority permits, and have very expensive instruments and equipment for measuring atmospheric conditions. Furthermore, they are stationary and can conduct measurements only on one specific location. Mathematical models and appropriate software tools to extrapolate this "point" data to a specific area are with very limited possibilities.
By increasing the number of measuring devices and enabling them to become mobile it is possible to measure, monitor, track and process more accurately air quality parameters, create analytics, calculate air quality index (AQI) and create a real-time pollution map of a desired area. By providing real-time environmental and traffic data to relevant authorities, living conditions such as air quality, noise distribution and traffic load, especially in urban areas, can be dramatically improved. Moreover, such devices would enable scientists and epidemiologists to efficiently gather and process useful information, conduct research based on influence of ultrafine pollution particle effect on health conditions, fast react in a case of disasters and implement local and global pollution policies. In addition, appropriate traffic management strategies can be implemented based on this information.
The main research and development challenges and problems in this paper include building a reliable, affordable and as small as possible environmental condition measurement device that can be placed on various types of vehicles and used for real-time measurements of a target area. This paper describes an inexpensive and reliable air quality and traffic conditions measuring device EnvioDev -ENVironmental Input/Output DEvice for Vehicular Ad hoc Networks (VANETs). EnvioDev is based on Arduino platform equipped with several sensors for measuring various atmospheric parameters and pollutants, as well as detecting device location, acceleration and angular velocity. EnvioDev can be placed on any type of a vehicle and is connected with a cloud system with GSM LTE module through cellular network. On a cloud system all data are shown on a map, and therefore are generating a real-time pollution map of a desired area. Generated data and pollution maps will be available to local authorities and will enable them to keep track of environmental 580 | P a g e www.ijacsa.thesai.org condition on health effect, detect emergency situations like gas and fuel leakage and react in a case of disasters.
EnvioDev was used in real world experiments to determine the air quality in the city of Osijek. By collecting spatially resolved measurements, five selected parameters were measured: temperature, humidity, carbon monoxide (CO), methane (CH 4 ) and liquefied petroleum gas (LPG, propane (C 3 H 8 ) and butane (C 4 H 10 )) concentration. Analysis of the obtained measurements results showed that on several locations LPG and CO concentrations are above expected average. Therefore, it is desirable to perform constant air quality monitoring in the future by using several EnvioDev devices in order to get more measurement results with a higher density, reliability and accuracy. In order to determine the optimal number of required EnvioDev devices that is necessary to efficiently cover a target area and provide high quality realtime measurement results an open source traffic simulator Simulation of Urban MObility (SUMO) was used [1]. Three experiments were conducted and an optimal number of devices is presented for selected scenarios of interest.
The paper is organized as follows: Section 2 describes state-of-the-art solutions to the highlighted problem in the paper. Section 3 describes EnvioDev full system architecture. Section 4 presents and discusses obtained real-world experimental results. Section 5 describes conducted simulations and discusses the results. Section 6 concludes the paper and presents the future work.

II. RELATED WORK
Environmental pollution is an increasing problem in urban environments and has a significant impact on a climate change. Encouraged by this problem, the idea of enabling distributed and real-time air pollution monitoring has been intensively developed in the past few years mainly based on embedding mobile measurement devices in public transport vehicles since they cover most parts of urban areas and are in traffic most part of the day. Besides public transport vehicles, developed measurement devices can be mounted on other private and official vehicles such as taxi vehicles or delivery service vehicles (vans, motorbikes and even bicycles) in order to expand the area and frequency of the measurements. One important issue recognized in the related state-of-the-art work is calibration of mobile sensors that is crucial for obtaining accurate and reliable measurement results.
Solutions where public transport vehicles are used for providing mobility to mobile air quality monitoring devices are very common in the literature, as shown in [2], [3], [4], [5] and [6]. Development and deployment of mobile measurement devices mainly on city buses is described. Conducted experiments prove that there is a huge potential of such systems since they enable efficient data gathering and processing. Various pollutants were monitored across different cities and air pollution maps were created. The main issue in most of the papers was finding the optimal route of public transport vehicles in order to acquire the most reliable outcome and cover as much of the target area as possible.
Since most of the researches are using low cost sensors several papers raised the issues of sensors quality as described in [7], [8], [9] and [10]. Therefore, measurements from lowcosts sensors were compared with stationary monitoring stations equipped with certified instruments. It was concluded that the low-cost sensors accuracy was satisfied for many various applications, but the calibration is encouraged in the areas with the network of high-quality stationary measurement devices.
Researches in [11] and [12] are proposing models that rely on cloud computing and are using vehicle-to-vehicle (V2V) and vehicle-to-infrastructure (V2I) communication for both, traffic and air pollution monitoring. In [13] a full ICT solution that besides using mobile measurement devices for collecting, processing and distribution of gathered data enables citizens to report any kind of pollution they detect by using their smartphones.

III. ENVIODEV SYSTEM OVERVIEW
Major research and development challenges in this paper are related to design, development and implementation of efficient EnvioDev system architecture. Unlike the solution offered in [2] where public transport vehicles are used for providing mobility to heavy and big mobile air quality monitoring devices, one of the major goals of EnvioDev system architecture is to build small, low-cost, lightweight, low power and mobile measurement device that can be easily paced on any type of a vehicle. Furthermore, the major requirements include providing reliable real-time measurements and communication with the cloud. Moreover, EnvioDev has to be robust, resistant and weatherproof since it will be working in difficult and demanding working conditions.
In the related work several papers [2], [6] and [9] are dealing with the problem of efficient sensors calibration that heavily depends on the availability of high-quality stationary measurement stations in the target area. EnvioDev was first calibrated in the laboratory environment and afterwards in a real environment based on the obtained measurement from the one stationary measurement station that exists in the target area of city of Osijek [14]. This section introduces the architecture of developed mobile measurement device EnvioDev in terms of hardware architecture, network and communication capabilities, as well as software and cloud system design.

A. Hardware Architecture
The core of the hardware architecture is Arduino Mega 2560 Rev3 microcontroller with 54 digital I/O pins that provide enough ports to connect multiple sensors. Values obtained from sensors provide analog information, and therefore microcontroller is also used for data conversion and processing. Fig. 1 shows EnvioDev hardware architecture, all included components and their interaction. Selected components took into account the size, design and purpose of the target EnvioDev device. Sensors with high sensitivity and fast response time were selected. The chosen sensors for air pollution measurement are the following: carbon monoxide sensor (CO), methane sensor (CH 4 ) and liquefied petroleum gas concentration sensor (propane (C 3 H 8 ) and butane (C 4 H 10 )). In addition, environmental parameters sensors are also included, such as temperature and humidity sensors. Moreover, geographical location and time are also collected by

C. Software System Design
In order to collect all measurements, derive air quality parameters, calculate indicators, create pollution map and present data to different types of users, software system was developed by using several different technologies and programming language at different programming layers, from a low level in Arduino to a high level in the cloud. The main requirement on the software system is to have a responsive backend system that manages all available resources efficiently and in timely manner [17]. EnvioDev software system design is shown in Fig. 3 and consisted of the following four modules and the cloud:   • Sensor Data Acquisition Module -the module is used for receiving and converting data obtained from the sensors, • GPS Data Acquisition Module -the module receives and converts EnvioDev location (latitude and longitude values), time and speed information, • Delay tolerant networking (DTN) stack -is used as a temporary storage of measured data which increases EnvioDev reliability by preserving data on the device until the transmission to the Cloud is performed, • Data Publisher Module -the module uses GSM component to periodically sends information to the Cloud and has two operating modes, i) proactive -data are sent based on predefined internal events and triggers, ii) reactive -data are sent based on the request from users, • Cloud -consists of the database and application layer used for data presentation.

IV. REAL-WORLD EXPERIMENTS AND RESULTS ANALYSIS
The real-world experiment was conducted in an urban area of city of Osijek in Croatia, as shown on a map in Fig. 4. On a map of tested area all locations where the measurements were conducted are marked with red dots. Most parts of the city 582 | P a g e www.ijacsa.thesai.org horizontal were covered but some locations could not be accessed due to the road works. Measurements were performed during several parts of the day but avoiding rush hours since a huge number of vehicle can influence measurement results. Due to sparse traffic during the experiment, measurement results were much more accurate since there was no influence of the gases produced by other vehicles that can dramatically influence the measurement results and provide a wrong picture of the city current pollution situation. In total five experiments were conducted by using one major route that goes through the main streets and major parts of the city of Osijek but each time the route was slightly changed. The duration of each experiment was 20 minutes and in average the route length was 25 kilometers.
Measured air quality parameters during the experiment are described in Table I. The chosen air quality metrics is based on three pollutants, namely CO, CH 4 and LPG concentration. The concentration is shown in parts-per-million (ppm, 10 −6 ) measurement unit. Furthermore, the air temperature T [°C] in degrees Celsius and the amount of relative humidity in the air H [%] expressed as a percentage which represents a measure of the amount of water vapor that air is holding compared the amount it can hold at a specific temperature, were measured.
EnvioDev was fixed on a roof of a personal vehicle and partially protected from the wind and air flow. However, in order to lower the influence of the air flow on the measurement results, a proactive mode in the Sensor Data Acquisition Module was used by implementing a trigger at a low level of EnvioDev software system, for taking measurements Mi only when the following conditions are satisfied: i) the testing vehicle stops (GPS Data Acquisition Module: current vehicle speed v cur equals to zero), ii) distance from the previous measurement is at least 0,1 km (GPS Data Acquisition Module: Euclidean distance between the current vehicle position V pos (lat, lng) and the position of the previous measurements ∑ ( , ) −1 =0 recorded within the aggregation frequency interval f DA ), and iii) previous measurements ∑ −1 =0 _i were not recorded within the 5% of aggregation frequency time interval (in order to reduce the number of redundant measurements), as shown in (1).
Consequently, a vast majority of measurements were performed at intersections and during red traffic lights. During each measurement location coordinates (latitude and longitude values) and timestamps were retrieved from the GPS sensor (GPS Data Acquisition Module: get_current_loaction(); get_timestamp()). After each measurement all measured values were transferred to DTN stack and afterwards through GSM Publisher Module to the cloud. The cloud system gathers and processes all the measured values provided by EnvioDev since it is necessary to convert all sensor measures to the defined metrics.   Vol. 11, No. 5, 2020 Obtained measurement results are presented in Table II (only partial data is shown due to a high number of obtained results). According to World Health Organization (WHO) air quality guidelines for Europe [18] global CO concentrations range between 0.05 -0.12 ppm (0.06 and 0.14 mg/m3). During the experiment measured CO values were ranging between 0.07 and 0.14 ppm. In most of the areas covered by the experiment, the measured values were in the recommended range, several were close to the top margin and three measurements showed a higher CO concentration than recommended that were measured at only one specific place. According to [19] ordinary edge level of LPG concentration is 400 ppm, while 600 ppm is marked as upper exposure limit. Measured results in the experiment show concernedly level of LPG concentration in most of the measurement results since majority of the tested area has a high level of LPG and several parts are above the upper exposure limit. The experiment was conducted during the period of the day with a sparse traffic when there is very little influence of the gases produced by other vehicles, so those measurement results are a warning to the local authorities since high levels of LPG can decrease the amount of the oxygen in the air and cause suffocation with several serious health symptoms. Obtained measurement results of CH 4 level values in range from 550 ppm to 865 ppm. According to [20] maximum recommended safe methane concentration for a human during continuous exposure is 1.000 ppm. In comparison to average global CH 4 level [21] it can be concluded that CH 4 level in tested area is acceptable and bellow a global average. AQI is differently calculated and used across the globe since local, regional, and national governments have its own air quality indices, corresponding to different national air quality standards. It is usually used to measure air pollution and apply measures in a case of unhealthy values since public health risks increase as the AQI rises. AQI is based on measurement of various factors such as particulate matters PM2.5 and PM10, Ozone (O 3 ), Nitrogen Dioxide (NO 2 ), Sulfur Dioxide (SO 2 ) and CO emissions. In our experiments CH 4 , LPG and CO are used for AQI calculations, as shown in (2) where M j represents a single measure from a specific sensor (M CH4 , M LPG , M CO ), M min represents a breakpoint concentration that is ≤ M j , M max represents a breakpoint concentration that is ≥ M j , AQI max represents an index breakpoint corresponding to M max , AQI low represents an index breakpoint corresponding to M min .
For a specific city area or a time period the final AQI f is calculated as the arithmetical mean of the N AQI j , as shown in (3).
Based on the average measured results partially presented in Table II the calculated AQI f for the city of Osijek during the experiments equals to 59.85 and according to [22] that uses US AQI metric scale it represents a moderate AQI. However, as mentioned before AQI has many various calculation principles so it is hard to compare this result to the others. Due to measurement results it can be concluded that further research and measurements regarding the air quality parameters in the tested area are required since at several locations LPG and CO concentrations are higher than the recommended level and especially since the measurements were conducted only during the part of the day with a sparse traffic. Furthermore, since CH 4 level keeps increasing every year it is recommended to constantly monitor its concentration. In order to get more detailed data that can be used for a deep analysis of the air quality in the city of Osijek it is necessary to conduct more comprehensive measurements during the whole day and with a higher number of EnvioDev devices.

A. Simulation Setup
The experiment described in Section 4 was conducted by using only one EnvioDev measurement device on only one vehicle that is not enough to cover the experiment area. In order to determine how many vehicles with implemented EnvioDev measurement devices are required to efficiently cover the whole area and satisfy the data aggregation frequency f DA (how often EnvioDev should collect data) with satisfying data freshness index (D FI ) defined in equation (4), a 24 hours of traffic in the experiment area was simulated by using SUMO. SUMO is an open source, microscopic, multi-modal traffic simulator that enables simulation of a given traffic demand through a real-world road network [1]. The simulation map size is 6.5 x 3.0 km since the simulated area covers the city of Osijek that is placed along a river and is much wider than it is higher. Therefore, the map is divided into five equally wide geographical zones. The full width of our map is 5500 pixels (corresponding to axis X), and therefore each geographical zone has a width of 1100 pixels, as shown in Fig.  5. The aggregation process maps each geo-located measure in the relative zone.
EnvioDev could be used on any type of a vehicle but the most efficient use would be in vehicles that are moving most of the day and are covering the whole target area. Therefore, the most convenient vehicles are public transport vehicles, taxi vehicles or even delivery service vehicles since they satisfy all the requirements. In this simulation it is assumed that EnvioDev will be implemented on taxi vehicles. Therefore, a SUMO tool called randomTrips.py that generates a set of random trips for a given network, in our case a map of city of Osijek, is used [23]. Taxi trips mostly have a random source and destination and are mostly driving 24/7, so the trips generated from randomTrips.py represent a realistic traffic sample.  Vol. 11, No. 5, 2020 During the day different traffic intensities occur and for the purpose of this simulation the experiments are divided into the following three categories: • Rush hour (RH) period -from 7:00 -9:00 h and from 14:00 -17:00 (5 hours in total), • Normal hour (NH) period -from 9:00 -14:00 h and from 17:00-22:00 (10 hours in total), • Late hour (LH) period -from 22:00 -7:00 h (9 hours in total).
Accordingly, based on the data presented in [24] three types of traffic loads were generated, where RH had a total of 900 vehicles, NH had a total of 300 vehicles and LH a total of 50 vehicles. During the simulations taxi vehicles with implemented EnvioDev were randomly selected. Locations of those vehicles are monitored and mapped during simulation and measured data collection was conducted at three different frequencies: each 15, 30 or 60 minutes. Those frequencies were selected based on the experience since the concentration of the air pollutants parameter during the normal weather conditions do not change quickly but still they enable frequently data gathering with up-to-date information and usage for the research and study purposes. Since generated trips and selected vehicles with EnvioDev are randomly generated, occasionally simulated vehicles are on the same location for a longer period time which is also a realistic scenario since taxi sometimes have breaks or less workload and consequently are parked.
Since EnvioDev reads data from several sensors, input freshness values are combined and the average freshness of data at the moment of reading t Davg is calculated, as shown in (4) where t c is the current timestamp and t Si is the timestamp of each sensor last measurement.
Vehicles equipped with EnvioDev constantly move, and consequently the coverage of the city area dynamically changes over time and it is possible that some parts of the city have better coverage than the others. Therefore, it is necessary to define D FI that depends on the average freshness of data at the moment of reading t Davg , the time needed for data processing and synchronization t PS and f DA . Three data aggregation frequencies are used in our experiments f DA = {15, 30, 60} minutes. The equation (5) defines the D FI value where the lower results gives higher freshness.
Simulation results were exported as floating car data and the content is shown in the Table III [25]. From the floating car data, it is possible to retrieve all necessary information about any specific vehicle regarding driving parameters (speed, position (x, y), lane, slope) and vehicle (id, type, angle) as well as simulation timestamp. Simulation results are presented and discussed below in three separate experiments. Heat maps of each measurement location for each vehicle are shown in Fig. 6, 7 and 8, where the number of five vehicles containing EnvioDev is used as a reference value. The number of total measurements conducted minus number of redundant measurement per number of vehicles containing EnvioDev per each geographic zone N Z during each defined traffic load over the testing period T p is shown in the corresponding Tables IV, V and VI. Based on the obtained results the required number of vehicles equipped with EnvioDev N vehs required to satisfy the experiments' requirements is calculated in (6).

B. First Experiment
In the first experiment the data aggregation frequency f DA = 60 minutes is used. In Table IV the number of measurements in first experiment during three various traffic loads RH, NH and LH, per each geographical zone for three various numbers of vehicles {1, 5, 10} containing EnvioDev, is shown. The locations of all measurements per each vehicle are shown separately in Fig. 6 where each vehicle is represented with a dot of a different color.

Id
The id of the current lane. slope

Degree
The slope of the vehicle in degrees (equals the slope of the road at the current position) 586 | P a g e www.ijacsa.thesai.org  Based on the measurement results and calculated D FI = 0,15 it is concluded that in order to achieve the data aggregation frequency of f DA = 60 minutes it is necessary to have nine vehicles on the tested area (N vehs = 9.06) to cover all five geographical zones efficiently. In Table IV it can been seen that some geographical zones are less represented in the measurement results than the others due to city structure since zones 3 and 4 are heavy urban areas where majority of people work and live mainly in buildings, therefore the traffic load is heavier than in other parts of the tested area.

C. Second Experiment
Compared to the first experiment the data aggregation frequency is doubled and equals to f DA = 30 minutes. Three groups of vehicles {5, 10, 20} containing EnvioDev are used in this experiment. Table V shows the number of measurements obtained during the second experiment for three traffic loads (RH, NH and LH) per each geographical zone. The locations of all measurements per each vehicle are shown separately in Fig. 7 where each vehicle is represented with a dot of a different color. Calculated D FI = 0,21 is slightly higher than in the first experiment but the data aggregation frequency is doubled, resulting in a double number of required vehicles equipped with EnvioDev (N vehs = 18.34) in the tested area to satisfy the requirements. However, this increase is not efficient since in to have almost double number of vehicles equipped with EnvioDev much higher resources are needed in terms of number of devices and vehicles as well as communication and maintenance expenses. Furthermore, from the Fig. 7, it can be seen a small coverage increase but the increased aggregation frequency results with redundant measurements and an uneven geographical zones coverage, as shown in Table V.

D. Third Experiment
In the third experiment the highest data aggregation frequency is used, namely f DA = 15 minutes, and compared to the first and second experiment it is four and two times higher. The number of measurements obtained during the third experiment for three different traffic loads (RH, NH and LH) and three groups of vehicles {5, 15, 30} containing EnvioDev per each geographical zone is shown in Table VI. Fig. 8 shows locations of all measurements per each of the five vehicles containing EnvioDev, separately and each vehicle is marked as a dot with a different color.
Although D FI = 0,41 is much higher when compared to the first and second experiment the increase of the number of vehicles equipped with EnvioDev required to satisfy the experiment requirements is not dramatic and equals to 26.84. This is a result of the fact that data aggregation frequency is quadrupled when compared to the first experiment and doubled when compared to the second experiment and due to the fact that data freshness is dependent on the aggregation period. Therefore, if it is required to have a higher number of measurements in the tested area it is recommended to use the third experiment setup since the invested resources are not dramatically higher but will produce much higher number of measurement results. If it is needed to further increase D FI it is necessary to increase the number of vehicles equipped with EnvioDev depended on the size and shape of the target area. The third experiment setup ensures almost real-time measurement results since the air quality during the normal weather conditions does not change quickly as well as the concentration of present air pollutants. The exception is in the areas with heavy industry, highly populated urban areas or areas with very unstable weather conditions.

VI. CONCLUSION
Using mobile air quality measurement devices has many advantages when compared to the stationary ones in terms of cost-benefit trade-offs such as efficiency, overall deployment and maintenance costs, spatial coverage and implementation procedure. The presented EnvioDev measurement device can efficiently measure all air quality and traffic conditions parameters and provide useful real-time data. EnvioDev device was used in real-world experiments in the urban area of the city of Osijek. During the experiments high levels of LPG and CO concentration were recorded at several locations further stressing the need for continuous and detailed air quality monitoring. A fleet of vehicles equipped with the presented EnvioDev device can be used to conduct more comprehensive measurements for that purpose. Simulation results showed that for a lower data aggregation frequency of f DA = 60 minutes, nine vehicles equipped with EnvioDev devices are needed, whereas for a much higher data aggregation frequencies of f DA = 30 and 15 minutes, 18 and 27 vehicles equipped with EnvioDev devices are needed respectively to satisfy the requirements for efficient coverage of the city area and regular measurements in each part of the urban area.

VII. FUTURE WORK
In the future work we plan to conduct more experiments in order to perform more detailed research on how the working environment conditions (winds, sun, rain, etc.) influence EnvioDev measurements. Furthermore, since we have additional sensors such as accelerometer, gyroscope, UV radiation and noise intensity sensor which measurements are not included in this work we plan to use them and based on measurements detect specific traffic conditions such as heavy traffic, traffic congestions, vehicle accidences [26] as well as area noise and UV radiation levels in a real-time [27]. Since EnvioDev is modular and expandable several additional sensors and camera can be added since from the picture is possible to extract very useful information for traffic purposes [28] as well for recognizing environmental pollution. Development of traffic management strategies based on air pollution information is challenging. However, based on algorithms presented in [29] it is possible reroute urban traffic from critical parts of the street network (e.g. outside residential city areas). In addition, all generated data can be used with semantics, big data, and machine learning algorithms [30] in order to provide customized information, predict specific situations, improve security [31] and provide decision support.