Implementation of an Environmental Quality and

0 downloads 0 Views 3MB Size Report
quality and harmful gases monitoring system based on cloud. Ε Chao-Tung ... (IoT). There are also many air quality start-up projects or ... To develop IoT architecture using Zigbee wireless net- ... The trend of connecting devices and exchange data will cre- ..... 5 The way server get sensor format and parse the package. Fig.
Implementation of an Environmental Quality and Harmful Gases Monitoring System in Cloud Chao-Tung Yang, Shuo-Tsung Chen, Chih-Hung Chang, Walter Den & ChiaCheng Wu Journal of Medical and Biological Engineering ISSN 1609-0985 J. Med. Biol. Eng. DOI 10.1007/s40846-018-0383-0

1 23

Your article is protected by copyright and all rights are held exclusively by Taiwanese Society of Biomedical Engineering. This eoffprint is for personal use only and shall not be self-archived in electronic repositories. If you wish to self-archive your article, please use the accepted manuscript version for posting on your own website. You may further deposit the accepted manuscript version in any repository, provided it is only made publicly available 12 months after official publication or later and provided acknowledgement is given to the original source of publication and a link is inserted to the published article on Springer's website. The link must be accompanied by the following text: "The final publication is available at link.springer.com”.

1 23

Author's personal copy Journal of Medical and Biological Engineering https://doi.org/10.1007/s40846-018-0383-0

ORIGINAL ARTICLE

Implementation of an Environmental Quality and Harmful Gases Monitoring System in Cloud Chao‑Tung Yang1   · Shuo‑Tsung Chen2 · Chih‑Hung Chang3 · Walter Den4 · Chia‑Cheng Wu1 Received: 15 August 2017 / Accepted: 22 December 2017 © Taiwanese Society of Biomedical Engineering 2018

Abstract The improvement of environmental quality is aligned with the betterment of life quality. Poor air quality has a greatest impact on people health, it links to cancer, long-term harm to cardiovascular and respiratory systems. Conversely, safe air quality free of harmful gases such as formaldehyde, volatile organic compounds and carbon monoxide helps to prevent disease and other health problems. The application of information technology can greatly enhance the effectiveness of ensuring good air quality. Therefore, the implementation of environmental quality and harmful gases monitoring system is beneficial to manage indoor air quality. In this work, we built an environment quality monitoring system, which can adjust the indoor air quality and monitor the concentration of formaldehyde, volatile organic compounds and carbon monoxide. If the environment comfort value is out of the standard, the system will give notification if the concentration of harmful gases exceeds the standard, and activates air ventilation and purification devices. With these real-time data, the proposed system can help people make right and timely decisions, and act in time to maintain a healthy environment in the monitored area. Keywords  Preventive healthcare · Environmental comfort index · Environmental Quality · Monitoring System

1 Introduction

* Chao‑Tung Yang [email protected] Shuo‑Tsung Chen [email protected] Chih‑Hung Chang [email protected] Walter Den [email protected] Chia‑Cheng Wu [email protected] 1



Department of Computer Science, Tunghai University, Taichung City 40704, Taiwan, ROC

2



College of Future, Bachelor Program in Interdisciplinary Studies, National Yunlin University of Science and Technology, Yunlin 64002, Taiwan, ROC

3

College of Computing and Informatics, Providence University, Taichung City 43301, Taiwan, ROC

4

Department of Environmental Science and Engineering, Tunghai University, Taichung City 40704, Taiwan, ROC



The improvement of environmental quality is aligned with the betterment of life quality. Poor air quality has a great impact on the wellbeing of the inhabitants, and has been linked to cancer, long-term harm to cardiovascular and respiratory systems. In the 1970s, people began to notice the link between suspended particulate pollution and health problems. In the United States, the number of deaths per year due to the pollution of suspended particulates is about 22,000-52,000 (data for Year 2000), and in Europe this figure is as high as 200,000. World Health Organization (WHO) researches have pointed out many diseases are related to air quality. For example, high concentration of carbon monoxide (CO) triggers headache, nausea, sleepy hypoxia symptoms, even leading to death. If the indoor air quality is poor, it can lead to physical discomfort, poor health (such as headache, difficulty of breathing, fatigue or vomiting, etc. Conversely, safe air quality free of harmful gases such as formaldehyde, volatile organic compounds (VOC) and CO helps to prevent disease and other health problems. However, it is impossible to control the air quality without the support of information technology. Therefore, the implementation of environmental quality and harmful gases monitoring system based on cloud

13

Vol.:(0123456789)

Author's personal copy

C.-T. Yang et al.

computing is beneficial to managing indoor air quality in schools, offices, and other buildings. Recently, environmental sensing technology is growing rapidly and has been implemented to deal with many environmental concerns (e.g. climate change, water resource deficit, coastal and terrestrial ecology degradation and air quality deterioration). This sensing technology necessitate continuous and frequent data collection. The development of sensor networking capabilities coordinating with data acquisition, communication, and storage has also been essential to the success of environmental sensing technology. Moreover, the development of data mining and big data analytic techniques has further expanded the applicability of environmental sensing. Sensor network technologies are not only capable of capturing the essential environmental data real-time with a more cost-effective and efficient manner, but also provide the data analytic for decision support system. Yan et al. [1] presented a design scheme of gas monitoring system based on Zigbee and General Packet Radio Service (GPRS). The gas data is collected from the gas sensor and it uploads to the Azure Resource Manager (ARM) gateway using Wireless Sensor Network (WSN) technology Zigbee. It can intelligently control the local gas valve, exhaust fan, alarm lights and windows through the WSN after data analysis. It also reminds the users to remotely control the household gas and control system after receiving alarm by GPRS technology in time. Xu et al. [2] proposed a monitoring system of high performance fuel gas based on RS485 bus communication mode. The system comprised of a central controller and a unit controller. Jian and Wei [3] presented a single network for traditional wired and monitoring systems in the wiring, coverage, scalability, compatibility using Zigbee technology-based, Global System for mobile communications (GSM) technology, and supplemented by the master–slave wireless network. To put it differently, we proposed our work based on integration of cloud computing and internet of things (IoT). There are also many air quality start-up projects or applications which have been proposed. For example, Airbox (https​://airbo​x.edima​xclou​d.com/) which is supported by Institute of Information Science, Academia Sinica and Edimax, or some other commercial products for air quality monitor devices. The objective of this work is to focus on building an intelligent indoor environment monitoring system by taking advantage of cloud computing technology. Such applications are especially in demand for buildings to comply with indoor air quality regulation. For example, the recently promulgated indoor air quality management act in Taiwan mandated a set of threshold concentrations for pollutants of concern including CO and carbon dioxide ­(CO2), formaldehyde, VOC, total bacteria and fungi, particulate matters, and ozone. In this work, we detect and analyze air quality in medical areas such as, emergency

13

room, administrative areas, outpatient rooms, and ward areas to develop front ends of the entire system. Thus, it can also be used to further recognize the origin of air pollutions, record the time series of air quality value, provide the analysis report to the medical staff, and develop a database of employee health. In the meantime, we have established a system information platform to provide necessary features, such as the storage of electronic health records and air monitoring, and archived data collected by our devices in a secure and standard format. Through this real-time monitoring system, an administrator can monitor the air quality in the whole area, and notify the authorized personnel by communication system to take a decision in order to decrease the infection rate. In addition, the platform also has machine learning ability, provided with data collected and analyzed by field detection of medical facilities. Besides monitoring functions, the proposed platform can be used to prevent outbursts of major diseases. The integration of sensing, sensor networking, cloud computer, data mining and analytics has also driven many applications. For example, the concept of IoT has introduced personal devices ranging from individual physiological monitoring to environmental quality monitoring, including physical (i.e., temperature, pressure, humidity) and chemical (air quality) of a confined space. These applications can be expanded to a new generation of medical care system [4, 5] (e.g., preventive health care), building management system [6, 7] (e.g., triggering response measures to prevent building-related syndromes or to attain energy-saving goals), occupational safety system (e.g., plant-wide emergency response to hazard events) [8, 9], and urban infrastructure system [10, 11] (e.g., monitoring of water-supply contamination and leaking; petrochemical pipeline leaking). Consequently, the volume of data to be collected, transmitted, transacted, stored, analyzed, and then visualized become challenging to conduct a realtime environmental monitoring and analysis sensor network system into an intelligent environmental monitoring system. The aim of the study is to develop an environmental quality and harmful gases monitoring system in cloud computing environment. Specific goals are: • To develop IoT architecture using Zigbee wireless net-

work sensor

• To develop cloud computing system consist of primary

and secondary system architecture

• To develop web services as a bridge for interoperable

Machine-to-Machine (M2M) interaction over a network.

The rest of this work is described as follows. In Sect. 2, we describe some background knowledge for later use. Section 3 describes the system architecture. Section 4 shows

Author's personal copy Cloud-based Air Quality Monitoring System

experimental results for the proposed system. Section 5 provides conclusions and future work.

2 Background and Preliminaries The proposed system integrates the technology of sensing, sensor networking, cloud computer, and analytics to drive the application of environmental sensing to community and personal levels. The integrated technologies are introduced in this section.

2.1 Internet of Things (IOT) IoT technology is gaining traction almost in many sectors. The trend of connecting devices and exchange data will creating opportunities to improve efficiency and reduce human intervention. As a result, the smart technology breakthrough start to emerge, such as smart homes, smart cities, intelligent transportation, etc. With Web 4.0, IoT reached M2M, grand integration/multiple attributes integration (MAI) and cloud computing-based software as a service (SaaS). IoT uses appropriate information security system, providing safe, guided and even individual real time monitoring system, capable to achieve everything with high efficiency, high saving energy, high security and environmental protection in an integrated service. IoT and its related TaaS (token as a service) compose the major structure of Web 4.0 based on Web 3.0. As shown in Fig. 1, the structure of IoT is divided into three layers: perception layer, network layer and application layer. Perception layer consists of a variety of information capturing and identifying sensing elements. Network layer consists of all kinds of wireless transmission technology.

Application layer of IoT consists of a variety of applications, such as environmental monitoring and urban management. The application support layer, a sub-layer between the network layer and application layer, is primarily responsible for providing various types of platforms, series transmission network and application services.

2.2 Sensor Network Sensor network consists of autonomous sensors that spatially distributed in order to monitor physical or environmental conditions, such as motion, pressure, vibration, temperature, pollutants, etc. Each nodes of one or more sensors are equipped with a radio transceiver, a microcontroller and a very small energy (usually battery). Recently, ZigBee, a WSN protocol become popular for sensor network implementation. Many people use ZigBee [12, 13] to deploy their sensor network in an environment. Mainly, ZigBee Alliance which is developed since 1998 by Honeywell’s development component. IEEE 802.15.4 standard specification is used for the media access layer and physical layer. The advantages of using ZigBee are high speed, low power, low cost, support a large number of network nodes to support multiple network topologies, low complexity, fast, reliable and safe. As Fig. 2 shown, we use star topology to implement our sensor network.

2.3 ZigBee ZigBee is a wireless network of high level communication protocols with the ability to provide small cost, low-power, high speed and using digital radios based on an IEEE 802.15.4 standard for personal area networks. In fact, ZigBee is the solution for IoT implementation.

Fig. 1  Internet of Things architecture

13

Author's personal copy

C.-T. Yang et al.

Fig. 3  ZigBee coordinator

Fig. 2  Sensor network

From mesh network to the universal language that connects smart devices to work together. This ability enables ZigBee networks to be formed ad-hoc, with no centralized control or high-power transmitter/receiver which is able to reach all of the devices. Any ZigBee device can be tasked with running the network [14]. ZigBee is designed for applications that require a low data rate, long battery life, and secure networking. With the rate of 250 kbit/s, it will best suited for time series data or a single signal transmission from a sensor or input device. Applications such as, lights controller, temperature tester, electrical meters with in-home-displays, traffic management systems, and other consumer and industrial equipment could be suitable using ZigBee. That is to say, ZigBee is designed to create a simpler and less expensive wireless personal area networks (WPANs), such as bluetooth or wi-fi. ZigBee protocol layers consist of four layers, from bottom to top are the physical layer (PHY) and media access (MAC) layer, network layer (NWK), application layer (APL). The role of the network devices can be divided into ZigBee coordinator, ZigBee router, and ZigBee end devices. Figure 3 shows a ZigBee coordinator used in the experiment.

2.4 Cloud Computing The main features of Cloud computing are classified into service models and deployment models [15].

13

2.4.1 Service Models Cloud computing is a computing approach based on the Internet. In this way, resources can be shared by the required hardware and software available for computers and other devices. Users no longer need to understand the ”cloud” in the details of the infrastructure, do not possess the necessary professional knowledge, without direct control. Cloud computing describes a new Internet-based services to increase IT use and delivery models, usually involving the Internet is easy to provide dynamic and often is a virtual extension of the resource. The cloud is network, Internet a metaphor. Cloud computing can be considered include the following levels of service: infrastructure as a service (IaaS), Platform as a service (PaaS) and SaaS. • IaaS: Users can follow the required level of computer

and network equipment and other resources, to the service provider subscription service, and may require changes to settings, and service provider by users of the central processing unit (CPU), memory, disk space, network load to calculate the costs. • PaaS: development of services vendors who rented to a computer, this computer has all the necessary hardware and software developer environment; or to provide application development to market, in accordance with the amount of traffic with the use of resources Developer fees. • SaaS: the software stored in the data center to provide users network access services, according to period or pay-per-order the type of charge.

Author's personal copy Cloud-based Air Quality Monitoring System

2.4.2 Deployment Models • Public cloud: Public cloud provides applications, storage,

and other resources available to the public by the service provider. • Hybrid cloud: Hybrid cloud refers to two or more clouds (private, community or public) remains the only entity, but combined together to provide the benefits of multiple deployment modes. • private cloud: The private cloud is a cloud infrastructure operation only for a single organization, whether it is internal management or hosted by a third party, internal or external.

2.5 Hadoop Apache Hadoop is an open-source software framework for storage and large-scale processing of datasets on clusters of commodity hardware. It develops for reliable, scalable, distributed computing. All the modules in Hadoop are designed with a fundamental assumption that hardware failures (of individual machines, or racks of machines) are common and thus should be automatically handled in software by the framework. Apache Hadoop’s MapReduce and Hadoop distributed file system (HDFS) components originally derived respectively from Google’s MapReduce and google file system (GFS) papers. Supporting applications on large clusters of commodity hardware to build, providing a distributed file system for storing data of all compute nodes, which brought a very high bandwidth for the entire cluster. The Apache Hadoop framework consists of the following modules: • Hadoop Common: Contains libraries and utilities

required by other Hadoop modules.

• HDFS: HDFS stores data on commodity machines,

through the cluster to provide a very high total bandwidth. • Hadoop yet another resource negotiator (YARN): The resource management platform responsible for managing cluster computing resources and using them to schedule user applications. • Hadoop MapReduce: The programming model for massive data processing.

Hadoop HDFS is part of the core of the project. HDFS is a distributed, scalable, and portable file system written in Java for the Hadoop framework. As shown in Fig. 4, HDFS has a master/slave architecture. HDFS uncovers the file system namespace, and permits users to store data in the file. The inside of a file is divided into one or more blocks that are stored in a group of DataNodes. • NameNode: Processing file access requests from client-

side and to Store the metadata of each file in HDFS.

• Secondary NameNode: Help Namenode consolidation

and updating of metadata and when Namenode broken, it can be done manually by Namenode. • DataNodes: DataNodes is where the data store at. Which listen the arrangements of Namenode, and let the client access.

2.7 MapReduce MapReduce is a programming model and an associated implementation for processing and generating large data sets with a parallel, distributed algorithm on a cluster. MapReduce is a software framework for easily writing applications which process vast amounts of data (multi-terabyte datasets) inparallel on large clusters (thousands of nodes) of commodity hardware in a reliable, faulttolerant manner. Programs written in this functional style are automatically parallelized and executed on a large cluster of commodity machines. The runtime system takes care of the details of partitioning the input data, scheduling the program’s execution across a set of machines, handling machine failures, and managing the required inter-machine communication. This allows programmers without any experience with parallel and distributed systems to easily utilize the resources of a large distributed system. The MapReduce framework consists of a single master JobTracker and one slave TaskTracker per cluster-node. The master is responsible for scheduling the jobs’ component tasks on the slaves, monitoring them and

2.6 HDFS HDFS is a distributed file system designed to run on commodity hardware. HDFS was originally built as infrastructure for the Apache Nutch search engine project. Apache

Fig. 4  HDFS architecture

13

Author's personal copy

C.-T. Yang et al.

re-executing the failed tasks. The slaves execute the tasks as directed by the master.

2.8 Home Builders Association of the Sioux Empire (Hbase) HBase is an open source, non-relational, distributed database modeled after Google’s BigTable and written in Java. It is developed as part of Apache Software Foundation’s Apache Hadoop project and runs on top of HDFS (Hadoop Distributed Filesystem), providing BigTable-like capabilities for Hadoop. HBase is a column-oriented database management system that runs on top of HDFS. It is well suited for sparse data sets, which are common in many big data use cases. An HBase system comprises a set of tables. Each table contains rows and columns, much like a traditional database. Each table must have an element defined as a Primary Key, and all access attempts to HBase tables must use this Primary Key. HBase has three main components: the client library, a master server and a number of region servers. When system start-up and running, region servers can be dynamically added or removed to adapt workloads. The master server is mainly responsible for allocating regions of the region server and accomplish the task by Apache Zookeeper, which offers reliable, persistent, high availability, and collaboratively distributed service.

2.9 Apache Server The Apache Hyper Text Transfer Protocol (HTTP) Server, commonly re-ferred to as Apache, is a web server software program notable for playing a key role in the initial growth of the World Wide Web. In 2009 it became the first web server software to surpass the 100 million website milestone. Apache was the first viable alternative to the Netscape Communications Corporation web server (currently named Oracle iPlanet Web Server). Typically, Apache is run on a Unixlike operating system, and was developed for use on Linux. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. The application is available for a wide variety of operating systems, including Unix, Free Berkeley Software Distribution (FreeBSD), Linux, Solaris, Novell NetWare, OS X, Microsoft Windows, OS/2, TPF, and eComStation. Released under the Apache License, Apache is open-source software. Apache was originally based on NCSA HTTPd code. The NCSA code has since been removed from Apache, due to a re-write. Since April 1996 Apache has been the most popular HTTP server software in use. As of December 2012 Apache was estimated to serve 63.7% of all active websites and 58.49% of the top servers across all domains.

13

2.10 My Structured Query Language (MySQL) MySQL is the most used open source relational database management system (RDBMS) in the world that operate as a server providing multi-user access to the databases. The MySQL project source code is developed under the terms of the GNU’s Not Unix (GNU) General Public License, as well as under a variety of proprietary agreements. At first, MySQL was owned and sponsored by a single for profit firm, the Swedish company MySQL AB. Then, Sun Microsystems bought MySQL; not long after that, sun was acquired by oracle corporation, which became the official owner of MySQL. MySQL is a popular choice of database for use in web applications, and is a central component of the widely used LAMP open source web application software stack (and other ‘AMP’ stacks). LAMP is an acronym for Linux, Apache, MySQL, Perl/PHP/Python. Most of open source software projects use MySQL with a full featured database management system. Such as, TYPO3, Joomla, WordPress, phpBB, MyBB, Drupal and other software. There is also paid edition for commercial use which offer complete functionality version. Many high profile and large scale World Wide Web products use MySQL. For instance, Wikipedia, Google (though not for searches), Facebook, Twitter, Flickr, Nokia.com, and YouTube. MySQL Cluster [16] for MySQL [17] is a distributed computing environment of high practical, high redundancy version. It uses the NDB Cluster storage engine, allowing a cluster to run multiple MySQL servers. The storage engine is provided in the binary version of MySQL 5.1, and RPM compatible with the latest Linux version provides. (Note that, in order to get MySQL cluster feature, you must install the mysql-server and mysql-max RPM). Operating systems able to run the MySQL cluster include Linux, Mac OS X and Solaris. Some users informed of successfully running FreeBSD on MySQL Cluster, but the MySQL AB Company has not officially supported this feature. We are making efforts to get MySQL Cluster to run on all operating systems supported by MySQL, including Windows. There are three types of cluster nodes for the lowest MySQL Cluster configuration. These three types of nodes are • Management (MGM) node: the role of such nodes is to

manage other nodes inside the MySQL cluster, such as nodes providing configuration data, starting and stopping, or doing the backup. As these nodes manage the configuration of the other nodes, they should be started before the other nodes. MGM node is evoked by the ndb_mgmd command. • Data node: This kind of nodes is used to store data in the cluster. The number of data nodes is the same as the number of replicas and is multiple of fragments. For

Author's personal copy Cloud-based Air Quality Monitoring System

example, if there are two replicas and each replica has two fragments, then there are four data nodes. It does not need to have more than one replica. Data node is evoked by using the ndbd command. • SQL node: This kind of nodes is used to access cluster data nodes. For MySQL Cluster, SQL nodes are conventional MySQL servers that use Network Database (NDB) Cluster storage engines. Typically, SQL node is evoked by using the mysqld-ndbcluster command, or by using mysqld with adding ndbcluster option to my.cnf. The cluster log and configuration file is governed by Management servers (MGM nodes). Every node within the cluster admit configuration data from the management server and needs a way to locate the management server. The data node will send messages of incidents to the management server in order to write the information in the cluster log. Cluster Configuration of the cluster engages configures individual nodes in the cluster, and sets up separate communication links between nodes. For the purpose of having homogeneous storage nodes, in terms of the processor capacity, memory space and bandwidth. Additionally, to have a single point of configuration, all cluster configuration data are located in the same configuration file. Besides, one can have any number of cluster client processes or applications of these two types:

Fig. 5  The way server get sensor format and parse the package

• Standard MySQL client: MySQL Cluster is not differ-

ent from the standard (non-clustered category) MySQL. In other words, one can use PHP, Perl, C, C++, Java, Python, Ruby and other existing MySQL applications to access MySQL Cluster. • Management client: This type of clients is connected to the management server, and they provide elegant ways to start and stop nodes, backup commands, and message tracing (debug version only), and to show node versions and status.

3 System Design and Implementation This section introduces the proposed system design and its implementation.

3.1 Platform Concept Due to the large number of sensors and different type of sensors, it is risen the problem as the sensor might be not in the same format. While these data will inevitably continue to increase, we have to prepare what the best architecture for this case. In this paper we propose a treatment method for this problem. As shown in Fig. 5, the Administrator inputs

Fig. 6  Primary system architecture

the sensor format from web, then it is stored into database. When a package sends to server from sensor, the server will access database to get the sensor format to parse the package. After the above-mentioned actions, the server gets the value from sensor package and then store it in database. Users can monitor the real-time data and historical information through a Web query.

3.2 System Architecture In this paper, we implemented a service platform designed to monitor air quality in a clinical center. The platform was built with a distributed storage, however in order to let user access these data, it is need a single entrance as wireless/wire sensors data integration. It supports the HL7 format in data exchange and collection, and transmits in the XML format to increase the consistency and readability [18]. Our system architecture is shown in Figs. 6 and 7. Figure  6 shows the architecture of cloud service

13

Author's personal copy

C.-T. Yang et al.

Fig. 7  Secondary system architecture

connected to the IoT. With several sensors and devices which are connected to the system compound as IoT, there is a server receives the data sent by sensors. User can view the air condition wherever they can connect to internet.

3.3 Table Architecture HBase has a limited value of row versions to store, the default for maxi-mum versions is 3. When designing the database, we did not use timestamp to record the date and time of data. We created a column to describe the date and time of data, and assign it as the row key of the table. Then, choose places to be the column family, it will be convenient if we want to add monitoring space or search the history data in the future. Furthermore, we made sensor information to be the qualifier, it makes the table more flexible. We can deploy different sensors in different places, and the data from sensors have not been written at the same time. No need to change the table if sensors be added or removed. The table architecture is shown as Fig. 8.

Fig. 8  The table of sensor information

resources and reduces the total cost. Our data storage was supplemented by the Grid technology to create a database with dynamic maintenance [21, 22]. In the term of data analyzing, we used the data mining method connection rules to do statistics and reference data; then from the result of analyzed data could give more suitable advice for improvement. Moreover, association rules can be used to predict potential diseases. In this part, we tried to build a database which can be used to monitor, record, and collect data CO2 concentration, temperature and humidity by ZigBee interface. The flow chart of the environment monitoring process is shown in Fig. 10. Figure 11 shows images of devices used in environmental monitoring. The part on the right shows sensors, a digital plug, and the connector between sensors and the Zigbee Router; the part on the left shows the ZigBee Router or

3.4 System Setup Figure 9 shows a scenario of service from system to user. On the host server, we wrote a code to monitor the collected data. An analysis method is programmed in the server to analyze data collected from sensors. Thus, the result of analyzed data can be automatically controlled by the program. To design an enormous system entails complicated structure in computing and operation to produce the needed resources. In this work, we utilized Grid computing technology to develop a huge and complex system. Grid computing is the collection of computer resources from multiple locations to reach a common goal [19, 20]. This technology not only improves efficiency, but makes a full use of remaining

13

Fig. 9  A scenario of Web service architecture

Author's personal copy Cloud-based Air Quality Monitoring System Table 1  Physical machine specification Hardware  CPU  RAM  Disk Software  OS  Vitualization platform

Intelr ­Xeonr Processor [email protected] GHz DDR3 1333 MHz 4 GB *2 1 TB Windows 7 64-bit VMwarer Workstation 9

Table 2  Virtual machine specification

Fig. 10  Flow chart of environment monitoring

Hardware  Node name  namenode  datanode1  datanode2 Software  OS  Compiler  Hadoop  HDFS  Cloudera  Zookeeper  HBase  MapReduce

Cores 1 1 1

RAM 2 GB 2 GB 2 GB

HDD 20 GB 20 GB 20 GB

Ubuntu 12.04 TLS - 64bit Java SE Development Kit 8u11 2.0.0 2.0.0 4.8.3 3.4.5 0.94.15 2.0.0

4.1 Experimental Environment

Fig. 11  Physical devices used in environment monitoring

Zigbee Coordinator use IEEE 802.15.4 standard to wirelessly transmit data in a range about 10 m to 100 m. The monitoring process is described as follows: First, data are collected by sensors, then they are transmitted to the ZigBee Router coordinator and sent to the backend of the server through LAN for further analysis. If the collected air quality data are found to reach the setting limit, the system Coordinator will respond by transmitting alert signals to the ZigBee Router to trigger the front-end of the digital plug.

4 Experimental Environment and Results This section introduces experiments in two parts. The first is to list the relevant hardware and software equipment used in building experimental environment. The second is our experimental results on the effectiveness of the adjustment.

Hardware and software specifications of the computer used in our experiment are listed in Table 1. We used Intel Xeon Processor [email protected] GHz as the CPU of the computer, and 8 Giga byte random access memory. This computer is the physical machine which holds several virtual machines as our server. We used Windows 7 with 64 bits as our operating system and VMware Workstation 9 to manage our virtual machines. As listed in Table 2, we used three nodes to implement this system. The “namenode” is the main node, which manage and assign jobs to other nodes. There are two name node in a standard HDFS, if the first name node shutdown the other can replace. Because In this case, the nodes are in the same physical machine, we only use one name node. HDFS requires at least two data node to compute or store. A file in a normal HDFS will have three replicas in different virtual machine, here we used two data nodes and set the numbers of replica as two. The operating system of these three nodes is ubuntu12.04, and we setup Hadoop 2.0.0 distributed file system on these nodes. To manage the nodes which HDFS hold, we used zookeeper with HBase version is 0.94.15 and the MapReduce version is 2.0.0.

13

Author's personal copy

C.-T. Yang et al.

Table 3  Sensor specification Sensor  Temperature and humidity  Formaldehyde  VOC  Carbon monoxide

Series WHT Weather-Resistant Humidity/-Temperature Transmitter CTX 300 OLCT 100 XP OLCT 20 D

Fig. 14  Carbon monoxide sensor

Fig. 12  Temperature and humidity sensor Fig. 15  ZigBee Coordinator config

Fig. 13  VOC sensor

Device specification is shown as Table 3. The device we use to measure temperature and related humidity is Series Weather Resistant Humidity (WHT)/Temperature Transmitter made by Dwyer Instrument, Inc. The device is shown as Fig. 12. The formaldehyde sensor (CTX 300) is shown in Fig. 12. The VOC sensor (OLCT 100 XP) which can detect combustible, toxic or refrigerant gases and ­O2, is shown in Fig. 13. Figure 14 describes the carbon monoxide sensor (OLCT 20 D). When there is no carbon monoxide in the place, the value has always been 1. When the harmful gases are over the standard setting before, the system will activate warning mechanism. When the sensor detects values of gas, it sends data through the ZigBee Router to the ZigBee Coordinator, then

13

to the monitoring server. We set up the IP address of ZigBee Coordinator at 127.16.1.100, and its port, 5001. Figure 15 shows our configuration on the web. Our compiler uses Eclipse Java Version 1.4.2. As coded, it will catch the gas data from the sensor in the ASCII format (American Standard Code for Information Interchange) [23]. The data from the sensor will be written to database; and we can immediately see the value of gas on the compiler. The database environment used Apache Web Server Version 2.2.8, PHP Script Language Version 5.2.6, MySQL Database Version 5.0.51b and phpMyAdmin Database Manager Version 2.10.3 to build.

4.2 Experimental Results We have established an environmental quality and harmful gases monitoring website page, users can view real-time environmental information or query historical data. This platform built on distributed systems by the single entry for the user via a wired or wireless network view. When a user connects to the home page, they can see the current status of all sensors in real-time information from the sensors. The sensor can give a hint with different color based on the air quality condition in certain areas. From this point, we can link to the sensor information and from this data we can make a decision.

Author's personal copy Cloud-based Air Quality Monitoring System

Fig. 16  Web Information of CO2 concentration Fig. 19  Temperature data of a day

Fig. 17  Web information of temperature concentration

Fig. 20  Carbon dioxide of a day outdoor

Fig. 18  Web information of humidity concentration

The following environmental monitoring data includes temperature, relative humidity and carbon dioxide; the harmful gases we monitor in this system is formaldehyde, carbon monoxide and volatile organic gases. Figure 16 shows realtime data for carbon dioxide over a period of time. Figure 17 depicts the temperature, and Fig. 18 describes the current data for related humidity. By these data of environmental quality, the data reflect consistently low levels of the various air contaminants, indicating acceptable air quality over the period of time. We can also gain better understanding what happen in the place by the change of air quality information. This requires the accumulation and analysis of large amounts of data, and we are doing exactly what these massive data to be recorded. 4.2.1 Use EQHGMS to Improve the Quality of the Environment Figure 19 describes a daily temperature information on June 4th, 2013. We can see there are several high points. The temperature is on average higher than 30 degrees Celsius. Figure 20 shows the outdoor carbon dioxide concentration data in same day. We can see the average concentration of carbon dioxide is around 500 ppm. And Fig. 21 depicts the data of carbon dioxide, which is in the same place with temperature sensor. We can clearly see the

Fig. 21  Carbon dioxide of a day in the same place with the temperature sensor

fluctuations indicating an insufficient amount of fresh air in that place and time. We assume that, when the carbon dioxide concentration over than 950 means, there is a pollution going on. The Indoor Air Quality Standards set by Environmental Protection Administration shown in Table 4 [24, 25] is a good index for us to set the standard. We also make it flexible to the user if they want to modify the standard value in the future. After summarizing these data and referencing the In-door Air Quality Standards set by Environmental Protection Administration, the question faced by us is how to effectively optimize our system according to the collected environmental information. To optimize the system, we enhance the function of the real-time data captured by sensor with the warning system. When a sensor data over standart, then a notification will

13

Author's personal copy

C.-T. Yang et al.

Table 4  Indoor air quality set standards by environmental protection administration Items

Standard values

CO2 CO value Formaldehyde (HCHO) Bacteria Fungi

Standard values Value of 8 h Value of an hour Highest value Highest value

Value of a day Particle size less than or equal to 10 microns (m) suspended particulates (P M10) Value of a day Particle size less than or equal to 2.5 microns (m) suspended particulates (P M2:5) Value of 8 h O3

Units 1000 9 0.08 1500 1000 In addition CFU/m3(Colony to fungal ratio forming units/Cubic concentrations meter)of indoor and outdoor were less than or equal 1.3 75

ppm ppm ppm CFU/m3(Colony forming units/Cubic meter) CFU/m3(Colony forming units/Cubic meter)

35

g/m3(microgram/Cubic meter)

0.06

ppm

Fig. 22  Temperature of a day modified by carbon dioxide data

send to the authority in order to give a warning. So, they can make decision what a better solution in that situation. The following figure is a result as the method we describe before, according to the carbon dioxide concentration and other gases conditions to determine value of air quality whether it is good or not. The data from the sensors we used in this experiment are temperature and related humidity. Figure 22 shows the result of the related humidity modified according to carbon dioxide concentration for a day. Figures 23 and 24 describe related humidity modified by carbon dioxide concentration for a day and a week. In this graph we can see that the modified value, shown as red line, is more stable. To increase convenience, we also

Fig. 23  Related humidity modified by carbon dioxide concentration for a day

13

g/m3(microgram/Cubic meter)

Author's personal copy Cloud-based Air Quality Monitoring System

Fig. 24  Related humidity modified by carbon dioxide concentration for a week

develop a web page for android mobile phone. There are two main functions, one is to look the real-time information about the environment, another is to control the device which link with the system.

5 Conclusions and Future Work In this study, we have developed an environmental quality and harmful gases monitoring system. Environment comfort index includes temperature, related humidity, illumination, noise and carbon dioxide. This paper describes the design, implementation, and demonstrates the capability to monitor concentration, temperature, relative humidity and carbon dioxide. In future work, we aim to expand the system capacity to include illumination and noise and to be a real Environment Quality System.

5.1 Concluding Remarks We develop a real-time monitoring environmental quality and harmful gases system. This system can accommodate different type of sensors, so user can insert new type of sensor by themselves when they need to add new sensors which is not same as previous. This system is also built on distributed system, using HBase to store the data from sensors. In addition, to adjust the environment air condition, this system has an additional ability to analyze historical data.

5.2 Future Work To optimize this system, several complementary data need to be analyzed for the authority to broaden their insight from analysis of cost, benefit and economic impact of air quality data. However, until now the scale of data is not large enough. It is need an adequate data to provide the better analysis. While the data is being accumulated, we hope in the future this data can be used to predict and visualize to make a preferable decision and information for the authority and society. Acknowledgements  This work was supported in part by the Ministry of Science and Technology, Taiwan ROC, under grants number MOST 104-2221-E-029-010-MY3, MOST 106-2621-M-029-001, and MOST 106-2221-E-126-012-MY2. Author Contributions  C-TY designed the research plan and organized the study. S-TC and WD participated in all experiments, coordinate the data analysis and contributed to the writing of the manuscript. C-CW Completed the coding.

Compliance with Ethical Standards  Conflict of interest  We declare that we have no significant competing financial, professional or personal interests that might have influenced the performance or presentation of the work described in this manuscript.

References 1. Yan, Q.-H., Yan, Z.-P., & Tan, C.-W. (2015). Design and implementation of household gas monitoring system based on

13

Author's personal copy

C.-T. Yang et al.

2. 3. 4.

5. 6.

7. 8.

9. 10.

11.

12.

zigbee+gprs communication. In 2015 International Conference on Intelligent Transportation, Big Data and Smart City, pp. 274–277. Xu, J., Tang, Y.-N., & Li, X. (2016). High performance combustible gas monitoring system. In 2016 10th International Conference on Sensing Technology (ICST), pp. 1–5. Jian, F., & Wei, L. (2014). Harmful gases wireless network monitoring system design. In 2014 International Symposium on Computer, Consumer and Control, pp. 551–553. Liu, J., & Huang, J. L. X. (2015). Secure sharing of personal health records in cloud computing: Ciphertext policy attribute based signcryption. Future Generation Computer Systems, 52(2015), 67–76. Sultan, N. (2014). Discovering the potential of cloud computing in accelerating the search for curing serious illnesses. International Journal of Information Management, 34(2014), 221–225. Beloglazov, A., & Abawajy, R. B. J. (2012). Energy-aware resource allocation heuristics for efficient management of data centers for cloud computing. Future Generation Computer Systems, 28(5), 755–768. Miorandi, D., & Sicari, F. D. P. I. C. S. (2012). Internet of things: Vision, applications and research challenges. Ad Hoc Networks, 10(7), 1497–1516. Du, C., & Zhu, S. (2012). Research on urban public safety emergency management early warning system based on technologies for the internet of things. Procedia Engineering, 45(2012), 748–752. Sun, E., & Zhang, Z. L. X. (2012). The internet of things (IoT) and cloud computing (cc) based tailings dam monitoring and prealarm system in mines. Safety Science, 50(4), 811–815. Sadeghioon, A. M., & Metje, D. C. C. A. S. N. (2014). Research on urban public safety emergency management early warning system based on technologies for the internet of things. Journal of Sensor and Actuator Networks, 3(1), 64–78. Kim, Y., Suh, J., Cho, J. Y., Singh, S., & Seo, J. S. (2015). Development of real-time pipeline management system for prevention of accidents. International Journal of Control and Automation, 8(1), 211–226. LAN/MAN Standards Committee of the IEEE Computer Society, Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (LR-WPANs), IEEE, 2003.

13

13. Lönn, J., & Olsson, J. (2005). Zigbee for wireless networking. Master Thesis, Linköping University. 14. “ZigBee Specification FAQ”. Zigbee Alliance. Archived from the original on 27 June 2013. Retrieved 14 June 2013. 15. Yang, C., Huang, Q., Li, Z., Liu, K., & Hu, F. (2017). Big Data and cloud computing: Innovation opportunities and challenges. International Journal of Digital Earth, 10(1), 13–53. https​://doi. org/10.1080/17538​947.2016.12397​71. 16. MySQL Cluster Architecture Overview. (2004). A mysql® technical white paper. https​://confl​uence​.ocean​obser​vator​ies.org/downl​ oad/attac​hment​s/16418​744/mysql​-clust​er-techn​ical-white​paper​ .pdf. 17. https​://dev.mysql​.com/doc/mysql​-linux​unix-excer ​pt/5.7/en/linux​ -insta​llati​on-debia​n.html. 18. Health Level Seven®INTERNATIONAL. http://www.hl7.org/. 19. Czajkowski, K., Foster, I., & Kesselman, C. (1999). Resource coallocation in computational grids. In Proceedings of the Eighth IEEE International Symposium on High Performance Distributed Computing (HPDC-8 99). 20. Foster, I., Kesselman, C., & Tuecke, S. (2001). The anatomy of the grid: En-abling scalable virtual organizations. International Journal of Supercomputer Ap-plications and High Performance Computing, 15(3), 200–222. 21. Yang, C.-T., Shih, W.-C., Chen, L.-T., Kuo, C.-T., Jiang, F.-C., & Leu, F.-Y. (2015). Accessing medical image file with coallocation HDFS in cloud. Future Generation Computer Systems, 43–44, 61–73. 22. Yang, C.-T., Shih, W.-C., Huang, C.-L., Jiang, F.-C., & Chu, W. C.-C. (2016). On construction of a distributed data storage system in cloud. Computing, 98(1–2), 93–118. 23. ASCII (American standard code for information interchange). http://zh.wikip​edia.org/wiki/ASCII​. 24. Yang, C.-T., Liao, C.-J., Liu, J.-C., Den, W., Chou, Y.-C., & Tsai, J.-J. (2014). Construction and application of an intelligent air quality monitoring system for healthcare environment. Journal of Medical Systems, 38, 15. 25. Yang, C.-T., Liu, J.-C., Chen, S.-T., & Lu, H.-W. (2017). Implementation of a big data accessing and processing platform for medical records in cloud. Journal of Medical Systems, 41, 149.

Suggest Documents