87 Web Application for Air Quality Monitoring Yevhen Kedrin1, Iryna Voytyuk2, Serhii Tryshkaliuk3, Mykhailo Shpintal4 Department of Computer Science, Ternopil National Economic University, UKRAINE, Ternopil, 8 A. Chehova str., email: place.ev@gmail.com1, i.voytyuk@tneu.edu.ua2, grisha.semyonav@gmail.com3, m.shpintal@tneu.edu.ua4 Abstract: Web application for air quality control as part for periodic measurement of harmful emissions from of ecological monitoring system presented in this paper. It vehicles. However, such approach does not provide an is proposed the database architecture and modules for operational monitoring of the dynamics of these emissions. In data processing and visualising. Proposed application the field of mathematical modeling, a series of diffusion enables to monitor air pollutions from motor transport mathematical models have been developed that describe the not only in measurement points, but in different points of processes of harmful emissions diffusion into the atmosphere city using mathematical models. [2-5]. At the same time, the results of the application of these Keywords: monitoring system, air quality control, models are poorly correlated with actual measurement data. vehicular pollution, web application. As a result, it is impossible to detect and react in a timely manner to raising the pollution level. I. INTRODUCTION It is necessary to use modern technologies and devices that One of the biggest environmental pollutants in large cities will make monitoring of air pollution in the cities more is motor transport. During the fuel combustion the emissions accurate and continuous. Establish on the city territory of the such as sulfur dioxide (SO 2 ), particulate matter (PM 10 ), fine sensors for measurement different substances and control of particulate matter (PM 2.5 ), nitrogen dioxide (NO 2 ), carbon traffic flows. In order for the whole area of the city to be monoxide (CO), ozone (O 3 ) and others are polluting the air. covered, not only certain areas, it is necessary to create For pollution assessing the measurement scale is using based mathematical models and software that will show the spatial on Air Quality Index (AQI), which determe whether a distribution of harmful substances. Access to all data should harmful substances are under permissible level. For example, be provided via the Internet. Every resident should be able to the lowest level of harmful substances called "Very low", find out what the current state of the air in the city is. next are "Low", "Medium", "High", "Very high". Different Viewing the measurements should be simple, understandable, countries have their own measurement scales. The Common using conditional labels and images on the map. It should be Air Quality Index (CAQI) is an air quality index used in possible to know the measurements for certain periods or Europe since 2006. In November 2017, the European only for certain parameters. Additional opportunities are also Environment Agency announced the European Air Quality needed, such as informing the public, publishing news, Index (EAQI) and started encouraging its use on websites and announcements, photo materials, conducting discussions, for other ways of informing the public about air quality. [1] exchanging ideas and suggestions. For a better understanding The sample of CAQI are given in Table 1. of the problem, it is necessary analyzing already existing systems of the same purpose and creating its own, which will TABLE 1. COMMON AIR QUALITY INDEX (CAQI) be useful both for ordinary residents of the city and for Qualitative Index or Pollutant (hourly) density in μg/m3 specialized workers in the field of ecology. This will be a name sub-index good step towards improving the environment and human NO 2 PM 10 O3 PM 2.5 health. The purpose of research is to plan the overall structure of the system for improving the quality and speed of air Very low 0–25 0–50 0–25 0–60 0–15 pollution monitoring by road, and to facilitate the obtaining Low 25–50 50–100 25–50 60–120 15–30 of this information for the population of cities through the Medium 50–75 100–200 50–90 120–180 30–55 web-resource. High 75–100 200–400 90–180 180–240 55–110 III. SYSTEM REQUIREMENTS AND ARCHITECTURE Very high >100 >400 >180 >240 >110 DESIGN The level of these pollutants in the air affects the well- In order to automate the air pollution monitoring, it was being and health of the city's population. At high levels of decided to create a system consisting of the three components pollution, it is recommended to reduce or completely described below. abandon the activity and exercises in the open air. This is 1) Hardware including sensors that measure the different especially true for children, the elderly and people with heart parameters, such as pollutant concentration, traffic flow, or respiratory diseases. In this regard, the population should humidity, temperature. They will be located in different parts be provided with quick and easy access to relevant data on of the city, mainly in central parts and in places where there is the air pollution in the city regions. a large crowd of vehicles, such as a crossroads. Data from such II. TASK STATEMENT sensors will be transmitted using mobile communication - GSM-modules. To ensure the proper level of storage, all To date, there are organizations in Ukraine that have means devices will be placed in specially designed containers or in ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 88 existing ones, for example, in places where traffic control IV. WEB APPLICATION IMPLEMENTATION cameras are located, and must be agreed with local authorities. 2) Software, based on mathematical models, calculations Web application as one of the components of the system and measurements from sensors, will simulate the spatial for monitoring atmospheric pollution from vehicles, is distribution of pollution on a city map. This will allow to see designed to visualize the results of measurement and the results of measurements not only in the places where they modeling the spatial distribution of pollution (fields of are conducted, but also to predict the level of pollution at concentration of harmful emissions). As a result of research, each point of the map. The papers [6,7] show the method of a web-based system project was developed and implemented solving the task of identifying mathematical models for in PHP programming language. As a database, MySQL was environmental monitoring of air pollution by motor vehicles used. CSS Media Queries, Bootstrap, were used to design a based on the use of fireflies algorithm or the bee colony convenient and compatible site with various devices. For fast algorithm. It is this research that underpins the development work due to AJAX interaction and dynamic interfaces, the of a mathematical model that will be used in our system. JavaScript library for jQuery is used. 3) Web application that is designed to conveniently As geographic maps the Google Maps was used with visualize the resulting measurements. additional data such as the traffic flow rate. The Google Maps The web application must flexibly interact with other parts APIs [8] allow to flexibly customize viewing and map of the system and with any other sensors or datasets that will interaction, add graphic objects, and various data types that be available for use. The air quality level can be depicted on a are well suited for pollutions visualization. There are city map in the form of points where the sensors are located, currently two maps on the website. The first depicts the or as a result of mathematical modelling the spatial points with the actual measurements coming from the sensors distribution of pollution. (Fig. 2). Each of the points has own color and number As a result of the analysis of existing alternative solutions corresponding to the AQI scale, which is under the map. the number of functional and non-functional system requirements were listed, namely: possibility of showing the sensor measurements and simulation results on city map; ability to choose a period for showing measurements; ability to view detailed information at the selected point of the map; ability to take information through the API from various sources: sensors, other software systems, Excel files; working with different indicators and possibility of combining them on the map; development of administrative profile with ability to adjust the map showing and indicators, edit news and other materials; development of news page, including the latest news on the main page; possibility to place announcements on the main page; development of the blog; possibility to leave comments under every material; showing the contact data and feedback form; development of the forum; development of the photo gallery; provide a system Fig. 2. Map with sensor indicators design that will allow viewing site data in various browsers and devices (PC, tablet, phone). On the second map are the simulated results calculated on Taking into account defined requirements to the system, a mathematical model, in which one can observe the spatial database was designed. The structure and relations of tables distribution of pollution (Fig. 3). for working with maps and measurements showed in Fig. 1. Fig. 1. Database structure Fig. 3. Map with spatial distribution ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 89 There is at the top of each map a switch where it is possible and specify its appearance on the map (distribution chart or to specify the period for which measure to be displayed: point of a certain color with the number), and a detailed view today, month, or year. Also, site users can view detailed (diagram, graph, etc). information by clicking on a specific point on the map. Fig. 4 shows an example of an auxiliary information window, which, in addition to the indicators shown on the map, also contains additional ones such as humidity and air temperature. The content and method of displaying items in this window are configured from the administrative part. Fig. 4. Information screen In addition to viewing maps, the website has pages with a wealth of useful information, news and blogs with possibility to add the interesting articles. In order for site users to ask questions or to offer an idea, there is a page with contact information and a feedback form. Also on the site is a forum that allows to discuss topics related to air pollution and how to improve the situation with the environment. The administrative profile allows to create new admins and give them only certain permissions. It is possible to conveniently edit the content of the site, create news, write articles. The specialized section of the administrative profile Fig. 6. Form for map editing is the control of the display of information on air pollution. The system is called "Our city" and contains the following administrative sections: maps, providers, indicators, placement, sensors. The main menu view is shown in Fig. 5. Fig. 5. Administrative menu "Maps". In this section the list of all geographic maps that will be available for viewing on the site is shown. When creating a new map, it can be flexibly customized depending Fig. 7. Form for map indicators editing on the needs and the data it should display. So, when creating it is necessary to specify the name, latitude and longitude, the "Providers". This section contains a list of all data sources level of convergence, the type of relief, if necessary, a from which the site may receive information. Connection can description (Fig. 6). Also it is necessary to specify one or take place via HTTP or FTP protocol. Thus, it is possible to more data providers to choose which data to display. obtain data not only from other parts of the monitoring Each provider can provide a large amount of information system - sensors and programs with implemented and indicators, but which of them should be displayed, in mathematical models, but also to third-party companies that what form, as well as where - on the map or in the detailed carry their own measurements or have their equipment to view window at the selected point - it is configured in the sanitary stations. Also, here it is indicated, with what interval Indicators sub-tab (Fig. 7). Here can be selected any indicator should apply for the updated data. ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 90 “Indicators”. This section contains a list of all parameters, V. CONCLUSION and metrics that the system works with. For each indicator, it is possible to specify the name, code and scale of The processes of air pollution by motor transport are one measurements, where for each level is given the color and of the most important problems of large cities. To solve this numbers min and max (Fig. 8). It is also possible to specify a problem it is necessary to ensure operational monitoring of formula for converting values or complex calculations. For the dynamics of harmful emissions. The development of new example, one indicator shows actual values from the sensor, models based on real monitoring data will increase the named NO2, and an additional indicator, named NO2-AQI, accuracy of both reflection and prediction of the dynamics of will display measurements of nitrogen dioxide translated into atmospheric pollution, depending on the intensity of traffic the air quality index. Or it was created a common indicator flows, and the creation of an appropriate software system for AQI, which in its calculations will use several different their implementation, as well as a web resource to visualizing sensors measurement. the current situation of atmospheric pollution, will serve as an active tool for municipal services that deal with traffic flow management, environmental protection, and for the city's population. Within this research the general structure of the system was described and a web application was developed. ACKNOWLEDGMENT This research has been supported by National Grant of Ministry of Education and Science of Ukraine "Mathematical tools and software for control the air pollution from vehicles" (0116U005507). REFERENCES [1] "Impact assessment on the Air Quality Package (summary)", SWD/2013/0532 final, EC, 2013. [2] M. A. Sutton, C. M. Howard, J. W. Erisman. The European Nitrogen Assessment: Sources, Effects and Policy Perspectives, Cambridge University Press, 2011. [3] Outdoor air pollution a leading environmental cause of cancer deaths, Press Release No 221, International Agency for Research on Cancer, World Health Organization, Lyon, France, 17 October 2013. [4] "Global Road Safety Facility", The World Bank and Institute for Health Metrics and Evaluation, Transport for Health: The Global Burden of Disease From Motorized Road Transport, IHME; the World Bank, Seattle, WA; Fig. 8. Form for indicator editing Washington, DC, 2014. "Placing". This list lists all the locations in which the [5] "Regulation (EC) No 443/2009 of the European system receives measurements. When editing it is necessary Parliament and of the Council of 23 April 2009 setting to specify a name, latitude, longitude, description. emission performance standards for new passenger cars as This section is intended for grouping sensors, because there part of the Community's integrated approach to reduce can be a lot of them in one place. CO 2 emissions from light-duty vehicles", OJ L 140, EU, “Sensors”. In this section it can view the list of all sensors 2009, pp. 1–15. that the system uses. When connecting a new sensor, it need [6] I. Voytyuk, N. Porplytsya, A. Pukas, T. Dyvak. to add it to this list by specifying its name, code, list of "Identification the interval difference operators based on measurements it passes on (indicators) and indicate its artificial bee colony algorithm in task of modeling the air location. With this information the system will automatically pollution from vehicular traffic", in Proceedings of 14th detect sensor or communication problems, responding to the International Conference: The Experience of Designing lack of measurements or their inaccuracy. and Application of CAD Systems in Microelectronics, This structure makes the system flexible, allowing it to 2017, pp. 58-62. create new maps without software changes, to connect [7] I. F. Voytyuk, S. R. Tryshkaliuk, Ye. S. Kedrin. different data sources, to work with various indicators, even "Investigation of fireflies algorithm for identification of if in the future it will be necessary to measure, say, water or mathematical model in the task of monitoring pollution soil. Also, there is no hard bind to other components of the by motor transport," in Proceedings of Conference: system, the application will be able to work correctly even at Advanced Computer Information Technologies, Ternopil, the time of their modification, and in turn will not affect the 2017, pp. 235-238. work of other components, such as sensors, when work on [8] Google Maps APIs. Available: the site itself. https://developers.google.com/maps/web/ ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic