Fog Computing in Healthcare Internet-of-Things: A Case Study On ECG Feature Extraction

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Fog Computing in Healthcare Internet-of-Things: A

Case Study on ECG Feature Extraction


Tuan Nguyen Gia1 , Mingzhe Jiang1 Amir-Mohammad Rahmani1,2 , Tomi Westerlund1 ,
Pasi Liljeberg1 , and Hannu Tenhunen1,2
1
Department of Information Technology, University of Turku, Turku, Finland
2
Department of Industrial and Medical Electronics, KTH Royal Institute of Technology, Stockholm, Sweden
Email: {tunggi, mizhji, amirah, tovewe, pakrli}@utu.fi, [email protected]

AbstractInternet of Things technology provides a competent benefits such as low-cost services, capability of large data
and structured approach to improve health and wellbeing of storage volume and superfluous maintenance cost. However,
mankind. One of the feasible ways to offer healthcare services there exists many challenges in these systems regarding
based on IoT is to monitor humans health in real-time using
ubiquitous health monitoring systems which have the ability to latency-sensitive issues, location awareness and large data
acquire bio-signals from sensor nodes and send the data to the transmission. Undoubtedly, the more data is transmitted over
gateway via a particular wireless communication protocol. The a network, the higher possibility of error occurs because bit
real-time data is then transmitted to a remote cloud server error, data transmission latency and packet dropping possi-
for real-time processing, visualization, and diagnosis. In this bility are proportional with the volume of transmitted data.
paper, we enhance such a health monitoring system by exploiting
the concept of fog computing at smart gateways providing Especially, in case of emergency, a single error in analyzed
advanced techniques and services such as embedded data mining, data causes inaccurate treatment decisions and affect crucially
distributed storage, and notification service at the edge of net- to a human life. Therefore, there is a need of reducing the
work. Particularly, we choose Electrocardiogram (ECG) feature number of transmitted data over a network, on the other hand,
extraction as the case study as it plays an important role in quality of service (QoS) is still guaranteed.
diagnosis of many cardiac diseases. ECG signals are analyzed in
smart gateways with features extracted including heart rate, P A proper solution for fulfilling the requirement is the provi-
wave and T wave via a flexible template based on a lightweight sion of an extra layer in between a conventional gateway and a
wavelet transform mechanism. Our experimental results reveal remote cloud server. The extra layer denoted as fog layer helps
that fog computing helps achieving more than 90% bandwidth diminishing the volume of transmitted data for guaranteeing
efficiency and offering low-latency real time response at the edge QoS, and saving network bandwidth by preprocessing data.
of the network.
KeywordsInternet of Things, Healthcare, Smart Gateway,
In addition, fog computing offers advanced services at the
Sensor Network, Heart Rate, ECG feature extraction, Fog Com- edge of the network and reduces the burden of cloud [1]. Fog
puting. computing not only brings the cloud computing paradigm to
the edge of the network but also addresses unsupported or unfit
I. I NTRODUCTION fundamentals in the cloud computing paradigm. For instance,
Internet of Things (IoT) can be considered as a dynamic edge location, low latency, location awareness, geographical
global network infrastructure where objects with unique iden- distribution, interoperability, and support for on-line analytics
tities are interconnected for enabling advanced services. Wire- are some of fundamental characteristics of fog computing. Due
less Body Area Networks (WBAN), which is one of the to these characteristics, fog computing can be suitable for sup-
fundamental technologies in healthcare IoT, is ubiquitous used porting human health monitoring WBAN-based systems which
for acquiring different vital signs such as Electrocardiogram have features of low energy, low bandwidth, low processing
(ECG), Electromyography (EMG), body temperature, blood power and include hardware constrained nodes. To this end,
pressure in a real-time, unobtrusive and efficient way. WBAN a combination of WBAN-based system, cloud computing and
can be established from a multitude of implantable or wearable fog computing can be a sustainable solution for challenges in
sensor nodes to sense and transmit the data over a wire- the current IoT healthcare systems.
less network via communication protocols such as Wi-Fi or In this paper, we present an efficient IoT-enabled healthcare
IEEE.802.15.4 to end users for visualization and diagnosis. system architecture which benefits from the concept of fog
Low-cost and power efficient WBAN-based systems play computing. Using this architecture, we demonstrate the effec-
important roles in various areas of healthcare environments tiveness of fog computing in IoT-based healthcare systems in
from monitoring, clinical care to chronic disease management terms of bandwidth utilization, QoS assurance, and emergency
and disease prevention. For example, these systems are used notification. In addition, we utilize ECG feature extraction at
for monitoring and treating many cardiovascular diseases. the edge of the network in our implementation as a case study.
In many health monitoring systems, remote cloud servers In summary, the key contributions of this work are as follows:
have been used for storing and processing big data collected Low-latency data processing and low bandwidth utiliza-
from a large number of sensor nodes due to cloud computing tion at smart gateways (i.e., edge of the network)
Support various sensor node types, communication pro- The topic of body area sensor network systems has attracted
tocols, operating systems at smart gateways (i.e., hetero- a lot of research efforts in recent years. Especially, the number
geneity, and interoperability) of works in the healthcare domain has dramatically increased
Real-time rapid interaction at smart gateways in case of to explore several undiscovered aspects or overcome existing
emergency (i.e., real-time push notification) drawbacks in health monitoring systems. With the purpose of
Real-time and on-line analytic at the fog layer even in novel health monitoring systems provision, some of works try
case of poor connection with the cloud (i.e., geographical to expand current systems with more services and functions
distribution, location awareness, graphical user interface) while others attempt to propose new platforms or methods.
The rest of the paper is organized as follows: In Section II, However, as described in the aforementioned examples, a
the related work and the motivation of the paper are discussed. large number of systems focus on ZigBee whereas it is a
The concept of an e-health IoT-based system and a smart e- challenge to assure the quality of service in ZigBee when
health gateway are presented in section III. Section IV presents monitoring streaming bio-signals such as ECG, EMG and
an implementation of the smart IoT-based gateway. Demon- Electroencephalography (EEG) as the maximum data rate
strations and experimental results are provided in section V. of ZigBee is 250 kbps. Inversely, Bluetooth technology can
Finally, section VI concludes the paper and present discussion overcome problems of low data rate in ZigBee and other
for further researching. short range communication protocols. Nevertheless, it might
be more difficult to design a gateway based on Bluetooth
II. R ELATED W ORK AND M OTIVATION technology for supporting mobility and acquiring data from
There have been many efforts in designing smart gateways multiple targets [8]. The discussed systems basically dispense
for healthcare applications. For instance, Chen et al. [2] intro- conventional gateways for collecting data from nodes and
duce a smart gateway for health care system using wireless sending these data to remote servers. More precisely, none of
sensor network. The proposed gateway acting as a bridge these works have considered to fully take advantage of the fog
between wireless sensor network and public communication computing paradigm and bring intelligence to the gateways.
networks has a data decision system, a lightweight database
and an ability to notify caregivers in case of emergency. In
addition, the gateway provides a way of diminishing a remote
servers burden by applying the request and response message
method.
Mohapatra et al. discuss a hybrid framework for remote CLOUD
patient monitoring via a sensor cloud [3]. Advantages of using
a sensor cloud for patient health status monitoring is demon- Distributed
strated in their proposed system. In [4], authors present a FOG
Database
cloud computing solution for patients data collection in health
care institutions. The proposed system uses sensors attached to
medical equipments to collect patient data and sends the data Gateway
to cloud for providing ubiquitous access. Yang et al. present
a personal health monitoring gateway based on smart phone Wireless
[5]. The proposed gateway uses a Bluetooth interface to upload Sensors

gathered data to remote servers. In a work presented in [6],


the sensor network system uses sensing servers as gateways in
the system. However, the proposal is expensive, poor scalable,
and inefficient for the number of IoT-based applications. In Fig. 1. Fog computing concept
[7], authors discuss a prototype of a smart IPv6 Low power
personal area network (6LoWPAN) border router based on The main motivation of this paper is to enhance a health
Hidden Markov Model for making decisions of health states. monitoring IoT-based systems used in diversified environments
In [8], authors propose a mobile gateway for ubiquitous health such as home and hospital by providing a smart gateway [11]
care system using ZigBee and Bluetooth. The gateway tenders with the fog layer having quantities of advanced services.
various services such as alarms and analysis of medical data. The role of fog computing is illustrated in Fig. 1. It is a
However, the proposed gateway is inefficient in term of power middle computing layer between sensors and cloud computing
consumption and it cannot be considered as a novel gateway which consists of gateways and distributed databases. Fog
for several IoT-based applications. Zhong et al. present a computing concept is the extension of the cloud computing
gateway based on a mobile phone for connecting sensor paradigm in a view of pointing applications and domains
network nodes and devices supporting CDMA or Bluetooth which the paradigm of the cloud does not fully support. Some
[9]. In another work [10], the proposed architecture acquire of them consist of i) real-time applications including video
data via multiple personal health devices via USB, ZigBee or conference applications, and Voice over Internet Protocol
Bluetooth. (VoIP) require very low latency because substantial delays may
cause diminishing QoS. ii) large data applications collecting a a back-end part. The detailed description of these components
ton of data from numerous sensors and transmitting the data is presented in the following.
over networks stand in need of very high bandwidth [12]. iii)
monitoring applications, which operate unremittingly, require EEG
uninterrupted data in case of losing connectivity between
monitoring systems and the cloud [13]. Characteristics of Blood Pressure ECG Remote Serve @ Cloud
these aforementioned applications are similar to characteristics Temperature
of real-time health monitoring systems. In such systems, a
large amount data are acquired from a multitude of bio and EMG

environmental sensors. Then, the large data is transmitted for


networks for being ultimately remote monitoring by end users Gateway

such as care-givers or medical doctors. Therefore, fog com-


puting fits these systems marvellously. It is acknowledgeable
that instead of replacing or lessening the role of the cloud in End Users
IoT applications, fog computing is completely cooperated and
Fig. 2. The IoT-based health monitoring system architecture
compatible with the cloud to enhance existing IoT applications
from the aspects of location awareness, low latency, scalability,
real-time interactions, heterogeneity and interoperability [14]. 1) Medical sensor node: is a composition of several phys-
Electrooculography (EOG), EMG, EEG, ECG are important ical devices including implantable or wearable sensors which
signals gathered by monitoring systems for diagnosing human are integrated to a tiny wireless module for gathering contex-
health in both daily activities and medical abnormalities. How- tual and medical data such as temperature, location, humidity,
ever, in this paper, only a case study of ECG is addressed to SpO2, ECG, EMG, and EEG and then transmitting the data
present the concept of fog computing and its benefits in health to a gateway via a specific communication protocol such
monitoring IoT applications. In order to efficiently utilize as Wi-Fi, Bluetooth, ZigBee or 6LoWPAN. Depending on
network bandwidth between a health monitoring systems treatment methods for different diseases, particular bio-data
gateway and a cloud server, we present a flexible template with and the contextual data are intentionally focused in various
light-weight algorithms for extracting heart rate, P and T waves health monitoring WBAN-based systems.
which can be presented at an end-users browser. The extracted 2) Gateway: plays an important role in such a WBAN-
heart rate is presented at a secure graphical user interface and based system because it connects a profusion of sensor nodes
fed to our warning service for real-time notification in cases with a remote cloud server. When a gateway does not function
of emergency. In addition, a secure graphical user interface at properly or bottle-neck occurs at a gateway, the whole system
the smart gateway is used for representing result of P, T waves will be affected. As a result, real-time bio-data cannot be
after preprocessing and raw ECG data in graphical waveforms appropriately accessed at a cloud server.
for real-time visualization and analytics. Furthermore, we 3) Back-end part: consists of a cloud server and back-
introduce a method of providing gateway interoperability in services which can be different from systems to systems
the interest of supporting Ethernet, Wi-Fi, Bluetooth, ZigBee depending on technologies and services offered. A cloud
and 6LoWPAN. server is used for storing, processing and broadcasting data
while back-end services are responsible for representing real-
III. S YSTEM AND G ATEWAY A RCHITECTURE time data for analysis and visualization.
A health monitoring system often comprises of several The current human health monitoring WBAN-based sys-
devices to collect bio-data from a human body and transmit tems containing several existing challenges can be augmented
the data to a processing or visualization device via wires for shortening the gap towards the novelty level. In order
and cables for monitoring and diagnosis. Several drawbacks to achieve this target, smart gateways with fog computing
exist in such system such as unsupported mobility and remote substituting for gateways in conventional IoT-based health
monitoring which cause many inconveniences for both patients monitoring systems are introduced. Our proposed IoT-based
and doctors. For example, health of diabetes and cardiovaculus health monitoring system architecture is shown in Fig. 2.
needs to be continuously monitored 24/7. When the conven-
tional system is applied for this procedure, these patients must A. Smart gateway architecture
carry many devices and cables during long period of moni- In addition to perform functionalities of conventional gate-
toring hours and incorrect data is acquired due to movement ways, the smart gateway should have abilities to offer a high
activities of these patients. A health monitoring system based level of advanced services in the fog computing platform. The
on WBAN can handle these drawbacks effectively through its smart gateway architecture including physical and operational
characteristics of mobility and wireless transmission. Although structures is elaborately designed and described in the follow-
there are different types of health monitoring WBAN-based ing.
systems designed for particular bio-data and diseases, they The physical gateway structure shown in Fig. 3 includes
have three main parts including sensor nodes, a gateway and several embedded devices which are an embedded router and
one or several sink nodes. The embedded router supports ical components. Middleware receives the operating systems
some communication protocols such as Bluetooth Low Power instructions for allocating physical hardware to gateway ser-
(BLE), Wi-Fi and Ethernet but it cannot offer any possibility to vices. The hardware layer allows only one service to have a
connect with sensor nodes via low power wireless communica- permission to access the component at a time. When two or
tion protocols. With the purpose of handling this challenge and more services need to access the same component, the rest
achieving interoperability, sink nodes, which offers 6LoWPAN must wait for its turn to acquire permission.
and other low power communication protocols are integrated 2) Embedded operating system: There are two types of
into the gateway. The number of sink nodes does not limit embedded operating system used in a smart gateway including
within one or several ones but it can reach to dozens or even one type in the embedded router and another type in sink
a hundred depending on specifications of the USB extension, nodes. The embedded operating system in a sink node must
SPI, I2C connections and the Internet service provider. For be light-weight, compact, and does not require specification
example, the maximum tier for USB extension is tier 7 and of powerful hardware. Inversely, the operating system in the
the gogo6 service [15] provider allows a maximum of 256 embedded gateway does not need to be very compact because
sink nodes per a network. it has to provide various tools, and management mechanisms
to ensure that real-time data is transmitted into a remote cloud
SoC Single-board
server and all fog computing service function properly.
SPI GPIO I2C 3) Fog computing service layer: The fog computing service
layer plays the most essential role in a gateway because
SD SoC- Wi-Fi/Bluetooth Ethernet it contains a profusion of advanced services for not only
Card Processor Module Module embodying functionalities of a conventional gateway but also
performing characteristics of fog computing. Details of these
USB Physical Connector USB Hub Extension
services are described in the following.
Ethernet USB USB USB Distributed databases contain a static look-up storage, a
Module Module Module Module general purpose storage, and a synchronized storage. The static
RJ45 Cable USB Cable look-up storage contains static and essential data required
Ethernet USB for several services and algorithms (e.g., security with user-
SoC Sink Node
Module Module name and password, references for data accessing and access
GATEWAY management); therefore, the static database is kept intact for
all cases except for the case of system administrators. The
Fig. 3. Physical gateway structure general purpose storage storing high data rate incoming data
is used for both the fog computing service and graphical
The embedded router contains different components such user interface. The general purpose database size can vary
as processor, extendable SD card, USB connection, Ethernet, depending on specific applications. The synchronized storage
GPIO with SPI and I2C support, and a wireless connection is as an inventory of temporarily environmental data and
module. Therefore, it can be able to run an operating system bio-data which are sent from sensor nodes with a low data
and process some heavy computing, which are clarified via the rate such as temperature, and humidity. Furthermore, it has
operational structure shown in Fig. 4. It presents the gateway responsibility for updating data at a remote server.
operational structure comprising of a fog computing service ECG feature extraction: ECG feature extraction has been
layer, an embedded operating system and a hardware layer. processed and carried in many researches due to its important
role in many applications, especially in healthcare domain. For
Distributed Databases ECG feature extraction IP Tunneling
example, in addition to help doctors monitoring and giving
treatments to many diseases related to cardiovascular more
Graphical Interface with Access Management Real-time Notification efficiently, it helps to detect some abnormalities of the heart.
Heart rate is one of the most concerned features extracted
Location Awareness Heterogeneity and Interoperability
from ECG because it provides an overview of the heart
Fog Computing Service Layer which is necessary for emergency services and diagnosing
Embedded Operating System many diseases. Furthermore, via heart rate information, some
instant methods might be applied to keep the heart operating
Ethernet USB SD Wi-Fi ... normally. For instance, a workout person can reduce the
CPU DSP GPIO Display
Connector Ports Card Module
workout intensity level when heart rate is very high because
Hardware
heart rate is proportional with the workout intensity.
GATEWAY
In order to extract the ECG feature at a smart gateway,
Fig. 4. Operational gateway structure we design a flexible template shown in Fig. 5. The tem-
plate contains three main parts including ECG preprocessing,
1) Hardware layer: A hardware layer operates as middle- wavelet transformation, and ECG feature extraction. The ECG
ware between an embedded operating system and all phys- preprocessing part contains some filters such as notch filter
or moving average filter in pursuance of movement artifact database, a user only has three chances during 10 minutes to
removal. The wavelet transformation part encompasses fast login into the system. After three failed times, a user needs
computation methods and wavelet algorithms. Finally, the to wait for extra 10 minutes for the next login. Due to the
ECG extraction part is used for applying various algorithms for limitation of the gateways resources, all recorded data are
extracting different data such as P-R interval, Q-T interval, S-T stored in the database within 5 minutes. After that, the database
segment, QRS area and QRS energy. In this paper, we design will be purged for storing new incoming data.
a light-weight algorithm which is suitable with requirements Real-time notification: The notification service is a real-
of fast computation and low hardware resources consumption time notification to inform about abnormal situations. The
with the purpose of extracting P wave, T wave and heart rate gateway sends some real-time signals to a remote cloud which
from original ECG signals for keeping track of the hearts sends notification messages to an end users device when one
activities and verifying the smart gateways warning service. of three following cases occurs. Firstly, the smart gateway
The algorithm includes specifying a proper threshold value via does not receive any data from specific sensor nodes during a
scanning the whole ECG input signals, extracting the number particular period of time. Secondly, an internal temperature
of pulses via the help of the threshold value, and calculating of an embedded gateway or a sink node is higher than a
heart rate based on the formula given as predefined threshold. Finally, heart rate is not in the range
60 of normal heart rate which is defined by American Heart
Heart rate = [16] Association. Notification messages are categorized into three
R-R interval
groups having level 1, 2 and 3, respectively. Depending on
The algorithm is designed in such a way that some parts of particular situations, the push notification generates different
the algorithm can be reused for extracting other data besides messages with corresponding levels. For example, when the
R-R interval, P wave, T wave and heart rate. For instance, temperature of the embedded gateway is 50, 60, and 70 Celsius
steps of scanning ECG signals and the method of calculating degrees, the push notification service sends warning messages
a threshold value are two reusable parts of the algorithm level 1, 2, and 3 to system administrators, respectively. The
although parameters of these methods may vary depending on higher warning level, the more urgent and critical the situation
which parts of ECG signals, medical doctors want to diagnose. is. Similarly, this mechanism is applied for other cases.
Location awareness: Location awareness, which is used for
R-R
Interval
providing information of geographical location of a device, is
Raw Movement Wavelet Threshold Peak supported in our system via a method of tracking a physical
and Heart
ECG Artifact Transfor Estimation Detecti
signal Removal -mation for R wave on
Beat MAC address of the systems gateway. Typically, a single
Calcula-
gateway is setup for serving one or server rooms in the same
tion
corridor with the purpose of diminishing the complexity of
Threshold P wave Detection
the location awareness service and enhancing QoS. Through
Estimation the location awareness service, the system administrators or
for P wave
and T
caregivers can properly detect a patient location without any
wave T wave Detection effort, which is necessary in case of emergency. In addition, the
service is in conjunction with a congestion recognition mech-
Fig. 5. The ECG feature extraction template anism which is used for monitoring an amount of incoming
data of a gateway in an instant time in the direction of avoiding
Graphical user interface with access management: The possibilities of exceeding a gateways bandwidth limit. When
interface can be used by end users such as caregivers, medical the amount of incoming data is too large, the service sends an
doctors and system administrators for visualizing ECG and instant signal to the real-time notification service which then
other bio-data at the smart gateway. In order to have an access notifies an administrator with real-time messages.
to the gateways graphical user interface, a user must login Heterogeneity and Interoperability: Cloud computing phys-
with his/her username and password which are created via ical infrastructure can be described as a combination of homo-
the access management service. The service has a mechanism geneous physical resources which are deployed and managed
which categorizes end users into several groups depending on in a centralized manner. In contrast, fog computing physical
their responsibilities. Data available for each group will be infrastructure consist of heterogeneous resources managed in a
different. For example, some sensitive data can be seen by distributed manner. Therefore, fog computing has possibilities
medical doctors while the data is unavailable to patients or of supporting interoperability which is an ability of serving
their relatives. The main reason for building this mechanism different devices in terms of various manufactures, models,
is to avoid some unexpected situations related to patients different operating systems and inconsistent communication
reaction during the disease treatment process. For example, protocols. The gateway architecture is designed in a way of
when a patient knows his/her current status health, the patient supporting many operating systems and several versions of
may overreacts or has some strong emotions which may an operating system type. For instance, different versions of
cause bad effects for disease treatment. With the intention of Linux can be installed as an operating system of a gateway.
avoiding both the brute-force method and flooding the systems Moreover, sensor nodes produced from various producers
including Texas Instrument, Zigduino, Arago Systems, and system, various software support and high performance. In
Zolertia operating under inconsistent communication proto- addition, Linaro operating system, which is another embedded
col standards such as Wi-Fi, 6LoWPAN, and Bluetooth can Linux operating system, is installed in another gateway for
connect with the gateway for establishing a complete hetero- proving the gateways interoperability in terms of operating
geneous wireless sensor network. system support. Furthermore, we experiment heterogeneity and
IP tunneling: IP tunneling constructed by a combination interoperability in our gateway by applying various hardware
of router advertisement daemon and gogoc services is a gate- including Arduino with Wi-Fi shield, TI CC2538, Zigduino,
way service for connecting 6LoWPAN with IPv4/IPv6. The Z1, and Arduino with HC-05 Bluetooth module as wireless
router advertisement daemon service has two main functions sensor network nodes for collecting and sending data to the
including router advertisement provision and router solicitation gateway via different communication protocols such as Wi-Fi,
listening while the gogoc service is responsible for querying 6LoWPAN, ZigBee and Bluetooth.
a tunneling between a gateway and a tunnel server. MySQL comprising of sub-databases and tables is used as
a main inventory for storing configurations of services and
IV. S MART G ATEWAY I MPLEMENTATION mechanisms, e-health and environmental data. The MySQL
Our smart gateway is built by combining various embedded ensures that the data in a remote server is always updated
hardware including Pandaboard [17] and a 6LoWPAN sink regularly via the support of the third party tool (i.e., xSQL
node, as shown in Fig. 6. Pandaboard is used in our imple- Lite database synchronization tool).
mentation because it is constructed from the OMAP 4 platform
which is a power efficiency and high performance system-on-
chip. The processor of the OMAP 4 platform comprises of
dual-core ARM Cortex-A9 MPCore in which the speed of each
core is more than 1 GHz. The processor is suitable with our
application due to its characteristics such as power efficiency,
symmetric multiprocessing, hardware accelerator provision
(i.e., a programmable digital signal processor). Furthermore,
the platform supports non-volatile and volatile memories via
high performance and comprehensive controllers. Therefore,
external memory such as 64 GB SD card can be appended
into Pandaboard for serving as a system storage. Additionally,
Pandaboard is capable of dealing with different communi-
cation protocols such as Ethernet, Wi-Fi, and Bluetooth via
various interfaces and pre-integrated hardware modules.

Fig. 7. Four-level Discrete Wavelet Decomposition

In a direction of implementing fog computing in the smart


e-health gateway, many services and tools including gogoc,
tunslip, router advertisement, socket receiver, push notifica-
tion, graphical interface with access management are applied
or constructed.
With a view of gateway workload reduction, a push noti-
fication service is completely implemented in a cloud server
by using WebSocket. In the gateway, only a push notification
mechanism is created. When the push notification service in
cloud receives a desired signal from the gateway, it sends a
notification to end users or system administrators.
With the interest of ECG heart rate, P wave, T wave
extraction, we applied our proposed template. As mentioned
Fig. 6. Demonstration of our smart IoT-based healthcare gateway above, the template has several phases including movement ar-
tifact removal, wavelet transform and ECG feature extraction.
Moreover, the OMAP4 platform supports different operating Initially, the baseline drift elimination step is implemented
systems and applications such as Symbian, Linux (LiMo, An- with a 20-points moving average filter. Then Discrete Wavelet
droid, Ubuntu), and Windows Mobile. Convincingly, Ubuntu Decomposition (DWT) with db 4 wavelet, which is in the
is selected as the gateways operating system in our imple- family of Daubechies, is used as the mother wavelet. With the
mentation due to its benefits including open-source operating purpose of achieving proper results, a 4-level DWT shown in
Fig. 7, is applied. Finally, R-R interval value, P wave, T wave is compared with a total latency of processing the fog com-
and heart rate can be extracted. puting service and transmitting preprocessed ECG data. The
Graphical user interface is built by MySQL database, PHP comparison results shown in Table I are achieved via Wi-
used as server-side scripting and JavaScript (JQuery) for Fi whose information such as network condition, data rate,
HTML content generation such as plotting charts. All mecha- frequency and link quality are provided in Table II. In case
nisms for access management, verifying username, password of fog computing, a volume of data transmitted over Wi-Fi is
and checking the number of login times are built in PHP with small on the grounds that processed data including heart rate,
the assistance of MySQL database. P wave, and T wave is transmitted.
A 6LoWPAN sink node consists of three components such
as the Olimex Ethernet module [18], the TI Smart RF06 TABLE I
board, and the CC2538 module [19], shown in Fig. 6. The DATA RATE AND LATENCY COMPARISON
Ethernet module is used for data communicating between the Data
Raw data Fog computing Improvement
6LoWPAN sink node and Pandaboard. The CC2538 module rate
(Mb/s) Data
takes responsibility for receiving data from sensor nodes Latency
Data Latency Data Process- Transmit- size
through 6LoWPAN while the TI Smart RF06 board is used reduc-
size(B) (ms) size(B) ing(ms) ting(ms) reduc-
tion(%)
for interface provision and debugging. tion(%)
18 106.6 66.6 >3.5
V. E XPERIMENTAL R ESULTS AND DEMONSTRATION 12 240000 152.2 615840 96.3 69.5 >93 >30.5
9 213.3 613.5 >48.5
According to MIT-BIT Arrhythmia database [20], ECG
signals were recorded from 47 subjects by two-channel ambu-
latory ECG system and the recordings were digitized at 360 TABLE II
samples per second per channel with 11-bit resolution over I NFORMATION OF W I -F I NETWORK
a 10 mV range. In addition, the database recorded a large
Network condition Data rate Frequency Link quality
number of statistics and records related to ECG data such as a Not busy 18Mbit/s 2.437GHz 53/70
total number of normal heart beats and other types heat beats Busy 12Mbit/s 2.412GHz 51/70
during 30 minutes recording time of each person. Due to these Busiest 9Mbit/s 2.402GHz 50/70
statistics, ECG data in the MIT-BIT Arrhythmia database is
a suitable candidate for our experiments. Initially, ECG data
was stored in the gateway storage and then processed with the
fog computing service. Finally, ECG features (e.g., heart rate,
P wave and T wave) were extracted. In order to have a closer
view to our proposed template functionality, we applied the file
101 from MIT-BIT Arrhythmia database into the template.
The result is shown in Fig. 8.

