Decision Support Algorithm Based on the Concentrations of Air Pollutants Visualization

As medical technologies are continuously evolving, consumer involvement in health is also increasing significantly. The integration of the Internet of Things (IoT) concept in the health domain may improve the quality of healthcare through the use of wearable sensors and the acquisition of vital and environmental parameters. Currently, there is significant progress in developing new approaches to provide medical care and maintain the safety of the life of the population remotely and around the clock. Despite the standards for emissions of harmful substances into the atmosphere established by the legislation of different countries, the level of pollutants in the air often exceeds the permissible limits, which is a danger not only for the population but also for the environment as a whole. To control the situation an Air Quality Index (AQI) was introduced. For today, many works discuss AQI, however, most of them are aimed rather at studying the methodologies for calculating the index and comparing air quality in certain regions of different countries, rather than creating a system that will not only calculate the index in real-time but also make it publicly available and understandable to the population. Therefore we would like to present a decision support algorithm for a solution called “Environmental Sensing to Act for a Better Quality of Life: Smart Health” with the primary goal of ensuring the transformation of raw environmental data collected by special sensors (data which typically require scientific interpretation) into a form that can be easily understood by the average user; this is achieved through the proposed algorithm. The obtained result is a system that increases the self-awareness and self-adaptability of people in environmental monitoring by offering easy to read and understand suggestions. The algorithm considers three types of parameters (concentration of PM10 (particulate matter), PM2.5, and NO2) and four risk levels for each of them. The technical implementation is presented in a step-like procedure and includes all the details (such as calculating the Air Quality Index—AQI, for each parameter). The results are presented in a front-end where the average user can observe the results of the measurements and the suggestions for decision support. This paper presents a supporting decision algorithm, highlights the basic concept that was used in the development process, and discusses the result of the implementation of the proposed solution.


Introduction
Today's society generates an increased amount of air pollutants from multiple sources: industrial waste, transport, dust, household energy, etc. Despite the framework restricting the emission of pollutants into the atmosphere established by law, a significant amount of mixtures enters the air every

