Development of a Portable Sensor-based Indoor Air Quality Monitoring and Modeling System Using Artificial Intelligence Algorithm

Size: px
Start display at page:

Download "Development of a Portable Sensor-based Indoor Air Quality Monitoring and Modeling System Using Artificial Intelligence Algorithm"

Transcription

1 Development of a Portable Sensor-based Indoor Air Quality Monitoring and Modeling System Using Artificial Intelligence Algorithm MARY ANNE SY ROA AND ROSULA SAN JOSE REYES, PH.D Electronics, Computer, and Communications Engineering Department Ateneo de Manila University Katipunan Avenue, Quezon City PHILIPPINES meanne_roa03@yahoo.com rsjreyes@ateneo.edu Abstract: -The study focuses on the development of a portable system for indoor air monitoring and modeling realized by interfacing semiconductor gas sensors with microcontroller capable of wireless short-range communication through Zigbee Module. An algorithm was developed to merge data from all of the sensors and to provide an intuitive graphical interface conveying the state of pollution. To evaluate the degree of health risk, results are categorized as Good, Moderate, Unhealthy for Sensitive Groups, Unhealthy and Very Unhealthy. Air Quality Index (AQI) developed by the US Environmental Protection Agency (EPA) was used since no such measures are presently available in the Philippines, where the system is intended to be used. Tests were conducted in selected indoor spaces suspected to have high concentration of pollutants and successfully showed real-time pollutant levels and their conformance to air quality standards. For large rooms, several measurements at different points were necessary. An averaging algorithm is applied to eliminate variations in readings and to remove redundancies. The average testing period for one measurement is 5 minutes, with a few additional minutes per sample taken following the first. Potential application includes alerting individuals to danger and encouraging authorities to take necessary action to improve air quality. Key-Words: -Air Pollution Monitoring, Sensor Networks, Fuzzy Logic 1 Introduction People spend 90% of their time indoors [1] where they are exposed to far greater air pollution risks than outdoors. A growing body of scientific evidence has indicated that the air within homes and other buildings can be more seriously polluted than the outdoor air. On the average, the indoor levels of pollutants are two to five times higher than outdoor levels and can be as much as 100 times worse. [2] As a result, the threats to health may be of greater extent due to higher concentration and prolonged exposure. As a matter of fact, indoor air pollution (IAP) is ranked in the top five environmental risks to human health. [3] Reference [4] ranks IAP fourth in terms of contribution to disease and death leading to high mortality rates in developing countries. According to World Health Report 2002, IAP is responsible for the deaths of an estimated 1.6 million people annually. More than half of these death occur among the poor, the elderly and children who suffer disproportionately from its effects. The research aims to address indoor air quality measures in the Philippines today. Numerous studies have also engaged in the topic in the recent years particularly in systems for detecting and measuring indoor air pollutants. The sources are diverse and include substances such as ozone, benzene, carbon monoxide, sulphur dioxide, formaldehyde, naphthalene, nitrogen dioxide, polycyclic aromatic hydrocarbons, radon, trichloroethylene and tetrachloroethylene. Air quality is extremely difficult to assess given this wide range of pollutants. Recently developed system has limited capability measuring one or two elements merely.[5] [6] Moreover, most of them are stationary and deployed at fixed location significantly inhibiting monitoring in large- scale and leads to limited measurements. [7][8]This research infers the real-time and fine-grained air quality information by assessing ISBN:

2 several pollutants of major public health concern as named by WHO namely carbon monoxide, ozone, nitrogen dioxide and sulfur dioxide. [9] A major feature is portability, as opposed to existing system, which enables the device to be used in numerous classrooms, offices, kitchen and other indoor spaces. process is the development of the Fuzzy Inference System (FIS). Phase 2 of the design process is writing of the command line functions for further analysis using the FIS developed. Phase 3 is the development of a Matlab GUI that utilizes the algorithm written in Phase 2. 2 Design Consideration FIS Development The FIS is constructed using Matlab Fuzzy Logic Toolbox having the four gases concentration as input and Air Quality Index (AQI) as output.essentially, there are four fundamental stages in the construction of an FIS as illustrated in Figure 2. Fig. 1 Overall system block diagram 2.1 Hardware Consideration Figure 1 shows the overall system block diagram. The system was realized by interfacing several semiconductor gas sensors namely MQ7 for Carbon Monoxide (CO), MICS 2714 for Nitrogen Dioxide (NO2), MQ136 for Sulphur Dioxide (SO2) and MQ131 for Ozone (O3) with the PIC18F252 Microcontroller. The sensor array consists of simple-to-use gas sensor, suitable for sensing pollutant concentrations in the air. This sensor has a high sensitivity and fast response time. The sensor s output is analog. The drive circuit is very simple only requiring power in the heater coil of 5V, add a load resistance, and connect the output to the microcontroller. The microcontroller unit is ideal for low power and connectivity applications. Large amounts of RAM memory for buffering and Enhanced FLASH program memory make it ideal for embedded control and monitoring applications that require periodic connection with a personal computer. The microcontroller unit serves as the controller for the gas sensors in the system. It is also used to control the Zigbee to send the data gathered from the sensors remotely to the other Zigbee module installed in a personal computer. Fig. 2 Fuzzy System Development Cycle Figure 3 is a screen shot from Matlab FIS Editor illustrating the functional characteristic of the system which can be defined as: the system will output the AQI value by assessing the input level of each four gases as input. 2.2 Software Consideration The software design is divided into three phases. The design is divided into three phases. Phase 1 of the Figure 3 FIS Functional Model ISBN:

3 Suceeding step is to define the membership functions for input and output variables which are linguistically termed as follows: Inputs: very low, low, medium, high, very high; and Output: good, moderate, unhealthy for sensitive groups, unhealthy, very unhealthy. Triangular membership functions are chosen for the input variables and output variables. Figure 4 illustrates the arrangement of the fuzzy sets along their respective range. These values were adopted from the US EPA published AQI used to communicate to the public how polluted the air currently is. Figure 4 Membership Functions of (a) SO2 (b) NO2 (c) O3 (d) CO and (e) Output ISBN:

4 To effectively communicate to the public, EPA grouped AQI values into ranges that run from 0 to 300. Higher AQI value suggests greater level of air pollution and bigger health concern. Table 1 shows the AQI values and their corresponding health advisory. AQI Range Meaning Good 0 to 50 Air quality is considered satisfactory, and air pollution poses little or no risk Air quality is acceptable; however, for some pollutants Moderate there may be a moderate 51 to health concern for a very 100 small number of people who are unusually sensitive to air pollution. Unhealthy for Sensitive Groups Unhealthy Very Unhealthy 101 to to to 300 Members of sensitive groups may experience health effects. The general public is not likely to be affected. Everyone may begin to experience health effects; members of sensitive groups may experience more serious health effects. Health warnings of emergency conditions. The entire population is more likely to be affected. Table 1 AQI range and implication Defining the FIS rules followed the Intersection Rule Configuration (IRC) method, 625 rules were used to map the input variable to the output variable. These rules were also consisted with the EPA standards and defined by a matrix with 4 inputs varying from Very Low (VL), Low (L), Medium (M), High (H) and Very High (VH). The matrix provides one empty cell for each 4 input combination and is filled up with the suitable output varying from Good, Moderate, Unhealthy for Sensitive Groups, Unhealthy to Very Unhealthy. Table 2 provides the IRC matrix used to define the rules of the system. Suceeding step is to define the inference and defuzzification method to be applied. An inference method permits obtaining logical deductions of conclusions from premise. The Mamdani inference method is chosen as it is the most widely used method for fuzzy systems. The defuzzification process transforms the fuzzy set into meaningful values which can be used for the further processing in the command line. Centroid defuzzification method was used. Figure 5 shows the overall system block diagram with emphasis on the hierarchical processes involved in the designed fuzzy inference systems. Fig. 5FIS Hierarchical Block Diagram Final step in the FIS development is simulation. Fuzzy logic toolbox in Matlab provides this function through the use of rule viewer shown in Figure 6. Each column shows the set of membership functions for a particular input. Notice that each input variables (SO2, NO, O3, CO) has five membership functions corresponding to very low, low, medium, high, very high; and the output variable also has five membership functions corresponding to good, moderate, unhealthy for sensitive groups, unhealthy, very unhealthy. Each membership function in each set is associated with a particular rule and maps input variable values to rule output values. Table 2 FIS Rule Matrix ISBN:

5 voltage measurements to ppm values, maps input and output variables using FIS and returns AQI categorization as Good, Moderate, Unhealthy for Sensitive Groups, Unhealthy and Very Unhealthy.The program flowchart is depicted in Figure 7. Figure 6 FIS Simulation using Rule Viewer Table 3 summarizes the simulation configurations that were run. SO 2 NO 2 O 3 CO (ppb) (ppb) (ppm) (ppm) Output Table 3 FIS Simulation Fig.7Algorithm Flowchart Development of a Matlab GUI A GUI serving as the user-interface of the system was programmed to display the real time sensor data, the corresponding AQI value and hazard level. Figure 8 shows the system GUI Writing the command line functions FIS output should be further analyzed through the written Matlabcommand line functions. It involves the algorithm which receives the data input from the sensors, implements pre-processing to convert the Fig. 8System GUI 3 Implementation and Testing ISBN:

6 Tests were conducted in various indoor spaces and successfully showed real-time pollutant levels and their conformance to air quality standards. Doors and windows were closed during testing to better gasp the concentration of indoor air pollutants. The tests were carried out using 10 samples for every reading.indoor spaces- kitchen, billiards room and toilet- suspected to have high concentration of pollutants were considered as shown in Figure 4. Results from the actual field test were measured as predicted with the biliards room having the poorest AQI. Fig. 4Actual field test indoor set up 4 Conclusion An indoor air quality monitoring and modelling system was achieved through the integration of different gas sensors for CO, NO2, SO2 and O3. The portable prototype developed sends readings from the sensors to the server through Zigbee technology. The AQI modelling was implemented with the use of Matlabbased fuzzy logic algorithm. The US EPA published guidelines on AQI were used to define the rules of the fuzzy inference system. The algorithm returns the pollutants concentration level in ppm and their conformance to air quality standards. The output is categorized as Good, Moderate, Unhealthy for Sensitive Groups, Unhealthy and Very Unhealthy. Actual field test in selected indoor spaces showed results as predicted. The tests were carried out using 10 samples for every reading. Results revealed that the billiards room have very poor AQI owing to high concentration of CO. Readings from the kitchen environment, on the other hand, resulted to moderate air quality. To further analyze system performance, test were also carried through the use of substances that contains high amount of the selected pollutants. Increasing the amount of gas introduced resulted to increase in ppm concentration of the pollutant and a corresponding poorer AQI. References [1] U.S. Environmental Protection Agency, Report to Congress on indoor air quality: Volume 2,EPA/400/1-89/001C. Washington, DC., [2] Wallace, L. A., The total exposure assessment methodology (TEAM) study: summary and analysis, EPA/600/6-87/002a. Washington, DC., [3] U.S. Environmental Protection Agency, EPA's Approach & Progress' in Targeting Indoor Air Pollution, EPA/43/F-93/003. Washington, DC., [4] World Health Organization, The World Health Report 2002 : Reducing Risks, Promoting Healthy Life. Geneva, [5] Y. Jiang, K. Li, L. Tian, R. Piedrahita, Y. Xiang, O. Mansata, Q. Lv, R. P. Dick, M. Hannigan, and L. Shang. MAQS: A personalized mobile sensing system for indoor air quality monitoring. In Proc. Int. Conf. Ubiquitous Computing, 2011, pp [6] J. Lozano, J. Suarez, P. Arroyo, J. Manuel, and F. Alvarez. Wireless Sensor Network for Indoor Air Quality Monitoring. AIDIC, Chemical Engineering Transactions, vol. 30, [7] Y. Xiang, R. Piedrahita, R. P. Dick, M. Hannigan, Q. Lv, and L. Shang, A hybrid sensor system for indoor air quality monitoring, in Proc. Int. Conf. Distributed Computing in Sensor Systems, 2013, pp [8] B. Chamberlain, C. Branch, G. Jordan, and X. Li. Applications of wireless sensors in monitoring Indoor Air Quality in the classroom environment, RET Project at University, [9] World Health Organization, Air Quality Guidelines Global Update 2005, Denmark, ISBN: