Wireless Sensor Network and Web based Information System for Asthma Trigger Factors Monitoring Ana Filipa Teixeira
Octavian Postolache,
Instituto Universitário de Lisboa (ISCTE-IUL)/ Instituto de Telecomunicações (IT-IUL), Lisbon, Portugal, e-mail:
[email protected]
Instituto de Telecomunicações/ Instituto Universitário de Lisboa (ISCTE-IUL), Lisbon, Portugal, e-mail:
[email protected]
Abstract – This paper presents a web information system and a wireless sensor network for indoor or outdoor air quality monitoring with application in asthma trigger factors assessment. As the main target is mentioned the development of a flexible system characterized by a low-cost sensing nodes that assures robust and continuous monitoring of air conditions in order to prevent the asthma attacks. At the same time it permits to establish correlations between the air quality parameters and the appearance of respiratory diseases such as asthma as part of environment medicine approach. The wireless sensor network includes a set of sensing nodes with ability to measure environment parameters like temperature, relative humidity, carbon monoxide among others and to send processed information to a smart coordinator. Two different architectures of smart coordinator based on a Raspberry Pi, with and without an Ethernet border router from Jenni embedded computer and wireless network coordinator, were implemented. Referring to software, a client application that uploads the measured data to a remote air quality server through Internet was designed and implemented. The primary processing is done by the smart coordinator that transmits the processed values of air quality parameters including alarms to a web based information system. Referring the web based information system it assures the human machine interface, the users being capable to receive alerts, and to visualize the data associated with wireless sensor network, and to monitor network status. Keywords – wireless sensors networks, air quality, asthma assesment web based information system, distributed processing
I.
INTRODUCTION
Wireless sensor networks (WSN) are used in a huge variety of sectors and industries, one of the important fields of application being expressed by WSN for outdoor and indoor air quality monitoring including temperature, relative humidity but also the concentration of the gas pollution such is presented in [1]. Additionally the WSN are used in agriculture related to the irrigation and crop monitoring, and also in healthcare as part of cardiac and respiratory activity monitoring nodes. In the new era of information technology, the people spend more time indoor considering their activities related work or leisure, indoor air quality conditions can affect directly the respiratory condition of the people. Thus, breathing air characterized by poor air quality will imply to bring air pollutants deeply in lungs, which causes serious damage to the respiratory tract. At the same time long term polluted air Instituto de Telecomunicações and Fundação para a Ciência e Tecnologia - project PTDC/DTP-DES/1661/2012, supported this work.
exposure can trigger new cases of asthma [2], Air pollutants also negatively and significantly harm lung development, creating an additional risk factor for developing lung diseases. At the same time the respiratory disease developed on young people are increasing, the asthma being one of the illnesses that is nowadays more frequent on children and teenagers. To investigate the relation between the indoor air quality and respiratory diseases, the measurement of gases concentrations such as CO, NO2, PM10 and physical parameters such as temperature and relative humidity are carried out. The air quality guidelines promoted by World Health Organization [3], highlights the relation between asthma disease occurrence and factors such as smoking, mustiness, nitrogen dioxide. [4]. The usage of Wireless Sensor Network (WSN) to monitor outdoor and indoor air quality is reported by different authors [5][6] however such solutions can still be considered limited regarding the flexibility and the possibility to include specialized measurement nodes based on accurate respiratory monitoring instruments as part of the deployed network. Regarding the WSN the autonomy represents an important issue. To have an optimal choice of wireless communication protocol it requires performing set preliminary studies regarding the necessities of distributed measurement system and to investigate the solution already proposed in the field. In this case can be mentioned air quality monitoring network based on Wi-Fi [7][8] or Bluetooth [6] that are relatively low cost solution, with high data rate transfer but high power consumption. In the latest times Bluetooth low energy [9] and ZigBee protocols [10] become the chosen solution for environment monitoring applications [11]. At the same time the ZigBee wireless networks prove to be better succeeded cause by greater flexibility, the lower consumption and the range [12]. The work presents a wireless sensor network and information system for air quality monitoring and periodic respiratory exams that is employed to extract relations between the air quality and respiratory disease such asthma. The data provided by the WSN may be published using a web based information system the information being accessed by users that can be alerted about the poor air conditions. Focussing on web based information system that process and publish the data received from air quality WSN the developed system prototype that can be used to help medical researchers to analyse extended amount of experimental data contributing to limit the asthma spreading and asthma attack occurrences based on measurement of the indoor and outdoor
air quality conditions. Activities such physiotherapy that are commonly performed in indoor with people characterized by limited health can be well organized by personalized air conditions that can contribute to reduce the recovery times. This article is composed by five sections, wherein the first will focus on the implemented sensor network, referring to the hardware. The second refers the embedded software for the sensor nodes. Elements about the developed software are reported including the WSN data as well as server-side software related data management and the graphical user interface. Finally are presented preliminary experimental results the conclusion produced and the future work. II.
WIRELESS SENSOR NETWORK
In order to give a better perception of the implemented architecture for air quality monitoring, in Figure 1 are presented the main hardware and software elements.
Figure 1. Distributed system for air quality a) indoor distribution of WSN nodes IEEE802.15.4 compatible, b) WSN topology – tree.
In Figure 1 on the left side are represented the border-router connected through the Ethernet port to the embedded PC (Raspberry Pi) working as the smart coordinator, which receives IPv6 frames within IEEE802.15.4 frames and forward them through Wi-Fi to the PHP server. Second smart coordinator architecture expressed by Raspberry Pi and Zigbee coordinator of sensor network is expressed on Figure 1.a right side The first system is based on 6LoWPAN Stack Operation which consists of wired parts (Ethernet bus) and wireless parts (one or more wireless networks). This architecture is based on the utilization of 6LoWPAN Ethernet Border-Router from Jennic [13], which takes the complexity out of connecting wireless 6LoWPAN to wired IP Ethernet. This aspect was considered important taking into account the existing Ethernet based infrastructure in the air quality monitored areas. For this implementation the IPv6 packets are simply passed from the wired to wireless domains without modification or consideration for any high layer protocol, demonstrating the true scalability of IP that means no additional Gateway
characterized by protocol translation to interface into the IP world is needed. For this architecture the WSN coordinator data is accessed by the border router through wireless connection. To increase the flexibility and interoperability of the implemented architecture a smart coordinator based on embedded PC expressed by a Raspberry Pi was considered. The embedded PC assures the hardware support for the client side application, and at the same time provides Wi-Fi Internet connectivity. The embedded PC to WSN ZigBee coordinator [14] communication is based on a RS232 serial communication protocol. A. Sensing nodes The implemented WSN includes sensing nodes of JN5139EK030, characterized by temperature and relative humidity measurement capability through the usage of Sensirion SHT11. Additionally a set of sensors NO2, O3 and PM10 are used to provide information used for air quality index calculation according to the relations provided by “Agência Portuguesa do Ambiente” [15]. The analog inputs of each nodes are used to acquire the values from air quality index sensors. For each wireless sensor node the sampling rate associated with analog channel is programmed in order to assure good accuracy of air quality parameter calculation, also following guidelines of air quality index which defines the minimum number of samples needed to an efficient calculation. The choice of the sampling rate is performed considerring also the general requirements of higher autonomy for WSN nodes. Referring to the communication between sensor nodes and coordinator, in the first approach it is based on 6LoWPAN. Messages are sent between the wireless network of a 6LoWPAN system as IPv6 packets which are compressed and embedded in IEEE 802.15.4 frames. An important issue is whether the compressed packet is still too large; 6LoWPAN fragments the compressed packet for transportation in two or more frames. The layer also decompresses the packet extracted from a received frame. Alternatively, in the second approach the communication protocol (RS232) uses frames consisting in KVP transactions [16]. B. Routers and Gateway In this section are mentioned other network components, like routers and smart coordinator / gateway. The routers, that besides routing also include sensors of air quality, are considered regarding the network size. Thus to extend the WSN coverage (extend the number of monitored rooms) these elements are the key to support the big distances between sensing nodes (end devices) and smart coordinator. These WSN components perform the routing of data coming from end nodes and also send the own data to coordinator. At the top of network is the coordinator which also assumes the gateway role in the wireless sensor network. This element gathers all data from sensing nodes and sends them through Ethernet (with UDP protocol), or RS232 (depending chosen approach) to the client of network. For the implemented WSN architecture that includes a smart coordinator, the “local client” of network is a Raspberry Pi computer which runs a java application that will be detailed later in this document.
III.
SENSOR NODE FIRMWARE
Using the IDE Code::Blocks to firmware programming, here will be programmed all algorithms related to data acquisition control, embedded data processing, and data communication. To integrate new sensors we need to use the Analogue Peripherals available in sensor boards of kit JN5139 (each sensor board is a Jennic DR1048 board) which can be seen in figure 2.
and when they expire it typically generates an interrupt to end the sleep period. IV.
SYSTEM SOFTWARE
In our software system we have a web service with client – server architecture. A web server based in PHP provides a minimal set of services, maintaining the security of system. A java client application requires the services. This project was designed for indoor and outdoor networks, thus a geographic information system was considered and was built above client application. A block diagram is presented below (Figure 3):
Figure 2. On-chip Analogue Peripherals 1
This part includes the ADC and DAC components and each should be configured. Using ADC the first analogue peripheral function to be called must be vJPI_AnalogueConfigure(), which allows configure frequency of clock, sampling interval and conversion time, reference voltage and voltage regulator (to minimise digital noise in the ADC), then the ADC is enabled with vJPI_AnalogueEnable(). Then we should take into account the batteries life of sensor nodes, and at the same time the minimum number of samples we need for good measurement system. So, here we consider reference below of Portuguese Environment Agency which recommends the minimum sample rate for each of the gas components of the monitored air. Table 1- The sampling rate associated with the concentration measurement of the air compounds
Index (0h - 23:59h) Pollutant Minimum nr. Samples Type 18 hourly average concentrations NO2 SO2 18 hourly average concentrations O3 18 hourly average concentrations CO 18 octo hourly average concentrations PM10 13 hourly average concentrations
As can be observed from the table it’s not necessary all times samples, so what happens on rest of time? At the times which sensor nodes don’t send data in order to maximise battery life will be imposed the sleep mode operation for sensor nodes. When sensors nodes enter into sleep mode most of the internal chip functions are shutdown to save power, however the state of DIO pins are retained, including the output values and pullup enables, and this therefore preserves any interface to the outside world. Wakeup Timers may run during sleep periods
Figure 3 Communication and protocols of system
A. Client Software The java client application was designed to send data to a database and to receive data from coordinator through UDP protocol or RS-232. The implemented application permits a highly robust response even if the client does not have internet connection at the moment. So, for this situation, the client application will save data received from nodes to a file and when the application could connect it will send data to the server database. For outdoor air quality monitoring case the java client will also receive the localization information from a Garmin Foretrex 201 personal navigator and will associate GPS coordinates to the sensors’ data. For indoor measurement the users can find GPS coordinates through accessing a link of designed website of information system and may define node's location manually with the obtained coordinates. This functionality will be used to represents the WSN on maps associated with air quality information system that is accessed by the user as a website. In order to reduce the processing at sensing nodes level, the java client application deployed on the smart coordinator was designed to assure intermediate data processing. Thus the java client receives data from sensing nodes and processes them in order to extract the value of pollutants concentration and also the values of physical quantities such as temperature and relative humidity. For imposed thresholds associated with imposed air quality conditions, a set of alarms may be generated according to the measured parameter value that is over an imposed threshold. In the critical conditions can be
sent orders to sensing nodes for blink its LEDs with high frequency that can alert people in the room. To prevent the loss of alarms with possible failures in internet connection, java application shall calculate the index of air quality locally, thereby generating local alerts immediately if necessary. The values of air quality index will then be sent to the remote database (in a web server) along with the sensor readings. To calculate the index of air quality it will be considered the formula used by several references of air quality [9][11], the average of each pollutant's quality index, whose expression is presented below: = where: IP CP BPHi BPLo IHi ILo
− + (1)
= the index for the pollutant P = the rounded concentration of pollutant P = the breakpoint that is greater than or equal to CP = the breakpoint that is less than or equal to CP = the AQI value corresponding to BPHi = the AQI value corresponding to BPLo
and the breakpoints are predefined in a reference table.
New approach concerning air quality index may be done considering the flexibility of the designed information system that accept the information for new air quality nodes or from medical devices responsible for respiration parameters measurements. The java client application was also designed to import data through a file. Additionally, instead of accessing the site for changes in their networks, users can simply use the java application to make these changes. This additional function is intended to quickly interact with the user than to access to the website which includes many timeouts. As an example of the changes, the user can change a sensing node to other network where other users have access, too. B. Server Software In the server side there are a set of services which will be consumed by java client and a site which provide an user interface that can be accessed wherever. In order to provide a global system, where everyone can access, it was needed a bridge between local client (java app) and “world”, this bridge is materialized by a web service. Using a free library PHP, NuSoap, we have WSDL file from our PHP functions. WSDL is an XML-based language for describing Web services and how to access them; it can be easily interpreted by diverse languages, which does not limit the information system only to java client, new client applications can be developed. A short list of services descripted in WSDL is presented in figure 4.
Figure 4. a) List of functions available and descripted through WSDL file b) Provided information about is Admin function in WSDL file
The most important service provided by the web service is sending the sensor readings to database of information system. The database of information system is based on MySQL, so PHP is required through web service and communicates with database through MySQL connection. In the other side PHP construct the website and provide the information from database to users with authorization to it. V.
RESULTS AND DISCUSSIONS
Using the information system developed, were gathered data from wireless sensing nodes, thus, the java application was captured them and sent them to database through the Internet. Next can be seen a representation of data in the website. Figure 5 presents the data which is sent by three sensing nodes of the WSN and captured and visualized through the usage of the developed java application – AirQAsthmaNet.
Figure 5. Java application receiving data from sensing nodes (N/A value is due to RS232 data doesn’t sent switch value).
How can be seen Provisional Network was chosen to be the network of the sensing nodes illustrated. Doing the login with the webservice in Enviogis Net tab, this information will be sent to the internet and then in the website can be accessed like is presented in next figure.
Figure 6. Access Network Data in website
Analysing Figure 6 in detail also can be seen that the user connected on the website has alarms, in left column, concerning your networks. These alarms should be accessed by users in order to improve the air in the relevant networks. Referring the temperature and relative humidity measurement using a Jennic node mounted on the wall of the IM Lab, the graphical representation of the air quality parameters is presented in Figure 7 and Figure 8.
In Figure 7 that shows the relative humidity readings realized during two hours, with 3min sample rate it can be observed that relative humidity values are comprised between 50 - 60 %. Knowing that human comfort requires the relative humidity in the range 25 - 60%, in this case the relative humidity corresponds to the air quality requirements. Considering the limitation regarding the number and the type of measurement channels associated with the measurement nodes the Enviogis web based information system includes the capability to import data regarding indoor or outdoor air quality conditions or even from measurement of breath parameters of the room occupants in order to extract the correlations between the air quality conditions and respiration activity. In Figure 9 is presented the evolution of NO2 measured by the Portuguese Environment Agency using an outdoor air quality monitoring station. Based on Enviogis data management capabilities the NO2 data is imported in the Enviogis database and graphical represented by dynamic web pages.
Figure 9. The evolution of NO2 concentration on Entrecampos, Lisbon: imported by Enviogis from Portuguese Environment Agency database
Using one of analog input capability of the Jennic DR1048 W a breath measurement capability can be considered. The breath measurement channel is materialized in our case by a chest belt respiratory monitoring device developed by the authors using an R-type ENFIT, and a charge amplifier. The normalized values of the respiration wave for 30s measurement interval are presented in Figure 10. Figure 7. Relative humidity evolution on the IM Lab presented the on ENVIOGIS website (top); Relative Humidity graphic zoom -samples each 3 minutes during 2 hours (bottom).
1 0,8 0,6 0,4 0,2 0 0
2
4
6
8
10
12
14 16 18 Time(s)
20
22
24 26
28
30
Figure 10. Breath curve associated with 30s measurement interval (subject: male, 33years old, no respiratory diseases record)- BR-16 BrPM
Figure 8. Temperature evolution in the IM Lab measured with Jennic node of the indoor air quality WSN.
Based on acquired respiration wave the breath rate is on line evaluated. Additionally the correlations between the indoor or
outdoor air quality condition and breathing behavior of the monitored person it can be obtained. VI.
CONCLUSION AND FUTURE WORK
A wireless sensing network indoor and outdoor to monitor the air quality in relation with trigger factors detection associated with asthma attacks was developed. To support data representation and alarm generation a graphical user interface was developed such as a website. As important part of the system java application makes a bridge between the wireless sensor network and the database through Internet connectivity. Data from respiratory tests, imported using the developed java application permits to analyse the relationship between asthma and air quality. The presented solution is useful to prevent asthma and other respiratory diseases in indoor spaces. The information can be accessed anywhere which allows the users to know elements about risk condition for their respiratory health. As the future work is mentioned and extension of the wireless sensor network, thus new nodes characterized by new capabilities air compounds concentration measurements as so as new capabilities on respiration activity monitoring Referring to the information system side, in order to provide a more efficient alert system, the warnings can be sent as a SMS to cell phone of users, or by email. The Enviogis web based information system can be improved with new technologies that permit to be accessed using mobile devices such as smartphones or tablets. REFERENCES [1]
[2]
[3]
[4]
O. Postolache, J M. D. Pereira, P. Girao, "Smart Sensors Network for Air Quality Monitoring Applications", IEEE Transactions on Instrumentation and Measurement, Vol.58, Issue 9, pp. 3253 – 3262, 2009 A. H. Lockwood, K. W.-Hood, M. Rauch, B. Gottlieb, “Coal’s Assault on Human Health” A Report From Physicians For Social Responsibility, on-line at: http://www.psr.org/assets/pdfs/psr-coalfullreport.pdf, 2009 WHO, "WHO guidelines for indoor air quality: selected pollutants", © World Health Organization, on-line at: http://www.euro.who.int/ __data/assets/pdf_file/0009/128169/e94535.pdf , 2010 EPA, “Learn About air” on-line at: http://www2.epa.gov/learnissues/learn-about-air,2009.
[5]
Liu Jen-Hao, Lin Tzu-Shiang, Lai Da-Wei, "Developed Urban Air Quality Monitoring System Based on Wireless Sensor Networks", International Conference on Sensing Technology (ICST), New Zeeland, pp. 1-5, 2011 [6] O. Postolache, P. Girao, M. Dias Pereira, G. Ferraria, N. Barroso, G. Postolache, "Indoor monitoring of respiratory distress triggering factors using a wireless sensing network and a smart phone", Instrumentation and Measurement Technology Conference, 2009. I2MTC '09. [7] O. Postolache, J. M. Pereira, P. Girao, “Smart Sensor Network for Air Quality Monitoring Applications”, Proceedings of the IEEE Instrumentation and Measurement Technology Conference, 2005. IMTC 2005, pp. 537-542. [8] G. H. Cho, Gi Sang Choi, “Design of Service System Framework for Web-based Monitoring and Control of Indoor Air Quality (IAQ) in Subway Stations”, Proceedings of International Conference on New Trends in Information and Service Science, 2009, pp. 659-663. [9] E. Mackensen, M. Lai, T.M. Wendt, “Bluetooth Low Energy (BLE) based wireless sensors”, IEEE Sensors, 2012, pp. 1-4. [10] Wenhu Wang , Yifeng Yuan, Zhihao Ling “The Research and Implement of Air Quality Monitoring System Based on ZigBee”, 7th International Conference on Wireless Communications, Networking and Mobile Computing (WiCOM), 2011 , pp 1-4. [11] Haefke, M. Mukhopadhyay, S.C. ; Ewald, H. “A Zigbee based smart sensing platform for monitoring environmental parameters”, Proceedings of IEEE I2MTC2011, Hangzou, China.pp. 1-8. [12] Jin-Shyan Lee ; Yu-Wei Su ; Chung-Chou Shen, “A Comparative Study of Wireless Protocols: Bluetooth, UWB, ZigBee, and Wi-Fi”, Industrial Electronics Society, 2007. IECON 2007. 33rd Annual Conference of the IEEE [13] Jennic, “6LoWPAN Ethernet Border-Router takes the complexity out of connecting wireless 6LoWPAN to wired IP Ethernet – Press information”, on-line at: http://www.jennic.com/files/press_releases/ 6LoWPAN%20Ethernet%20Border-Router_PR_May09.pdf, 2009 [14] Jennic, “JenNet Wireless Sensor Network”, on-line at: http://www.jennic.com/files/support_documentation/JN-AN-1067JenNet-Wireless-Sensor-Network-1v5.pdf, 2009. [15] Agência Portuguesa do Ambiente, “QualAr – Base de dados on-line sobre qualidade do ar”, on-line at: http://www.qualar.org/ [16] Jennic, “ ZigBee Application Framework API Reference Manual” JNRM-2018 Revision 1.6, on-line at: http://www.jennic.com/files/support_files/JN-RM-2018ZigBeeAppFramework-API-1v6.pdf