Related Work
Healthcare is one of the areas where technology is evolving very rapidly due to necessity and sensors, just like the wearable devices that make up the Internet of Health Things (IoHT), are no exception. This field is increasing faster than all the others due to the increasing life level, level of medicine, and money savings because of proper treatment [6]. At the moment, there are no areas of healthcare left where wearable technology would not be involved, from conventional heart rate monitors to sophisticated systems for tracking severe cases, such as e.g., patients with Parkinson's [7] or Alzheimer's [8] diseases, or epileptic seizures [9]. However, a number of challenges are still present in this area, such as a need for more accurate monitoring, finding the trade-off between the functionality of a device and its form factor, power consumption, and price [10].
Representative work can be observed in [11] where a complete fusion framework for medical-related data is presented. As the diversity of medical sensors increases, it is mandatory that certain ways of managing different data to be developed, exactly as in [11], where the effectiveness of the proposed method is also explored.
The use of medical data is the IoT concept is also addressed in [12] where the authors propose an innovative framework meant to protect this type of highly sensitive and personal data. As the volume of patients, procedures are health parameters are continuously increasing so is the need for security towards it. The proposed framework is focused on ECG data.
Although the proposed solution is not directly related to healthcare, it attempts to improve the general level of health of the population, especially helping those who suffer from lung or heart diseases. In addition, the assessment of air pollution is very important in the framework of industries, especially hazardous ones, where emissions very often can exceed an acceptable level. Knowing this, safety assessment managers can timely evacuate workers and provide proper treatment. The Environmental Protection Agency (EPA) introduced the concept of the Pollutant Standard Index (PSI) for the assessment of the air quality in 1976. PSI has not been standardized and different areas of America and Canada used different indexes, which led to confusion. In 1999, EPA unified the index and renamed it from PSI to AQI.
Initially, this index had to be reported by a state if a metropolitan statistical area (MSA) had more than 350,000 people. As of 2013, about 20 countries have started to use AQI to assess the degree of pollution in the air [14]. Currently, the number of countries tracking this parameter exceeds 50 [15]. However, the AQI calculated in one country is not necessarily equal to AQI calculated in another because the list of monitored pollutants, the way they are measured, the air quality guidelines, and the methodology for calculating the index itself can be different. The methods of making measurements will be discussed in more detail in Section 3.
Generally, when talking about the air quality, it is essential to specify two different cases: indoor and outdoor. In an indoor environment, the air state strongly depends on the quality of the ventilation system. Studies [16][17][18][19] investigated the level of air pollution in underground conditions in China, Italy, Romania, and Greece consequently. All works consider the assessment of the air condition based on a level of PM, the pollutant with the highest exceeding over WHO's safe limits [18]. Most of the studies report that concentrations of PMs measured in subway stations are much higher than the same concentrations measured outdoor due to mechanical processes in trains. In contrast, this work is mainly focused on the estimation of the air condition in the outdoor environment. Some of the main sources of air pollution here are industrial emissions, power plants, and exhaust gases. This case also includes the estimation of air pollution level via AQI; however, the areas are more significant, the list of tracked pollutants is wider, and measured results are usually less severe than in the closed space.
The number of works that investigate AQI in the outdoor environment in different countries is vast, differing in the applied methodology of calculating the index, the way of interpretation, and the number of pollutants measured in the atmosphere.
For example, the authors of [16] propose a modified AQI interpretation method for Tunisia. They measure four pollutants (SO 2 , NO 2 , PM 10 , and O 3 ) during a particular time, take the maximum value to identify AQI, and then, rate it on a five-point scale (bad, poor, acceptable, good, and very good). This scale is defined by four thresholds: air quality alarm value, values which exceed Tunisian limiting values, Tunisian limiting value, and guide values recommended by the WHO. This study does not distinguish sensitive groups.
The work [20] considers five methods of AQI calculation: as an arithmetic mean of the ratio of pollutant measured in the air to its standard value (with and without weights for pollutants), as a geometric mean of the same ratio, according to the Oak Ridge National Laboratory formula, and according to the algorithm proposed by EPA. All methods were tested in India. The study does not conclude which method is more appropriate, but identifies the most dangerous pollutant, namely PM, based on the results.
The authors of [21] estimate AQI in several cities of India (Chennai, Bangalore, and Delhi), using hourly measurements of PM, SO 2 , NO 2 , and RSPM (Respirable Suspended PM). In this work, the AQI is calculated in two ways: in the first case, the index is the maximum value of all pollutants, and in the second, the index is the average value. The hazard classes are distributed in the same way as suggested by EPA in 1999.
To the best of the authors knowledge, most of the works devoted to the assessment of AQI are aimed at studying the methodologies for calculating the index and comparing air quality in certain regions of different countries, rather than creating a system that will not only calculate the index in real-time but also make it publicly available and understandable to the population. The proposed solution allows the combination of both functions. The next sections reveal the basic concepts, method of AQI calculation, and interpretation used in the developed system and the results of its implementation.

Internet of Things (IoT)
IoT represents a system consisting of linked computing devices, mechanical and digital machines, objects, and living creatures that have a unique identifier (UID) and can transmit data through a network in the absence of human-to-human or human-to-computer contacts [6,22].
The concept of IoT is growing very fast, especially in the following areas: healthcare, transport, industrial automation, and smart houses. The healthcare domain relies on the IoT through its special niche-the Internet of Health Things (IoHT) [6]. This field is developing faster than all the others due to increasing quality of life, level of medicine, and money savings because of timely informing and better treatment.
Generally, the IoHT provides a connection between patient and healthcare facilities.

Smart Health
Smart Health is a concept that involves the use of high-performance devices to improve medical treatments and, consequently, quality of life. Smart Health enhances the patient-medic relationship and empowers patients through actionable insights [23].
Some examples of Smart Health platforms are: • Kaa IoT is a versatile, multifunctional, open-source platform for the implementation of complete IoT solutions, connected applications, and intelligent products. Kaa has professional-grade IoT functions that can be connected and used to implement a vast majority of IoT use cases [20]. • Vista data vision is a comprehensive software solution perfect for data management and visualization environmental monitoring projects. Data are sent from the data logger to a server, where they are automatically converted into a system-compatible format and imported into the database. Then, the data can be viewed on the web-based interface [24].

•
InteliS integrates the most critical devices and machines in order to find solutions for remote diagnostics, preventive maintenance, resource optimization, quality improvement, or delivery time reduction [25].

of 14
There are several reasons to use IoT in Smart Health, such as easy data access, flexible communications between those who use the platform (e.g., patient-medic), and autonomous actions that significantly save such a scarce resource as time.
The general principle of the IoT for health utilization is as follows: patients wear sensors, which collect different types of data related to health such as heart rate, electrocardiography, etc. Data are then processed by applications of the User Terminals (UT). UTs may be connected with the gateway via short-range communication protocols, e.g., Bluetooth Low Energy [26,27]. The gateway is connected with the cloud or medical service, where the collected data are stored or processed. Data can also be located in Electronic Health Records (EHR), from which they could easily exported by, e.g., a doctor during the patient's visit.
To summarize, the key benefits of using IoT in Smart Health are the following: • Remote supervision. Gadgets can measure the patient's vital parameters and the corresponding data could be associated with the user's profile, where nurses and doctors can access them, analyze, and give feedback.

•
Personal care [25]. Wearable sensors can be used to track the individual's changes in health state. With these sensors, people with chronic diseases such as diabetes can monitor whether they are keeping their condition under control or not [28].

•
Building smart hospitals [29]. In such institutions, doctors use their smartphones as assistants to manage the data. The data do not require to be entered manually since the devices automatically collect and store them. In addition, the waiting times for patients are reduced [30].

Air Quality Index
Air quality is measured with the AQI. This parameter illustrates changes in the amount of pollution in the atmosphere. In general, we calculate AQI for major air pollutants: particle pollution, ground-level ozone, carbon monoxide, nitrogen dioxide, and sulfur dioxide. We use AQI to receive information about air quality and, consequently, to find out how to protect personal health.
There are different ways to measure AQI, for example, with: • Portable particulate monitor PM 10/PM 2.5 [31]; • Huma-i HI-150 (advanced portable air quality monitor indoor/outdoor that measures CO 2 , volatile organic compounds (VOC), particle matter, temperature, and humidity); • "Air quality meter" application that can measure the PM10 in an outdoor environment using a smartphone camera and many others.
One of the examples of an AQI estimation algorithm is PM NowCast. It was designed by the United States Environmental Protection Agency (USEPA) and is used for real-time reporting of the Air Quality Index (AQI) for PM (PM10 or PM2.5) [32][33][34][35]. In a general case, PM NowCast is calculated as where c 1 , c 2 . . . c 12 are PM concentrations over the last 12 h consequently (c 1 is the most recent value), and w is a variable that is calculated as where c max , c min are the maximum and the minimum PM concentration over the last 12 h, consequently. Based on the calculated PM NowCast, it is possible to determine AQI as where C low is the concentration breakpoint that is ≤ Nowcast, C high is the concentration breakpoint that is > Nowcast, I low , I high are the indexes breakpoints corresponding to C low , C high consequently. Based on the values of these parameters, a color code is defined (see Table 1). A color code is a straightforward and understandable indicator that assists people with no scientific background with evaluating the air quality in a certain location and take measures if it poses a danger to them. The interpretation of AQI for users in Table 1 involves dividing the population into two groups: the sensitive and the non-sensitive. Air pollution affects people differently and in the best case, a number of different factors such as age, lung diseases, lung capacity, etc., should be taken into account. In the proposed solution, one group is distinguished among the entire population, called "sensitive", which includes people with heart and/or lung diseases, asthma, circulatory disorders, elderly people, children, and athletes whose performance may decline due to insufficient air quality.

System Architecture
The platform contains the following hardware and software components (see Figure 1):

•
A module for the collection of data from the environment equipped with several sensors that allow the monitoring of the following parameters: relative humidity, air temperature, atmospheric pressure, suspended dust concentrations, and concentrations of gaseous pollutants (SO 2 , NO 2 , CO, CO 2 , VOC).

•
A multiprotocol gateway module that allows for collection of the data from the sensors and ensures their transmission to the cloud through Ethernet/4G/3G/GPRS communication protocols [35]. The decision support component [36], which is a module for processing the data collected from the sensors. The result of the decision support component analysis is transmitted further to the data presentation and visualization mode. • A data visualization module: this module is a UT, where the information can be observed [37]. The data displayed include the values of monitored pollutants, contextual messages for the general and sensitive population, and a chart with the values registered in the last hours. The proposed solution supports the following categories of sensors: 1.
Sensors and instruments for measuring chemical compounds in the atmosphere and weather sensors [38]. The developed web application queries these sensors through a set of Application Programming Interfaces (APIs) that model a Representational State Transfer (REST) mechanism.
Although some models are portable, due to the need to report a measurement in a particular area, the environment sensors are defined as a fixed type. They have an associated area in the system that can be an indoor location or a surface on a map.

2.
Garmin IoT Wearable bracelets are utilized for measuring the factors related to the physical and health status of the wearer [39]. These sensors are defined as mobile and are represented by the combination of a bracelet and a smartphone. The bracelet monitors the vital parameters of a user and transmits these data via BLE to the Garmin app installed on the smartphone. Through an API, the platform loads the data provided by the Garmin mobile application.

3.
Smartphones for detecting and reporting the presence of a user in an outdoor area using Global Positioning System (GPS) technology or in an indoor area using BLE beacons [40,41]. These sensors are also defined in the platform as mobile. In this case, the sensor is the smartphone that sends information about the presence, proximity, and location on the platform. The user needs to download the mobile application and activate it. Next, the user can go with it to various locations. The platform uploads the data provided by the mobile app through an API. 4.
In addition to the values measured by sensors, the developed platform will be also able to use data from an external source (through specialized interfaces) such as files exported from other platforms and applications.
Other wearable sensors are used to enable long-term continuous physiological and environmental monitoring, which is vital for the treatment and management of many chronic illnesses, neurological disorders, and mental health issues. In addition to providing a solution for real-time classification outside the lab, wearable sensors can provide an efficient way to collect a large amount of data.

Developed Decision Support Component
This section outlines the decision support algorithm description and provides some implementation details as well as some numerical results.

Algorithm Description
The main tasks of decision support are measuring AQI and its subsequent transformation into an easily interpretable form for any user. In the proposed algorithm, the composite AQI will be evaluated, taking into account the concentration values of all atmospheric pollutants. Then, it will be transformed into a color scale, with which everyone can understand the results and assess the risk of being in a particular area regarding air quality. When converting the index to a color scale, two components are distinguished: • The main element that is responsible for the color visualization. It is provided by the pollutant with the highest concentration compared to the limit values; • The secondary component is responsible for the color intensity. This component is determined by the levels of the other pollutants.
The proposed decision support algorithm has four main operational steps. The flowchart of the algorithm is given in Figure 2, while the steps are detailed below. Step 1: Assigning a risk class K 1 . . . K i to each pollutant P 1 . . . P n based on its average concentration measured hourly v n (see Table 1). There are four classes of risk severity of the negative impact of the concentration of pollutants on human health: low, moderate, high, and very high. Each of them corresponds to a predetermined limit concentration for each pollutant v 1...4,n , and each of them is assigned a specific color-green, yellow, orange, and red-in accordance with the severity of the risk. Note, the limit concentration value for the fourth class v 4,n is not defined and such a record is used for presentation ease.
Based on the average concentration measured during an hour v n in Table 2, each pollutant is assigned a specific class; see example in Table 3.

Class Pollutant P1 P2 … Pn
(very high) … ✓ Step 2: Determining the maximum risk class number , ∈ [1 … 4]. For this, class, the values are sorted in descending order, after which the maximum value is selected. For instance, in the example presented in Table 3, is 4.
Step 3: Calculation of the AQI composite index Step 4: Determining the basic color and intensity of the . As could be observed from (5), the basic color index of is given by the color associated with the maximum value . . .

Class Pollutant P1 P2 … Pn
(very high) … ✓ Step 2: Determining the maximum risk class number , ∈ [1 … 4]. For this, class, the values are sorted in descending order, after which the maximum value is selected. For instance, in the example presented in Table 3, is 4.
Step 3: Calculation of the AQI composite index Step 4: Determining the basic color and intensity of the . As could be observed from (5), . . .
Sensors 2020, 20, x FOR PEER REVIEW

P1 P2 … Pn
(very high) … ✓ Step 2: Determining the maximum risk class number , ∈ [1 … 4]. For this are sorted in descending order, after which the maximum value is selected. For example presented in Table 3, is 4.
Step 3: Calculation of the AQI composite index Step 2: Determining the maximum risk class number i max , i ∈ [1 . . . 4]. For this, class, the values are sorted in descending order, after which the maximum value is selected. For instance, in the example presented in Table 3, i max is 4.
Step 3: Calculation of the AQI composite index AQI comp Sensors 2020, 20, 5931 9 of 14 Step 4: Determining the basic color and intensity of the AQI comp . As could be observed from (5), the basic color index I color of AQI comp is given by the color associated with the maximum value class-K max . Its intensity is determined according to the value of the intensity index I intensity . Four gradations of intensity are provided as