Fig. 9. ECG waveforms

Throughout these reported results, the fog computing ser-


vice is efficient in terms of transmission latency minimization.
In addition, the fog computing service helps to reduce the
number of data transmitted over a network. As a consequence,
a volume of transmitted data reduce dramatically, which leads
to efficient utilization of network bandwidth.
As mentioned above, users can log in to our gateway
graphical user interface by their usernames and passwords for
Fig. 8. ECG processing implementation visualizing and diagnosing real-time ECG data shown in Fig.
9, P wave, T wave and heart rate. In this experiment, instead of
With the intention of presenting benefits of fog comput- using ECG data from the MIT-BIT Arrhythmia database, ECG
ing towards a healthcare IoT system, latency of transmitting data is collected from nodes and sent to the smart gateway via
various raw ECG data from the gateway to a remote cloud Wi-Fi. In addition, the gateway user interface is designed for
achieving user friendliness with several functional buttons for [14] F. Bonomi, R. Milito, J. Zhu, and S. Addepalli, Fog computing and its
manipulating ECG waveforms. role in the internet of things, in Proceedings of the first edition of the
MCC workshop on Mobile cloud computing. ACM, 2012, pp. 1316.
[15] J. Whitby, Systemd for gogoc, http://www.gogo6.com/forum/topics/
VI. C ONCLUSION AND D ISCUSSION systemd-for-gogoc, jun 2012.
In this paper, we present fog computing at a gateway for [16] K. Goh, J. Lavanya, Y. Kim, E. Tan, and C. Soh, A pda-based ecg
beat detector for home cardiac care, in IEEE-EMBS 2005. 27th Annual
augmenting health monitoring systems. We have implemented International Conference of the Engineering in Medicine and Biology
fog computing services including interoperability, distributed Society, 2005. IEEE, 2006, pp. 375378.
database, real-time notification mechanism, location awareness [17] Resources, pandaboard.org. http://pandaboard.org/content/resources/
references.
and graphical user interface with access management. In ad- [18] Olimex. mod-enc28j60 development board, users manual.
dition, we introduce a flexible, light-weight template for ECG https://www.olimex.com/Products/Modules/Ethernet-/MOD-ENC28J60/
feature (e.g. heart rate, P wave, and T wave) extraction. The resources/MOD-ENC28J60.pdf.
[19] Smartrf06 evaluation board users guide (rev.a). http://www.ti.com/lit/
demonstration and results show the achievements provided by pdf/swru321.
the smart gateway. The template based on wavelet transform [20] G. B. Moody and R. G. Mark, The impact of the mit-bih arrhyth-
can be used for extracting various ECG features by detecting mia database, Engineering in Medicine and Biology Magazine, IEEE,
vol. 20, no. 3, pp. 4550, 2001.
different parts of ECG waveforms (e.g. PR interval, and QT
interval), or extracting EMG, EEG features.

