sustainability

Article A Comprehensive Real-Time Indoor Air-Quality Level Indicator

Jungho Kang 1 and Kwang-Il Hwang 2,*

1 Department of Computer Science & Engineering, Soongsil University, 156-743, Korea; [email protected] 2 Department of Embedded Systems Engineering, Incheon National University, Incheon 402-772, Korea * Correspondence: [email protected]; Tel.: +82-32-835-8762

Academic Editor: Marc A. Rosen Received: 1 May 2016; Accepted: 30 August 2016; Published: 1 September 2016

Abstract: The growing concern about Indoor Air-Quality has accelerated the development of small, low-cost air-quality monitoring systems. These systems are capable of monitoring various indoor air in real time, notifying users about the current air-quality status and gathering the information to the central server. However, most Internet of Things (IoT)-based air-quality monitoring systems numerically present the sensed value per , making it difficult for general users to identify how polluted the air is. Therefore, in this paper, we first introduce a tiny air-quality monitoring system that we developed and, based on the system, we also test the applicability of the comprehensive Air-Quality Index (AQI), which is widely used all over the world, in terms of its capacity for a comprehensive indoor air-quality indication. We also develop design considerations for an IoT-based air-quality monitoring system and propose a real-time comprehensive indoor air-quality level indication method, which effectively copes with dynamic changes and is efficient in terms of processing and memory overhead.

Keywords: indoor air-quality; air-quality index; real-time air-quality monitoring

1. Introduction Over the last few decades, indoor air-quality has become a matter of growing concern. This concern was initially triggered by occupants’ reports of various indoor environments; specifically, occupants complained about a variety of unspecific symptoms, such as irritation or dryness of mucous membranes, burning eyes, headache, or fatigue. Considering that, in some cases, these symptoms could be related to elevated concentrations of specific pollutants, such as formaldehyde, in indoor air, increasing attention was devoted to determining climate conditions and chemical compounds in the air of rooms whenever people complained about bad indoor air-quality [1]. In addition to the growing concern about indoor air-quality, advances in the Internet of Things (IoT) and sensor technologies enabled the development of small, low-cost air-quality monitoring systems [2–4]. In particular, unlike professional air-quality monitoring instruments for a precise air-quality measurement, the IoT-based air-quality monitoring systems consisting of various communication technologies and cheap sensors are aimed to monitor air-quality of users’ space in real time and therefore allow users to purify indoor air using evacuation or air cleaner systems by identifying the current air-quality in real time. However, since most air-quality monitoring systems present the sensed numerical value of the corresponding pollutant as it is, it is difficult for non-expert users to identify how polluted the air is or what the criteria of each pollutant are. In fact, one of the major roles of IoT-based air-quality monitoring system is to notify the current air-quality status more intuitively and comprehensively in real time, rather than to provide general users with individual numerical information with respect

Sustainability 2016, 8, 881; doi:10.3390/su8090881 www.mdpi.com/journal/sustainability Sustainability 2016, 8, 881 2 of 15 to each pollutant. To achieve this aim, it is necessary for air-quality monitoring system to have the capability of notifying users of the information about the current air-quality using an intuitive display device that can indicate the air-quality level in real time. For ambient air-quality, a comprehensive air-quality index (CAQI) is already used in a number of nations [5–13] to present the polluted level of the air; people can thereby easily identify the current status of air-quality. However, unlike the CAQI for ambient air-quality that is regulated nationally or regionally, it is difficult to define CAQI for indoor air-quality, since the criteria of air-quality vary according to the indoor environment (e.g., home, parking station, factory, etc.). In addition, indoor air-quality can rapidly vary by several activities, such as ventilation, cooking, cleaning, and so on. Actually, the CAQI for ambient air is calculated by a section mean of pollutant values collected for 1 h or 24 h, so the index might not represent the present air-quality. Therefore, in this paper, we first introduce our tiny IoT-based air-quality monitoring system and propose a comprehensive indoor air-quality level indication method derived by CAQI for ambient air. In particular, the proposed method is capable of indicating comprehensive indoor air-quality level based on the information collected from low-cost sensors in real time, using an intuitive color LED display. The remainder of this paper is organized as follows. Section2 introduces a comprehensive air-quality index used in several countries. In Section3, initial experiments are conducted to test the usability of CAQI to indoor air-quality index, and some problems are presented. Furthermore, the proposed comprehensive real-time indoor air-quality level indicator is designed in Section4. The experimental results and evaluations are presented in Section5. Finally, conclusions of this paper are drawn in Section6.

2. Comprehensive Air-Quality Index An air-quality index (AQI) is a number used by government agencies [14] to communicate to the public how polluted the air currently is or how polluted it is forecast to become [15,16]. A high AQI value means that air-quality is poor and that the air can therefore impact people’s health. Therefore, different countries, such as Canada [5], Hong Kong [6], Mainland China [7], India [8], [9], South Korea [10], UK [11], Europe [12], and United States [13], have their own air-quality indices that correspond to different national air-quality standards. Even though their specific standards are slightly different, calculation and representation methods are similar across countries. For reference, an example of AQI used in South Korea is presented in Figure1. Computation of the AQI requires an air pollutant concentration over a specified averaging period obtained from an air monitor or model. Taken together, concentration and time represent the dose of the air pollutant. Health effects corresponding to a given dose are established by epidemiological research [17]. Air pollutants vary in potency and the function used to convert from air pollutant concentration to AQI varies by pollutant. Air-quality index values are typically grouped into ranges. Each range is assigned a descriptor, a color code, and a standardized public health advisory. For example, as shown in Figure1, South Korea divides the AQI level into four categories: Good, Moderate, Unhealthy, and Very Unhealthy. The index level of each pollutant is determined by Equation (1) [18]:

IHI − ILO I (n) = (C − BPLO) + ILO (1) BPHI − BPLO where:

I(n) = the (Air-Quality) index of pollutant n, C = the pollutant concentration,

BPLO = the concentration breakpoint that is ≤ C, BPHI = the concentration breakpoint that is ≥ C, ILO = the index breakpoint corresponding to BPLO, and Sustainability 2016, 8, 881 3 of 15

IHISustainabilitySustainability= the index 2016 2016, breakpoint,8 8, ,881 881 corresponding to BPHI. 33 of of 15 15 Equation (1) converts a concentration value into generalized index value with respect to its EquationEquation (1)(1) convertsconverts aa concentrationconcentration valuevalue intointo generalizedgeneralized indexindex valuevalue withwith respectrespect toto itsits breakpoint. Since the characteristics and value of each pollutant are different, the breakpoint of each breakpoint.breakpoint. Since Since the the characteristics characteristics and and value value of of each each pollutant pollutant are are different, different, the the breakpoint breakpoint of of each each levellevellevel is is is referred referred referred to to to in in in Figure Figure Figure2 2. .2. BasedBasedBased on on on the the the individualindividual individual air-qualityair-qualit air-qualityy value valuevalue (level), (level), CAQI CAQI CAQI is is isdetermined. determined. determined. In In Ingeneral, general, general, the the theworst worst worst index index index outoutout of of of all all all the the the pollutants pollutants pollutants becomesbecomes becomes CA CAQI.CAQI.QI. However, However, if if if there there there are are are two two two or or or more more more pollutants pollutants pollutants that that that show show show an an an “unhealthy”“unhealthy”“unhealthy” level, level, level, an an an additionaladditional additional weightwe weightight is isis added addedadded to to the the the pollutant pollutant pollutant wi wi withthth the the the worst worst worst index. index. index. For ForFor example, example, example, ininin Korea, Korea,Korea, if if thereif therethere are areare two twotwo “unhealthy” “unhealthy”“unhealthy” levels, levels,levels, 50 5050 is is addedis addedadded to to theto thethe calculated calculatedcalculated CAQI CAQICAQI and, and,and, if thereifif therethere are areare three “unhealthy”threethree “unhealthy” “unhealthy” levels, levels, 75levels, is added 75 75 is is added added to the to calculatedto the the calculated calculated CAQI. CAQI. CAQI.

FigureFigureFigure 1. 1. Air-Quality Air-Quality Index Index Description Description Description (South (South (South Korea) Korea) Korea) [10]. [10]. [10 ].

FigureFigure 2. 2.2. Ambient Ambient Air-Quality Air-Quality Air-Quality Index Index Index Table. Table. Table.

3.3.3. ExperimentsExperiments Experiments withwith a aa Tiny TinyTiny Air-Quality Air-QualityAir-Quality Monitoring Monitoring Monitoring System System System InInIn order orderorder to toto monitor monitor indoorindoor indoor air-qualityair-quality air-quality inin inrealreal real timetime time andand and toto gathergather to gather air-qualityair-quality air-quality information,information, information, wewe wedevelopeddeveloped developed a a tiny tiny a tiny air-quality air-quality air-quality monitoring monitoring monitoring system system system (see (see Figure Figure (see 3). Figure3). The The developed3 developed). The developed system system aims aims system to to provide provide aims to providecomprehensivecomprehensive comprehensive real-timereal-time real-time informationinformation information aboutabout air-quair-qu aboutalityality air-quality informationinformation information usingusing anan using intuitiveintuitive an intuitive colorcolor LEDLED color display,display, as as well well as as to to aggregate aggregate relevant relevant air-quality air-quality information information from from a a number number of of air-quality air-quality systems systems Sustainability 2016, 8, 881 4 of 15

Sustainability 2016, 8, 881 4 of 15 LED display, as well as to aggregate relevant air-quality information from a number of air-quality systemsthrough the through Internet. the In Internet. addition, In unlike addition, high-end unlike professional high-end professional air-quality measurement air-quality measurement devices, the devices,system is the composed system of is composedlow-end sensors of low-end and an sensors embedded and system, an embedded as an IoT system, device, as which an IoT makes device, it whichvery useful makes to itprovide very useful a low-cost to provide analysis a low-cost of the variation analysis ofand the trend variation of air-quality and trend associated of air-quality with associatedhome network with or home intelligent network smart or intelligent building or smart factory. building or factory. Our tiny air-quality monitoring system is composed of severalseveral communicationcommunication interfaces and sensors. ForFor communications, communications, Wi-Fi Wi-Fi is used is used to access to access the Internet, the Internet, and Bluetooth and Bluetooth enables for enables configuring for severalconfiguring functions several and functions connectivity and connectivity by users’ by smart users’ devices, smart devices, while the while RF the communication RF communication (IEEE 802.15.4g)(IEEE 802.15.4g) module module supports supports the system’s the system’s connection connection with home with network. home network. The system The also system includes also severalincludes sensors: several Sharpsensors: GP2Y1010AU0F Sharp GP2Y1010AU0F [19] for Particulate[19] for Particulate Matter (PM),Matter GSBT11 (PM), GSBT11 [20] for Volatile[20] for OrganicVolatile CompoundsOrganic Compounds (VOC), MQ7 (VOC), [21] MQ7 for Carbon [21] for monoxide Carbon (CO),monoxide and DHT22 (CO), and [22] forDHT22 Temperature [22] for andTemperature Humidity, and which Humidity, are essential which for an are indoor essential air-quality for an monitoring indoor air-quality system. Furthermore, monitoring additional system. add-onFurthermore, sensors additional can be connectedadd-on sensors through can externalbe connected sensor through interfaces: external UART, sensor SPI, interfaces: I2C, and UART, ADC, amongSPI, I2C, others. and ADC, among others. One ofof thethe major major goals goals of of the the system system design design is to is notify to notify the comprehensive the comprehensive status status of current of current indoor air-qualityindoor air-quality in real timein real using time an using intuitive an intuitive display. display. For that For purpose, that purpose, we first experimentedwe first experimented with the CAQIwith the method CAQI mentionedmethod mentioned in Section in2 .Section Since CAQI 2. Since is basedCAQI onlyis based on the only pollutants on the pollutants affecting ambientaffecting airambient and some air and pollutants some pollutants for indoor for air-quality indoor air-quality differ from differ those from of ambient those of air-quality, ambient onlyair-quality, two sensors only (COtwo sensors and PM) (CO were and considered PM) were considered in this experiment. in this experiment. In fact, this In fact, experiment this experiment was conducted was conducted to test theto test real-time the real-time capability capability of the of CAQI the CAQI method, method more, more specifically, specifically, the air-quality the air-quality index index (AQI) (AQI) of each of pollutant,each pollutant, since, since, due due to several to several activities activities such such as as ventilation, ventilation, cooking, cooking, cleaning, cleaning, and andso so on,on, indoor air-quality is apt to vary more rapidly thanthan ambientambient air.air.

Figure 3. The Prototype of a Real-Time Air-Quality Monitoring System. Figure 3. The Prototype of a Real-Time Air-Quality Monitoring System.

Table 1 shows the basic environment for our experiments. Figure 4 shows the results where AQI Table1 shows the basic environment for our experiments. Figure4 shows the results where AQI calculation is applied to the CO and PM sensor, respectively. In order to facilitate the analysis of the calculation is applied to the CO and PM sensor, respectively. In order to facilitate the analysis of the collected data, we used the time index number instead of the sampled time stamp information. The collected data, we used the time index number instead of the sampled time stamp information. The blue blue line represents the distribution of each value sensed at each time, while the yellow line line represents the distribution of each value sensed at each time, while the yellow line represents represents the AQI calculated at every sensing interval. In addition, to observe realistic indoor air environment, smoking and cooking were performed several times in the experiment room. It is important to note that the results suggest that the variation of AQI was significantly slower with Sustainability 2016, 8, 881 5 of 15 the AQI calculated at every sensing interval. In addition, to observe realistic indoor air environment, smokingSustainability and 2016 cooking, 8, 881 were performed several times in the experiment room. It is important5 to of note15 that the results suggest that the variation of AQI was significantly slower with respect to the rapid changesrespect in to the the real rapid sensing changes value. in the Moreover, real sensing when va AQIlue. Moreover, got seriously when worse, AQI thegot AQIseriously did not worse, promptly the respondAQI did to not those promptly changes respond due to to the those dependence changes due on theto the old dependence values. This on meansthe old that,values. when This we means apply thethat, AQI when method we toapply our the system, AQI method it does notto our notify system the, userit does about not thenotify current the user status about of air-qualitythe current in realstatus time. of air-quality in real time.

TableTable 1. 1.Experimental Experimental Environment. Location Embedded Networked System Architecture Lab, INU Location Embedded Networked System Architecture Lab, INU VOC VOCCO CO Type of Sensors PM10 Type of Sensors PM Temperature10 Temperature Humidity Collection Period 5 min Collection Period 5 min CollectionCollection Duration Duration 355 355 h (about 22 weeks)weeks) NumberNumber of of Collected Collected Data 4006 DataData Analysis Analysis Tool Tool R Studio [[23]23] PlottingPlotting Tool Tool Plotly [[24]24] DatabaseDatabase MySQL MySQL Workbench 5.15.1 CE CE

(a)

(b)

FigureFigure 4. Real-Time4. Real-Time AQI AQI Representation Representationfor for Air-Quality.Air-Quality. (a) CO variation variation and and CO CO AQI; AQI; (b ()b PM) PM value value and AQI. and AQI.

Sustainability 2016, 8, 881 6 of 15 Sustainability 2016, 8, 881 6 of 15

4.4. Designing Designing a aComprehensive Comprehensive Real-Time Real-Time Indoor Indoor Air-Quality Air-Quality Level Level Indicator Indicator

4.1.4.1. Overview Overview TheThe experimental experimental results results presented presented in in Section Section 3 3de demonstratemonstrate that that ambient ambient AQI AQI is not is not suitable suitable for real-timefor real-time air-quality air-quality representation representation and and that that it is it istherefore therefore necessary necessary to to develop develop a anew new index index or or indicatingindicating method method that that would would be be suitable suitable for for the the real-time real-time assessment assessment of air-qu of air-quality.ality. In addition, In addition, for IoT-basedfor IoT-based air-quality air-quality monitoring, monitoring, the thefollow followinging requirements requirements should should be considered: be considered:  Minimum overhead in processing: IoT devices generally use low-end MCU, so processing overhead • Minimum overhead in processing: IoT devices generally use low-end MCU, so processing overhead should be minimized. should be minimized.  Small memory usage: When calculating a comprehensive and individual air-quality index, • Small memory usage: When calculating a comprehensive and individual air-quality index, memory memory consumption should be minimized, since, due to cost-efficiency, the system has a small consumption should be minimized, since, due to cost-efficiency, the system has a small memory. memory. • Outlier or missing value handling capability: The sensors used in IoT-based air-quality systems can  Outlier or missing value handling capability: The sensors used in IoT-based air-quality systems can effectivelyeffectively cope cope with with several several outliers outliers or or missing missing values values caused caused by by frequent frequent sensing sensing interval interval and and concurrent-intensiveconcurrent-intensive operations. operations. • IndicationIndication representingrepresenting comprehensive comprehensive pollutants pollutants: In order: In order to notify to the notify current the air-quality current informationair-quality informationin real time, in an real intuitive time, indicationan intuitive method indication is necessary. method is necessary. • QuickQuick response response with with respect respect to to real-time real-time air-quality air-quality changes changes:: A A comprehensive comprehensive index index (or (or indicator) indicator) shouldshould be be able able to to quickly quickly respond respond to to dynamic indoor air-quality changes.

Therefore,Therefore, in in this this section, section, we we first first redefine redefine air- air-qualityquality level level indicator indicator consisting consisting of of pollutants pollutants affectingaffecting air-quality, andand then then a newa new index index (indicator) (indicator) calculation calculation method method to enhance to enhance a real-time a real-time ability abilityis developed. is developed.

4.2.4.2. CIAQI: CIAQI: Comprehensive Comprehensive Indoor Indoor Air-Quality Air-Quality Indicator Indicator WeWe newlynewly redefinedredefined the the level level category category table table for a for comprehensive a comprehensive indoor air-qualityindoor air-quality level indicator level indicator(see Figure (see5). Figure Unlike 5). ambient Unlike ambient AQI, the AQI, CIAQI the includesCIAQI includes VOC, CO, VOC, and CO, PM and10, PM which10, which are basic are basicpollutants pollutants for air-quality; for air-quality; in our in our experiments, experiments, the the concentration concentration level level of of each each pollutantpollutant is based based onon indoor indoor air-quality air-quality maintenance maintenance and and recommendation recommendation levels levels [25,26]. [25,26]. In In addition, addition, the the IAQI IAQI and and CIAQICIAQI calculation calculation method method is is the the same same as as in in Equation (1). (1). In In addition, addition, the the concentration concentration range range with with respectrespect to to each each pollutant pollutant is is configurable configurable by by a a speci specificfic user. user. The The range range value value will will vary vary according according to to the the indoorindoor environment environment used: used: home, home, pa parkingrking station, station, factory, factory, etc.

FigureFigure 5. 5. CIAQICIAQI Table Table (newly (newly defined). defined).

4.3.4.3. Real-Time Real-Time Enhancement Enhancement AsAs discussed discussed in in Section Section 4.2,4.2, one one of of the the critical critical problems problems of of AQI AQI is is that that the the AQI AQI calculation calculation method method basedbased on on the the section section average average is is too too slow slow in in responding responding to to the the current current air-quality, air-quality, which which makes makes it it difficultdifficult to to use use it it to to represent real-time air-quality data. data. Therefore, Therefore, in in order order to to effectively effectively cope cope with with currentcurrent air-quality air-quality variations, variations, we we employ employ a a more more dynamic dynamic moving moving average average method method in in the the real-time real-time CIAQICIAQI calculation. calculation. In In particular, particular, we we enhance enhance the the real-time real-time ability ability of of CIAQI CIAQI by by using using the the Exponential Exponential Moving Average (EMA) [27–30], which shows a good performance in smoothing outliers and requires a small memory usage. The EMA can be calculated as follows (see Equation (2)): Sustainability 2016, 8, 881 7 of 15

Moving Average (EMA) [27–30], which shows a good performance in smoothing outliers and requires Sustainability 2016, 8, 881 7 of 15 a small memory usage. The EMA can be calculated as follows (see Equation (2)):

S = α · Y + (1 − α) · S − (2) t =∙t + (1−) ∙t 1 (2) where αis is an an exponential exponential coefficient, coefficient, and andY tYist is the the current current concentration concentration value value (measured). (measured). Figure 66 illustratesillustrates thethe CIAQICIAQI computationcomputation flowflow whenwhen EMAEMA isis applied. applied. TheThe AIQAIQ monitoringmonitoring system performsperforms aa get_sensingget_sensing task task at at every every interval, interval, and and each each current current sensing sensing value value is obtained is obtained in the in theget_sensing get_sensing task. task. EMA EMA is performed is performed for for each each pollutant, pollutant, and and the the updated updated values values by EMAby EMA are are used used for forthe IAQIthe IAQI calculation; calculation; after theafter IAQI the decision IAQI decision process forprocess each sensor,for each CIAQI sensor, is determined CIAQI is accordingdetermined to accordingthe number to ofthe items number having of items BAD having (unhealthy) BAD index.(unhealthy) The finally index. determined The finally CIAQIdetermined level CIAQI is displayed level ison displayed a color LED. on a Therefore, color LED. anyone Therefore, without anyone any without environmental any environmental knowledge canknowledge easily identify can easily the identifycurrent indoorthe current air-quality indoor status. air-quality status.

Figure 6. Flowchart of Real-Time CIAQI.

5. Evaluations Evaluations Our evaluationevaluation aimed aimed to to test test how how well well the proposed the proposed CIAQI CIAQI method method can respond can torespond real variations. to real variations.For a more objectiveFor a more assessment, objective weassessment, also implemented we also implemented various calculation various methods calculation for CIAQI, methods namely, for CIAQI,the section namely, average the (AVG)section used average in ambient (AVG) AQI used and in theambient simple AQI moving and the average simple (SMA), moving which average uses (SMA),a sliding which window. uses a In sliding addition, window. for the In pollutantsaddition, fo consistingr the pollutants of CIAQI, consisting the total of CIAQI, volatile the organic total 10 volatilecompound organic (VOC), compound CO, and particulate(VOC), CO, matter and particulate (PM10) values matter were (PM collected) values in real were time. collected The rest in of real the time.experimental The rest environmentof the experimental was the environment same as shown was in the Table same1. Figure as shown9a–c showin Table the 1. variation Figure 9a–c of single show 10 pollutantthe variation index of persingle sensor: pollutant (a) VOC; index (b) per CO; sensor: and (c) (a) PM VOC;10. Actually, (b) CO; and the figures(c) PM show. Actually, each snapshotthe figures of showthe critical each snapshot section with of the respect critical to section the long-time with resp observation.ect to the long-time Each straight observation. line indicates Each astraight breakpoint line indicatesof concentration a breakpoint for each of concentration sensor, for example, for each Moderate, sensor, for Bad example, (unhealthy), Moderate, and so Bad on. (unhealthy), and so on.Before conducting the performance comparison of the section average, simple moving average, and EMA,Before we conducting conducted the an performance experiment tocomparison select the best of the window section size average, to be usedsimple for moving SMA. As average, shown andin Figure EMA,7, we in allconducted pollutants, an windowexperiment size to 12 select showed the abest superior window performance size to be used over otherfor SMA. window As shown sizes (24,in Figure 36). In 7, addition, in all pollutants, we also conducted window ansize experiment 12 showed to a select superior the best performance EMA coefficient over other (α). As window shown sizes (24, 36). In addition, we also conducted an experiment to select the best EMA coefficient (). As shown in Figure 8, when =0.3, the smoothing performance was the best. Therefore, we used the selected values, window size = 12 and =0.3, in the next experiment. Sustainability 2016, 8, 881 8 of 15 in Figure8, when α = 0.3, the smoothing performance was the best. Therefore, we used the selected = values,Sustainability window 2016, size 8, 881 = 12 and α 0.3, in the next experiment. 8 of 15

(a)

(b)

Figure 7. Cont. Sustainability 2016, 8, 881 9 of 15 Sustainability 2016, 8, 881 9 of 15 Sustainability 2016, 8, 881 9 of 15