Decision Support Component Implementation
The decision support component uses a complex structure of hardware and software subcomponents [42]. The hardware subcomponents are backend infrastructure, environmental sensors, and gateway equipment (Libelium Meshlium) [43]. Software components are represented by the LAMP package (Linux, Apache, MySQL, PHP) [44].
For the implementation of the decision support component, these steps were followed (see GitHub Repository for details: https://gist.github.com/BotezatuAndreea):

2.
Application of the air quality index calculation algorithm.

3.
Storing the values calculated above.

4.
Displaying the AQI graph for the last 24 h and the decision support component.

Experimental Results
The proposed decision support algorithm was implemented and tested in Bucharest, Romania. The tested pilot area is depicted in Figure 3.

Experimental Results
The proposed decision support algorithm was implemented and tested in Bucharest, Romania. The tested pilot area is depicted in Figure 3. In order to transfer the calculated AQI to the color scale, the tables of concentration limit values from [45] were used (see Table 4).  In order to transfer the calculated AQI to the color scale, the tables of concentration limit values from [45] were used (see Table 4). After concentration measuring pollutants are distributed by the class, K max and AQI are determined. Based on the results, the recommendations both for people in danger and the general population are provided in Table 5 [45]. Table 5. Recommendations [45].

Class Recommendations
People in Danger General Population K 1 (low) Enjoy your usual outdoor activities. Enjoy your usual outdoor activities.

K 2 (moderate)
Adults and children with lung problems and adults with heart problems, who experience symptoms, should consider reducing strenuous physical activity, particularly outdoors.
Enjoy your usual outdoor activities.

K 3 (high)
Adults and children with lung problems and adults with heart problems should reduce strenuous physical exertion, particularly outdoors, and particularly if they experience symptoms. People with asthma may find they need to use their reliever inhaler more often. Older people should also reduce physical exertion.
Anyone experiencing discomforts such as sore eyes, cough, or sore throat should consider reducing activity, particularly outdoors.

K 4 (very high)
Adults and children with lung problems, adults with heart problems, and older people should avoid strenuous physical activity. People with asthma may find they need to use their reliever inhaler more often.
Reduce physical exertion, particularly outdoors, especially if you experience symptoms such as cough or sore throat.
The results of the implementation are given in Figure 4. In the current version, the system measures concentrations of three pollutants (PM10, PM2.5, NO 2 ), calculates AQI, transfers it to the color scale that takes into account just the color index I color , and displays the results in the form of a bar chart, where the index value is plotted along the ordinate axis, and time is plotted along the abscissa axis (the discrete of the abscissa axis is one hour). In addition to the bar chart, the visual component of the decision support system, which will be displayed on the UT, includes the values of monitored pollutants based on which the AQI was calculated (PM10, PM2.5, NO 2 ) on the bottom right and contextual messages for the general and sensitive population from Table 4 on the bottom left.
In terms of limitations, it is significant to mention that although consistent results were obtained using this approach, only a limited amount of data and data acquisition devices were considered. Even if the system was designed and focused on scalability (by using different APIs corresponding to data acquisition devices and a REST approach), further testing (previsioned as future work) is required in order to confirm the compiling with the big data type of information flow. Thus, despite what was proposed in 5.1, the algorithm is not yet finalized, but the pilot system successfully achieves the main goal, namely, improving quality of life by collecting and analyzing data from networks of environmental sensors, wearable (portable) sensors, IT applications, and the human factor, while also representing the results in an understandable for everyone manner.

high)
find they need to use their reliever inhaler more often.
symptoms such as cough or sore throat.
The results of the implementation are given in Figure 4. In the current version, the system measures concentrations of three pollutants (PM10, PM2.5, NO2), calculates AQI, transfers it to the color scale that takes into account just the color index , and displays the results in the form of a bar chart, where the index value is plotted along the ordinate axis, and time is plotted along the abscissa axis (the discrete of the abscissa axis is one hour). In addition to the bar chart, the visual component of the decision support system, which will be displayed on the UT, includes the values of monitored pollutants based on which the AQI was calculated (PM10, PM2.5, NO2) on the bottom right and contextual messages for the general and sensitive population from Table 4   In terms of limitations, it is significant to mention that although consistent results were obtained using this approach, only a limited amount of data and data acquisition devices were considered. Even if the system was designed and focused on scalability (by using different APIs corresponding to data acquisition devices and a REST approach), further testing (previsioned as future work) is required in order to confirm the compiling with the big data type of information flow. Thus, despite what was proposed in Subsection 5.1, the algorithm is not yet finalized, but the pilot system successfully achieves the main goal, namely, improving quality of life by collecting and analyzing data from networks of environmental sensors, wearable (portable) sensors, IT applications, and the human factor, while also representing the results in an understandable for everyone manner.

Discussion
This paper proposes a decision support algorithm for air pollution monitoring visualization. The development of this component involved finding and taking into account the relationship between the concentrations of pollutants in the atmosphere and health effects, quantification methods, and notifications for sensitive people and the general population. Its target envisages calculating the AQI and its subsequent transformation into a color scale that can be easily understood by ordinary users.
The proposed solution allows a quick response and avoidance of places where air quality reaches levels that can harm people of different groups. The population is provided with easy-to-interpret notifications of the current state of air pollution on a graphical interface. Hospital departments specialized in lung problems using this AQI calculator also can operatively react and warn their patients about the potential danger. Thus, the proposed solution is expected to increase the general level of public health. This system cannot reduce the number of pollutant emissions into the atmosphere directly, but by providing information about the current state of the air in real-time in a convenient form publicly, it can push society to create the necessary conditions for changing the situation at the legislative level.
In the future, we plan to implement the entire algorithm including the intensity variety that was mentioned in Section 4, step 4. This modification will increase the degree of scale gradation, allowing one to determine the AQI more accurately. The extended scale of classes will also require a more detailed investigation of the degree of influence of the studied pollutants on people with different health states in order to make more thorough recommendations. The final step will be testing and optimization of the system in the same location.