R EFERENCES
[1] J. Burt, Fog computing aims to reduce processing
burden of cloud systems, http://www.eweek.com/networking/
fog-computing-aims-to-reduce-processing-burden-of-cloud-systems.
html, 2010.
[2] Y. Chen, W. Shen, H. Huo, and Y. Xu, A smart gateway for health care
system using wireless sensor network, in 2010 Fourth International
Conference on Sensor Technologies and Applications (SENSORCOMM),
July 2010, pp. 545550.
[3] S. Mohapatra and K. S. Rekha, Sensor-cloud: a hybrid framework for
remote patient monitoring, Int. J. Comput. Appl, vol. 55, no. 2, pp.
111, 2012.
[4] C. O. Rolim, F. L. Koch, C. B. Westphall, J. Werner, A. Fracalossi,
and G. S. Salvador, A cloud computing solution for patients data
collection in health care institutions, in ETELEMED10. Second In-
ternational Conference on eHealth, Telemedicine, and Social Medicine,
2010. IEEE, 2010, pp. 9599.
[5] S. Yang and M. Gerla, Personal gateway in mobile health monitoring,
in 2011 IEEE International Conference on Pervasive Computing and
Communications Workshops (PERCOM Workshops), March 2011, pp.
636641.
[6] J. W. Yoon, Y. K. Ku, C. S. Nam, and D. R. Shin, Sensor network mid-
dleware for distributed and heterogeneous environments, in NISS09.
International Conference on New Trends in Information and Service
Science, 2009. IEEE, 2009, pp. 979982.
[7] W. Shen, Y. Xu, D. Xie, T. Zhang, and A. Johansson, Smart border
routers for ehealthcare wireless sensor networks, in 2011 7th Interna-
tional Conference on Wireless Communications, Networking and Mobile
Computing (WiCOM), Sept 2011, pp. 14.
[8] T. H. Laine, C. Lee, and H. Suk, Mobile gateway for ubiquitous health
care system using zigbee and bluetooth, in 2014 Eighth International
Conference on Innovative Mobile and Internet Services in Ubiquitous
Computing (IMIS). IEEE, 2014, pp. 139145.
[9] A Phone-centered body sensor network platform: Cost, energy efficiency
& user interface. Institute of Electrical and Electronics Engineers,
Inc., April 2006. [Online]. Available: http://research.microsoft.com/
apps/pubs/default.aspx?id=103003
[10] K. Park and J. Pak, An integrated gateway for various phds in u-
healthcare environments, BioMed Research International, vol. 2012,
2012.
[11] A. M. Rahmani, N. K. Thanigaivelan, T. N. Gia, J. Granados, B. Negash,
P. Liljeberg, and H. Tenhunen, Smart e-health gateway: Bringing in-
telligence to internet-of-things based ubiquitous healthcare systems, in
Annual IEEE Consumer Communications and Networking Conference.
IEEE, 2015, pp. 826834.
[12] F. Bonomi, R. Milito, P. Natarajan, and J. Zhu, Fog computing: A
platform for internet of things and analytics, in Big Data and Internet
of Things: A Roadmap for Smart Environments. Springer, 2014, pp.
169186.
[13] N. Bessis and C. Dobre, Big data and internet of things: a roadmap for
smart environments. Springer, 2014.

You might also like