(c) Figure 7. Smoothing variation with respect to different SMA sliding window sizes. (a) VOC FigureFigure 7. Smoothing7. Smoothing variation variation with with respect respect to different to different SMA slidingSMA sliding window window sizes. ( asizes.) VOC ( smoothinga) VOC smoothing with respect to different window sizes (12, 24, 36); (b) CO smoothing with respect to with respect to different window sizes (12, 24, 36); (b) CO smoothing with respect to different window different window sizes (12, 24, 36); (c) PM10 smoothing with respect to different window sizes (12, 24, different window sizes (12, 24, 36); (c) PM10 smoothing with respect to different window sizes (12, 24, sizes (12, 24, 36); (c) PM10 smoothing with respect to different window sizes (12, 24, 36). 36).

(a)

Figure 8. Cont. Sustainability 2016, 8, 881 10 of 15 Sustainability 2016, 8, 881 10 of 15

(b)

(c)

FigureFigure 8. 8.Smoothing Smoothing variation variation with withrespect respect toto different EMA coefficients coefficients ( (α).). (a ()a VOC) VOC smoothing smoothing with with respect to different EMA coefficients ( = 0.3, 0.5); (b) CO smoothing with respect to different EMA respect to different EMA coefficients (α = 0.3, 0.5); (b) CO smoothing with respect to different EMA coefficients ( = 0.3, 0.5); (c) PM10 smoothing with respect to different EMA coefficients ( = 0.3, 0.5). coefficients (α = 0.3, 0.5); (c) PM10 smoothing with respect to different EMA coefficients (α = 0.3, 0.5). Figure 9a shows the section average, simple moving average, and EMA, and these are Figure9a shows the section average, simple moving average, and EMA, and these are represented represented by VOC_AVG_index, VOC_SMA_index, and VOC_EMA_index, respectively. The real by VOC_AVG_index, VOC_SMA_index, and VOC_EMA_index, respectively. The real sensing value Sustainability 2016, 8, 881 11 of 15

Sustainability 2016, 8, 881 11 of 15 of VOC is represented by VOC_real_index. As shown in Figure9a, the section average method used sensing value of VOC is represented by VOC_real_index. As shown in Figure 9a, the section average in CAQI shows the worst performance over others. In addition, we found several critical points in method used in CAQI shows the worst performance over others. In addition, we found several critical which some methods show index levels that differ from the real sensing value; the critical points are points in which some methods show index levels that differ from the real sensing value; the critical designated by markers. At the critical point, both the real index level and the proposed EMA became points are designated by markers. At the critical point, both the real index level and the proposed bad;EMA however, became the bad; section however, average the section and simple average moving and simple average moving still showedaverage moderate.still showed These moderate. critical pointsThese are critical shown points not are only shown in VOC,not only but in alsoVOC, in bu othert also pollutants,in other pollutants, CO and CO PM, and (seePM, (see Figure Figure9b,c). Furthermore,9b,c). Furthermore, the critical the critical points points lasted lasted for quite for quite a long a timelong time when when the valuethe value rapidly rapidly changed changed after similarafter similar values values had lasted had lasted for a longfor a time.long time. Therefore, Therefore, these these results results proved proved that that indices indices based based on on the sectionthe section average average and SMA and methods SMA methods do not do effectively not effect copeively with cope rapid with changes rapid changes in air-quality. in air-quality. However, theHowever, index calculation the index methodcalculation based method on EMA based was on shownEMA was to effectivelyshown to effectively cope with cope rapid with changes rapid in air-quality.changes in In air-quality. addition, as In shown addition, in Figureas shown9d, thein Figure variations 9d, the of CIAQIvariations are basedof CIAQI on differentare based index on calculationdifferent index methods. calculation Like the methods. individual Like index,the individual CIAQI alsoindex, shows CIAQI several also shows critical several where critical the two methods,where the the two section methods, average the andsection SMA, average show an differentd SMA, show (old) indexdifferent level. (old) index level. InIn fact, fact, with with the the comparison comparison ofof thethe resultsresults in Figure 99 alone,alone, it is difficult difficult to to assure assure which which algorithmalgorithm is is the the best. best. Therefore, in in order order to to evalua evaluatete a more a more concrete concrete and andobjective objective performance, performance, we weemployed employed additional additional metrics, metrics, namely, namely, root rootmean mean square square error (RMSE), error (RMSE), variability, variability, and memory andmemory usage. usage.These These metrics metrics are useful are useful to perform to perform a quantitative a quantitative analysis analysis as to how as to each how algorithm each algorithm is fulfilled is fulfilled with withvarious various requirements requirements defined defined in Section in Section 4. RMSE4. (3 RMSE) is used (3) to is measure used to the measure accuracy the of accuracy the smoothed of the data compared to the raw data; to evaluate reliability, we observed the variability of each method. In smoothed data compared to the raw data; to evaluate reliability, we observed the variability of each addition, we also examined the required memory usage of each algorithm during runtime (see method. In addition, we also examined the required memory usage of each algorithm during runtime Equation (3)). (see Equation (3)). =r ∑ () −() (3) 1 N RMSE = [y(k) − yˆ (k)]2 (3) N ∑k=1 where () is a predicted value for k, and () is an observed value. For our experiments, () is wherethe realy(k )valueis a predictedsensed by valueeach sensor for k, for and k yandˆ(k) is( an) observed is the result value. calculated For our dynamically experiments, by EMAyˆ(k) andis the realSMA. value sensed by each sensor for k and y(k) is the result calculated dynamically by EMA and SMA. TableTable2 summarizes2 summarizes the the performance performance evaluation evaluation withwith respectrespect toto each metric. metric. The The results results demonstratedemonstrate that that the the proposed proposed CIAQI CIAQI (based (based on on EMA) EMA) is theis the most most adaptive adaptive to to the the changes changes of of real-time real- air-quality,time air-quality, despite despite smoothing smoothing outliers outliers well over well other over schemes: other sche AVGmes: and AVG SMA. and Furthermore, SMA. Furthermore, since the proposedsince the CIAQI proposed requires CIAQI a requires smaller a memory smaller memory usage for usage the for computation the computation than others,than others, it is it the is the most suitablemost suitable for a comprehensive for a comprehensive real-time real-time indoor air-qualityindoor air-quality level indicator level indicator for an IoT-basedfor an IoT-based small, low-costsmall, air-qualitylow-cost monitoringair-quality monitoring system. system.

(a)

Figure 9. Cont. Sustainability 2016, 8, 881 12 of 15 Sustainability 2016, 8, 881 12 of 15

(b)

(c)

(d)

Figure 9. IAQI per sensor and CIAQI. (a) VOC value and Index; (b) CO value and Index; (c) PM Figure 9. IAQI per sensor and CIAQI. (a) VOC value and Index; (b) CO value and Index; (c) PM value value and Index; (d) CIAQI comparison with different methods. and Index; (d) CIAQI comparison with different methods.

Table 2. Evaluation results. Table 2. Evaluation results. VOC CO PM10 CIAQI Smoothing AVG SMA EMA AVG SMA EMA AVG SMA EMA AVG SMA EMA VOC CO PM CIAQI method 12 12 0.3 12 12 0.3 12 12 10 0.3 12 12 0.3 SmoothingRMSE AVG 1.6785 SMA3.2993 1.2296EMA 8.8225AVG 11.0439SMA 5.7809EMA 18.2461AVG 19.3337SMA 14.7557EMA 13.7972AVG 16.3289SMA 10.8457EMA methodVariability 120.9963 0.129857 0.99800.3 0.911812 0.861912 0.96210.3 0.775128 0.751012 0.85490.3 0.779812 0.719412 0.87620.3 RMSEMemory 1.6785180 3.2993180 1.229630 8.8225180 11.0439180 30 5.7809 180 18.2461 180 19.3337 30 14.7557 180 13.7972 180 16.3289 30 10.8457 usage bytes bytes bytes bytes bytes bytes bytes bytes bytes bytes bytes bytes Variability 0.9963 0.9857 0.9980 0.9118 0.8619 0.9621 0.7758 0.7510 0.8549 0.7798 0.7194 0.8762 Memory 180 180 30 180 180 30 180 180 30 180 180 30 usage bytes bytes bytes bytes bytes bytes bytes bytes bytes bytes bytes bytes Sustainability 2016, 8, 881 13 of 15

6. Conclusions In this paper, deriving from the experiments based on the developed tiny air-quality monitoring system, we first demonstrated that the general CAQI representation for ambient air-quality is not directly suitable for an air-quality monitoring system. To address the problems, we redefined the level category table for a comprehensive indoor air-quality level indicator and enhanced the real-time ability of CIAQI by using exponential moving average (EMA). Through additional experiments, we compared the proposed CIAQI with section average (AVG) used in ambient AQI and simple moving average (SMA), which uses a sliding window. The results suggest that the proposed CIAQI (based on EMA) is the most adaptive to the change of real-time air-quality, despite smoothing outliers well over other schemes: AVG and SMA. Furthermore, since the proposed CIAQI requires a smaller memory usage for the computation than others, it is the most suitable for a comprehensive real-time indoor air-quality level indicator for an IoT-based small, low-cost air-quality monitoring system.

Acknowledgments: This research was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (Grant No. 2015R1D1A1A01059317). Author Contributions: All authors contributed to the development of the idea and experiments reported in this paper. More specifically, the first version of this paper was written by the corresponding author, Kwang-Il Hwang, while several technical experiments of this paper were led by the first author. Conflicts of Interest: The authors declare no conflict of interest.

Abbreviations The following abbreviations are used in this manuscript: AQI Air-Quality Index IoT Internet of Things VOC Volatile Organic Compound PM Particulate matters CO Carbon Oxide BP Break Point CAQI Comprehensive Air-Quality Index CIAQI Comprehensive Indoor Air-Quality Indicator EMA Exponential Moving Average SMA Simple Moving Average AVG Average RMSE Root Mean Square Error

References

1. Maroni, M.; Seifert, B.; Lindvall, T. Indoor Air-Quality: A Comprehensive Reference Book; Elsevier: Amsterdam, The Netherlands, 1995; Volume 3. 2. Open Source DIY Project: LiV RPi Indoor Air-Quality Monitor. Available online: http://www.livpi.com/ (accessed on 28 October 2015). 3. Szczys, M. Standalone Air-Quality Monitor Based around Raspberry Pi. Available online: http://hackaday.com/ 2012/12/11/standalone-air-quality-monitor-based-around-raspberry-pi (accessed on 11 December 2012).

4. Homemade Arduino Based Indoor Air-Quality CO2 PPM, Temperature, Humidity Monitor. Available online: https://www.youtube.com/watch?v=gBtDGUB8HO8 (accessed on 1 September 2012). 5. Environment and Climate Change Canada. Air Quality Health Index Categories and Health Messages—The AQHI Uses a Scale to Show the Health Risk Associated with the We Breathe. 2008. Available online: http://www.ec.gc.ca/cas-aqhi/default.asp?lang=En&n=79A8041B-1 (accessed on 11 November 2011). 6. Government of the Hong Kong Special Administrative Region. “Air-Quality Health Index”. Available online: https://en.wikipedia.org/wiki/Air_Quality_Health_Index_(Canada) (accessed on 9 February 2014). Sustainability 2016, 8, 881 14 of 15

7. Chinese Department. People’s Republic of China Ministry of Environmental Protection Standard: Technical Regulation on Ambient Air-Quality Index (Chinese PDF). Available online: http://kjs.mep.gov.cn/hjbhbz/bzwb/dqhjbh/jcgfffbz/201203/W020120410332725219541.pdf (accessed on 16 November 2015). 8. Lakshmi, R. India Launches Its Own Air-Quality Index. Can Its Numbers Be Trusted? Washington Post. 2014. Available online: https://www.washingtonpost.com/news/worldviews/wp/2014/10/17/india-launches- its-own-air-quality-index-can-its-numbers-be-trusted/ (accessed on 20 August 2015). 9. Ministry of the Environment and . Singapore, MEWR—Key Environment Statistics—Clean Air. 2007. Available online: http://unpan1.un.org/intradoc/groups/public/documents/APCITY/ UNPAN026593.pdf (accessed on 11 November 2011). 10. Air Korea. What’s CAI. Available online: http://www.airkorea.or.kr/eng/cai/cai1 (accessed on 25 October 2015). 11. COMEAP. Review of the UK Air-Quality Index. Available online: http://webarchive.nationalarchives.gov. uk/20140505104700/http://comeap.org.uk/documents/130-review-of-the-uk-air-quality-index.html (accessed on 5 May 2014). 12. Garcia, J.; Colosio, J. Air-Quality Indices: Elaboration, Uses and International Comparisons; Les Presses de l’cole des Mines: Paris, France, 2002. 13. AirNow. Air-Quality Index (AQI) Basics. 2011. Available online: https://www.airnow.gov/index.cfm? action=aqibasics.aqi (accessed on 8 August 2012). 14. International Air-Quality. Available online: https://www.airnow.gov/index.cfm?action=airnow. international (accessed on 20 August 2015). 15. National Service Corporate Image Web Team. NOAA’s National Weather Service/ Environmental Protection Agency—United States Air-Quality Forecast Guidance. Available online: http://airqualityweather.gov/ (accessed on 20 August 2015). 16. European Air-Quality Monitoring and Forecasting. Available online: https://www.gmes-atmosphere.eu/ services/raq/raq_nrt/ (accessed on 11 September 2015). 17. U.S. Environmental Protection Agency. Step 2—Dose-Response Assessment. Available online: https://www.epa.gov/risk (accessed on 20 August 2015). 18. U.S. Environmental Protection Agency. Technical Assistance Document for the Reporting of Daily Air-Quality—The Air-Quality Index (AQI). 2013. Available online: http://www.epa.gov/airnow/aqi- technical-assistance-document-dec2013.pdf (accessed on 1 December 2013).

19. Sharp. PM10 Sensor, GP2Y1010AU0F. Available online: https://www.sparkfun.com/datasheets/Sensors/ gp2y1010au_e.pdf (accessed on 1 December 2006). 20. Ogam Technology. VOC Sensor, GSBT11. Available online: http://www.ogamtech.com/page/page.php? pid=109853 (accessed on 12 September 2015). 21. HANWEI Electronics. CO Sensor, MQ7. Available online: https://www.sparkfun.com/products/9403 (accessed on 1 May 2014). 22. DFRobot. Temperature and Humidity Sensor, DHT22. Available online: http://www.dfrobot.com/index. php?route=product/product&product_id=1102&search=dht22&description=true#.V3SGssuwcy9 (accessed on 11 January 2016). 23. R Project. Available online: https://cran.r-project.org/ (accessed on 31 August 2016). 24. Plotly. Available online: https://plot.ly/feed/ (accessed on 29 August 2016). 25. The Ministry of Environment, Korea. Indoor Air-Quality Recommendation Level for New Apartment. 2015. Available online: http://www.law.go.kr/lsInfoP.do?lsiSeq=176456&efYd=20151118#0000 (accessed on 18 November 2015). 26. The Ministry of Environment. Indoor Air-Quality Maintenance Level; The Ministry of Environment: Seoul, Korea, 2014. 27. Imaizumi, H.; Nagata, T.; Kunito, G.; Yamazaki, K.; Morikawa, H. Power Saving Mechanism Based on Simple Moving Average for 802.3ad Link Aggregation. In Proceedings of the 2009 IEEE GLOBECOM Workshops, Honolulu, HI, USA, 30 November–4 December 2009; pp. 1–6. 28. Yu, J.; Kim, S.B.; Han, S. Comparison of exponential smoothing methods for prediction under non-trendy data. In Proceedings of the KIIE Fall Conference, Seoul, Korea, 15 November 2013; Volume 11, pp. 249–259. Sustainability 2016, 8, 881 15 of 15

29. Risteski, D.; Kulakov, A.; Davcev, D. Single Exponential Smoothing Method and Neural Network in One Method for Time Series Prediction. Cybern. Intell. Syst. 2004, 2, 741–745. 30. Zhuang, Y.Z.; Chen, L.; Wang, X.S.; Lian, J. A Weighted Moving Average-based Approach for Cleaning Sensor Data. In Proceedings of the 27th International Conference on Distributed Computing Systems (ICDCS ’07), Toronto, ON, Canada, 25–27 June 2007.

© 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).