JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 1
IoT-based Remote Pain Monitoring System: from
Device to Cloud Platform
Geng Yang, Member, IEEE, Mingzhe Jiang, Student Member, IEEE, Wei Ouyang,
Guangchao Ji, Student Member, IEEE, Amir M. Rahmani, Senior Member, IEEE, Pasi Liljeberg, Member, IEEE,
and Hannu Tenhunen, Member, IEEE
Abstract—Facial expressions are among behavioural signs of
pain that can be employed as an entry point to develop an
automatic human pain assessment tool. Such a tool can be
an alternative to the self-report method and particularly serve
patients who are unable to self-report like patients in the
Intensive Care Unit and minors. In this paper, a wearable device
with a bio-sensing facial mask is proposed to monitor pain
intensity of a patient by utilizing facial surface electromyogram
(sEMG). The wearable device works as a wireless sensor node and
is integrated into an Internet of Things system for remote pain
monitoring. In the sensor node up to eight channels of sEMG can
be each sampled at 1000 Hz, to cover its full frequency range,
and transmitted to the cloud server via the gateway in real-
time. In addition, both low energy consumption and wearing
comfort are considered throughout the wearable device design
for long term monitoring. To remotely illustrate real-time pain
data to caregivers, a mobile web application is developed for
real-time streaming of high-volume sEMG data, digital signal
processing, interpreting, and visualization. The cloud platform
in the system act as a bridge between sensor node and web
browser, managing wireless communication between server and
the web application. In summary, this study proposes a scalable
IoT system for real-time biopotential monitoring and a wearable
solution for automatic pain assessment via facial expressions.
Index Terms—Pain assessment, Healthcare Internet-of-Things
(IoT), Biopotential sensor node, Wearable sensors, Cloud com-
puting, Web-based UI for IoT applications
REMOTE health monitoring systems in hospital or home
is required to reduce the overall healthcare cost and
optimizing healthcare processes and work-ﬂows [1–3]. Pain is
among the key remote monitoring indexes as a vital indicator
in disease diagnosis and relieving discomfort of patients.
Some tele-health research efforts have been done through
This work was supported in part by Fundamental Research Funds for the
Central Universities, and the Science Fund for Creative Research Groupsof
the National Natural Science Foundation of China (GrantNo.51521064)
G. Yang is with State Key Laboratory of Fluid Power and Mechatronic
Systems, College of Mechanical Engineering, Zhejiang University, China.
M. Jiang and P. Liljeberg are with Department of Future Technologies,
University of Turku, Finland. (Email: mizhji, pasi.liljeberg@utu.ﬁ)
A. M. Rahmani is with Department of Computer Science, University of
California Irvine, USA and Institute of Computer Technology, TU Wien,
Austria. (Email: firstname.lastname@example.org)
W. Ouyang is with Imaging and Modeling Unit, Institut Pasteur, France.
G. Ji is with School of Technology and Health, KTH Royal Institute of
Technology, Stockholm, Sweden. (Email: email@example.com)
H. Tenhunen is with Department of Future Technologies, University of
Turku, Finland and Department of Industrial and Medical Electronics, KTH
Royal Institute of Technology, Sweden. (Email: firstname.lastname@example.org)
telephone-based, web-based or mobile application question-
naire answered by patients themselves across various patient
groups [2, 4–7]. The questionnaire includes pain intensity in
visual analog scale, pain location, and medications for patients
at home. Results from those researches indicate that such
remote pain monitoring and feedback system is feasible and
effective in monitoring daily pain state. However, there are
several constrains in the self-report methods. People’s non-
compliance to manual entry of daily information, especially in
long-term monitoring, is one of such issues . The second
limitation is that such methods are not suitable for the group
of people with limited cognition and expressing abilities, such
as neonates, elderly, and sedated patients in Intensive Care
Unit (ICU). The third shortcoming of conventional approaches
lies in the lacking of efﬁcient way providing patients with
continuous and real time pain state monitoring. As a result,
patients are exposed to severe and long lasting pain due to
delayed access to medical treatment and prolonged waiting
time. These were the rationale behind the recent studies on
objective and automatic pain intensity monitoring methods.
Some efforts have been devoted to achieving automatic
pain assessment, either from the approach of facial expression
recognition in face video  or physiological signal fusion
. However, there exist limited efforts in integrating auto-
matic pain assessment with remote health monitoring systems
[10, 11]. In this paper, both cloud and Internet of Things
(IoT) technologies are leveraged to propose an automatic pain
assessment tool for remote patient monitoring systems. The
system proposed in this paper is targeted for inpatients and
ICU patients, utilizing a novel pain intensity detection tool as
an alternative to face video.
The pain intensity detection tool proposed in this study
detects and evaluates pain from facial expressions by mon-
itoring facial surface electromyography (sEMG). The facial
muscle activities are monitored by a facial mask embedded
with surface sensors which can be developed into a wearable
device and further integrated into a remote monitoring system.
In addition to the proposed pain assessment tool, a remote
pain monitoring system is also presented in this study having
the function of multi-channel biopotential data acquisition,
wireless data transmission, signal processing and remote data
visualization. The proposed system involves both sensing
devices and a cloud-based back-end supporting patients who
have access to Wi-Fi hotspot and caregivers using a computer
or a smart device with web browsing feature. The cloud-based
back-end enables the system to be extendable with advanced
JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 2
data analytics such as big data processing and deep learning.
To summarize, the main contributions of this article are as
•proposing a wearable bio-sensing mask for capturing
facial expression in pain monitoring application.
•designing a low-power and miniaturized eight-channel
biopotential sensing and processing module with Wi-Fi
•developing a cross-platform interactive mobile web ap-
plication for recording, processing, interpreting, and vi-
sualization of biopotential data stream.
•implementing a cloud-based platform with data storage
and web server, customized for high data rate streaming
IoT applications capable of synchronizing data with the
•evaluating the pain states using multi-channel facial
The rest of the paper is organized as follows. In Section II,
literature review and requirement analysis are stated from the
device and system viewpoints. Section III illustrates the ap-
plication scenario, remote pain monitoring in hospital. System
architecture and its elements are also presented in the same
section, covering all the components from wearable sensor
node, gateway, and cloud server to mobile web application.
Section IV then presents the implementation of each compo-
nent in detail. System evaluation is presented in Section V,
while Section VI concludes the paper.
II. MOT IVATIO N AN D REL ATED WO RK
This study is motivated by the fact that a growing demand
for automatic pain assessment arises in hospitals to improve
the quality of care for patients and also to facilitate the
work-ﬂow for medical staff. Facial expression is among the
behavioral signs in pain assessment tool for patients unable
to self-report, and thus it is taken as an index of pain in the
remote pain monitorin system. To meet the requirements of
multi-channel biopotential acquisition and transmission in an
IoT framework, the concept of a wearable sensor node for
pain monitoring is proposed. A corresponding IoT architecture
with a mobile web application is meanwhile customized for
biopotential processing and pain remote monitoring.
In terms of pain related facial expressions, ﬁve facial
muscles (corrugator, orbicularis oculi, levator, zygomatic and
risorius) are involved in adults . Existing wearable or
portable sEMG devices are application speciﬁc for limb
muscles [13, 14] and bulky in size which are not proper
for tiny muscles. Moreover, sensor is usually designed as
channel independent when having the function of wireless data
transmission. There is a wearable facial EMG device designed
in . It estimates the user’s positive or negative emotion
from two channels of EMG on the side of the face, while the
facial expressions of pain involve more facial muscles than
those on the side of the face. A compact and unobtrusive
multiple-channel sEMG sensing device is therefore designed
in this study to measure the activity of tiny facial muscles for
pain assessment application. Furthermore, the captured sEMG
signal can be then processed and displayed in real-time with
the support from the system.
There are several concerns in designing the wearable sEMG
device and the ﬁrst one comes with biopotential signal quality.
Electrode to skin contact impedance is one parameter relates
to signal quality, where high impedance could cause weak
conductivity between the electrodes and the skin and therefore
degrade the signal to noise ratio and ekectrolyte gel is usually
used to reduce such impedance . In addition, biopotentials
are prone to be corrupted by electrical interference coupled to
human body and unshielded lead wires particularly when lead
wires are long . This issue is usually solved by applying 50
Hz or 60 Hz notch ﬁlter to raw samples. The second technical
concern is the power consumption of the sensor node as a
battery powered device. From the system point of view, data
processing can be done on the sensor and then the results
are sent to the server , or alternatively, original data is
transmitted to the fog/cloud server for processing [19–21]. The
latter case may save energy for the device and help reach a
balance between device energy consumption and transmission
delay. Besides those technical concerns, comfortableness is
also one key point in designing a wearable device.
To monitor biosignal stream from the caregiver end user’s
perspective, web service is a solution to real-time or near real-
time data visualization in an IoT platform . Compared
with developing a web application or a mobile application for
a single platform, a hybrid application is more interoperable
and can be used across multiple mobile platforms such as
Android, iOS, Windows Phone and Blackberry where the web
application runs in mobile browsers [23, 24]. Therefore, the
mobile application in this work is built in a Hybrid Mobile
App UI framework.
III. REM OTE PAIN MONITORING SYS TE M
The IoT-based remote pain monitoring application and its
architecture are shown in Fig. 1, which is designed for the
real-time central monitoring of inpatients and intensive care
patients in hospital. It is composed of four parts:
Fig. 1. Remote pain monitoring in hospital for inpatients and ICU patients
1) Wearable sensor node: The sensor node is composed of
a passive sEMG sensor facial mask and sEMG sensing and
processing module. The mask is built on soft and stretchable
material. It is replaceable after use. While the hardware
module is reusable responsible for biosignal conditioning,
digitalization and wireless data transmission. The electrodes
integrated on the inner side surface of the mask are closely
attached to facial skin for reliable sEMG measurement. The
placement of the electrodes is determined by the targeted
JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 3
Fig. 2. The structure of IoT-based biopotential measurement system and cloud-based data ﬂow in the automatic pain monitoring system
facial muscles. Due to the soft nature of the implemented
mask, the electrode position and the shape of the mask can be
slightly adjusted accordingly to accommodate individual facial
2) Gateway: As the intermedia between sensor nodes and
cloud, the gateway can be a general router, personal hotspot
of a cellphone, or a smart gateway supporting with added
features such as heterogeneity, scalability and reliability .
The system can beneﬁt from smart gateways especially when
heterogeneous data and communication technologies exist in
the overall healthcare remote monitoring system.
3) Cloud server: The cloud server receives data from the
sensor nodes with UDP or TCP protocol, then forwards to a
data streaming channel which can be connected with another
database server for storage and any device with a HTML5-
enabled web browser. This server model are compatible with
cloud computing models such as Software as a Service (SaaS)
and Platform as a Service (PaaS), which could be a key
advantage for further signal processing and data mining, as
4) Mobile web application: In this architecture, a HTML5-
based mobile application acts as an interactive interface be-
tween system and caregivers. It can render real-time waveform,
conduct lightweight algorithms, save data to an in-browser
database and synchronize with the remote database servers.
The web browser based application is a client-server software
application, in which the user interface runs in a web browser.
One of noticeable advantages of the implemented web app
is that it can be widely applied on various terminal devices.
In general, it is a cross-platform app, compatible with main-
stream operating systems, such as MS Windows, Mac OS, and
Android. The implemented web app is capable of running on
any terminal devices equipped with a web browser, including
stationary terminals and mobile devices.
IV. DEVICE DES IG N AN D SYS TE M IMPLEMENTATION
The implemented IoT based pain monitoring system can be
divided into three main functional parts, as shown in Fig. 2.
The ﬁrst part is a wearable sensor for multi-channel sEMG
acquisition, which includes a biopotential acquisition sensor
node and a wearable bio-sensing mask. The sensor node also
works as a UDP client transmitting data to the cloud through
the gateway. The second part of the implementation is the
cloud server, which is in charge of wireless data transmission
from the sensor node to remote caregivers by using UDP
communication and websockets. Moreover, it also contains the
node.js server for the mobile application and a database for
synchronizing the recorded data ﬁles selected by end users,
caregivers. The third part is web application embedded with
digital signal processing. It includes dynamic sEMG waveform
display on devices across operating systems. The entire system
implementation and data transmission ﬂow are illustrated in
Fig. 2. The details of each part are presented in the subsections
A. Wearable sensor design for pain monitoring
The sensor node is ﬁrst designed to meet the data acquisition
and transmission requirement considering the data rate of
sEMG. Then the whole sensor node is integrated including
functional modules, battery power supply and skin-friendly
device packaging. Another part of the design is a facial mask
embedded with passive electrodes for wearable use. The facial
mask together with the sensor node constitutes the wearable
sensor monitoring facial sEMG.
1) Sensor node design for biopotential acquisition: As a
continuously running wearable device, low power consump-
tion is taken into consideration during the design process.
Therefore, a low power analog front end (AFE) ADS1198 
is chosen for biopotential measurement, which is an eight-
channel AFE with 16-bit analog to digital resolution and a
programable gain from 1 to 12. The sampling rate of each
channel is programmable and is set to 1000 samples per
second (SPS) to cover the full bandwidth of sEMG signal
 according to Nyquist sampling theorem and the gain is
set to be 12. So the data rate with full channel transmission
is 128 Kbps at a minimum. RTX4140 Wi-Fi module 
is utilized due to SPI communicating with ADS1198, its
Wi-Fi functionality and its outstanding power performance
JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 4
among low power Wi-Fi Modules . On the basis of these
two modules, the sensor node is implemented by hardware
design and software co-design using Co-Located application
framework in the Micro Controller Unit of RTX4140.
2) Sensor node integration: Since the proposed wearable
device will be ﬁnally attached on a users face as a soft mask,
considerable efforts are made to address the user experience
issues. Ideally the skin-attached sensing devices should be
miniaturized, unobtrusive, and long lasting in nature. Consider-
ing the implemented mask-like device is design for continuous
pain status monitoring, several practical issues have been taken
into consideration during the prototype design from the aspects
of users’ comfortableness prototype is implemented on ﬂexible
printed circuit board which is bendable to naturally ﬁt to the
curve of human face. Electronic modules and peripheral com-
ponents are mounted on the front side of the ﬂexible printed
circuit board while a coin battery and electrode interface are
mounted on the back side. The dimension of the implemented
electronic core module is around 30 mm ×60 mm, as shown
in Fig. 3.
Fig. 3. Miniaturized ﬂexible sEMG sensor encapsulated by a thin waterproof
In addition, in most cases, constant exposure to moisture
and water, e.g. sweat, is one of the leading causes of elec-
tronic failure in wearable devices. The same applies to the
implemented mask sensor proposed in this paper. Further
enhancement is needed during integration process to protect
the inner electronic components against moisture and water.
One straightforward and efﬁcient approach is to encapsulate
the electronic components by using waterprooﬁng thin dress-
ing materials. 3M Tegaderm adhesive dressing is adopted to
encapsulate the electronics modules while leaving openings
for the electrode interface and battery socket on the back side.
The encapsulating layer is very thin (with the sickness of 0.46
mm), yet highly absorbent, with excellent vapour permeability.
The thin dressing is semi-transparent, allowing the observation
of inner condition of the electronics and the running status
of the device, e.g. the blinking of LED for status indication.
By applying the thin dressing layer over the electronic parts,
the devices mechanical and electrical reliability is further
enhanced, in the meantime, making the device waterproof
yet with excellent moisture permeability. As shown in Fig. 3,
the implemented ﬂexible sensing device is thin and bendable
addressing on user comfortableness issues. It will serve as
the core module of the proposed smart mask for remote pain
3) Wearable bio-sensing facial mask: The main facial mus-
cles under monitoring are listed in Table I. Most of the muscles
are involved in one or several facial action units (AU) in Facial
Action Coding System  as pain behaviors . To mon-
itor the activities of these facial muscles, passive electrodes
are placed on one side of the face following Fridlund and
Cacioppo Guidelines .
FACI AL MU SC LES U ND ER MO NIT OR ING A ND T HE TAR GET ED FAC IAL
Channel Muscular basis AU
2 Corrugator Brow lower (AU 4)
3 Orbicularis oculi Lids tighten (AU 6)
Cheek raise (AU 7)
4 Levator Nose wrinkle (AU 9)
Upper lip raiser (AU 10)
Eyes close (AU 43)
5 Zygomatic Lip corner pull (AU 12)
6 Risorius Horizontal mouth stretch (AU 20)
Fig 4(a) shows the concept of the facial mask, which
includes two part, a sensor node and a soft facial mask.
The sensor node part is to, condition, digitalize and wireless
transmit sEMG signal, as mentioned above. While the soft
facial mask part is to capture multiple channel sEMG. To
work compatible with the sensor node, the soft facial mask
integrates electrode leads as the connection between electrodes
and the sensor node in addition to the conductive electrodes
for capturing sEMG signal. Six biopotential channels are
employed on the mask to monitor six facial areas in monopolar
conﬁguration. In monopolar conﬁguration, each channel of
biopotential is captured with respect to the common reference
electrode placed on the bony area behind the ear. In this
way, the amount of electrodes and connecting leads is reduced
comparing with biopolar conﬁguration where both differential
input electrodes to an ampliﬁer are placed near to each other
in the same facial area.
The proposed mask is implemented by integrating the
detecting electrodes into soft polydimethylsiloxane (PDMS)
substrate. As a result, the designed mask is easy-to-apply,
and one-step solution, which can largely save the valuable
time of the care givers when making setting up for sensing
vital bio-signals from patients, in particular in the ICU ward
environment. The implementation of the facial mask design is
presented in Fig. 4(b). The customized facial mask is based
on transparent polydimethylsiloxane (PDMS) material. The
softness of PDMS makes the mask ﬁt well on the curvature
of the user’s face. The thickness of the manufactured mask
is 100 µm. In the process of molding the mask, six pre-
gelled Ag/AgCl electrodes are placed on the molding substrate
and therefore embedded in the mask. The mask in Fig. 4(b)
JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 5
(a) Design concept of the facial mask (b) Electrodes-embedded facial mask (c) The complete wearable device
Fig. 4. Design concept and implementation of the pain assessment facial mask
weights 7.81 g. (Reviewer 3.2: Since the PDMS substrate is
soft and stretchable which make it favorable for deforming the
shape of the mask and adjusting the electrode positions to the
corresponding detection points on patients face. )
Finally, the entirety of the pain assessment tool is presented
in Fig 4(c) with the integrated Wi-Fi sensor node attached
behind the ear, the electrode-embedded PDMS facial mask
and the leads connecting these two parts. The overall weight
of the implemented pain assessment tool is 39.08 g, which is
light and causes little burden to the user in long term use.
B. Cloud server
As presented in Fig. 2, the implemented cloud structure
includes UDP server receiving data from gateway and web-
socket server delivering data to end user. The digital output of
ADS1198 is eight channels 16 bit data in two’s complement
representation and is kept in binary format until being inter-
preted as magnitude showing on dashboard in the web client
end, reﬂecting user’s facial muscle activity information. The
recording of biopotential data is controlled by caregiver end
user in the web application, which is then synchronized with
the cloud database.
For the potential big data analytics in the future, NoSQL
database is employed as the database in cloud  which is
speciﬁcally implemented as CouchDB database. Static ﬁles are
stored in cloud for hosting mobile web client code.
C. Mobile web application design
When choosing the framework and database for the applica-
tion, the capability of holding big healthcare data stream and
real time analytics is considered. The mobile web application
is built upon Cordova and Ionic framework, which support
different mobile platforms including Android and IOS by of-
fering an uniﬁed web programing interface based on HTML5,
the app. A library named Socket.io with WebSocket support
is introduced for fast real-time bi-directional communication
between the web server in cloud and the client in browser.
Data can be locally saved in an in-browser NoSQL database
powered by PouchDB, which also enables ofﬂine usage of the
app. Data can also be synchronized to the cloud CouchDB
database for sharing and analysing. The recorded data can be
exported as a text ﬁle, and presented as waveforms in the
dashboard, features such as digital ﬁlters, interpretation and
down-sampling are also provided.
The web-based graphical user interface (GUI) on a mobile
phone is presented in the middle of Fig. 5, together with
its three setting panels. The achieved functions include: 1).
Data settings, where data source can be chosen to present in
dashboard and start-stop data recording; 2) Log in & display
settings, where user name and password are required to ensure
user privacy; and 3) Digital signal processing (DSP) settings,
which is for digital ﬁlter conﬁguration such as sample rate,
ﬁlter type and window function.
Fig. 5. The dashboard and its setting panels
JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 6
(a) Raw biopotentials (b) With on-line ﬁltering
Fig. 6. Dashboard displaying eight channel biopotentials
The web-based GUI can display the collected bio-signals
in a near real-time manner. Since the web-based GUI is
cross-operational-system, it is stand-alone, and can run on
any internet-connected terminal device equipped with a web
browser, including smart phone, laptop, mobile/tablet PC, etc.
Cloud-storage and cloud-computing functions are also de-
signed and merged into this application, which enable people
with authority get access to the data of interest anywhere in
the world. In addition, algorithms running on the cloud server
facilitate the near-real-time signal processing or post-analysis.
The dashboard of the web application presents the measured
multi-channel sEMG signals in near real time, depending on
the researcher or physicians requirements. Processed signals
can also be displayed after a set of cloud based ﬁlters or
algorithms being applied.
There are several beneﬁts applying cloud-based on-line
ﬁltering comparing to implementing signal processing on the
device. First, the process on the device is immune from the
latency and energy consumption caused by onsite processing.
Concentrating on data acquisition and transmission only, the
device can deliver streaming data seamlessly with a few ﬂags
or time marks. Otherwise, it is critical to manage the timing of
data acquiring, processing and transmitting properly to ensure
real-time data delivery. Second, raw data saves data bandwidth
during transmission. The analog biopotentials are digitalized
into binary numbers in a signed number representation. Data
size is retrenched in every sample compared to the numbers
in ﬂoating-point format obtained after data decoding and
denoising. Third, it is more ﬂexible to change the ﬁlters
or algorithms setting on the user end in the mobile web
application than in the sensing device. This could be helpful
when capturing different or multiple biopotentials.
V. SY ST EM VE RI FIC ATIO N AN D DEVICE SUMMARY
One test subject was involved in the test and was guided to
perform a series of facial expressions. Three facial expressions
were deﬁned in the test and they were 1) neutral face as a blank
expression, 2) frown as slight pain which is also common to
express several other negative emotions and 3) pain expression
with a combination of AUs in Table I such as cheek raise, nose
wrinkle and horizontal mouth stretch. In the measurement,
Channel 8 was utilized for electrocardiogram monitoring from
the upper part of the chest on the left as left arm (LA) in
addition to the ﬁrst six biopotential channels arranged in Table
I. The electrode of Channel 7 worked as right arm (RA).
Channel 7 and 8 measured the lead I of ECG. Each channel
had one electrode placed on the measurement site, either on
one facial muscular area or on one chest area. The biopotential
was measured by the reference to the common electrode which
was placed on the bony area behind the ear on the same side.
Multi-channel biopotentials are captured, transmitted to the
cloud platform and eventually their waveforms are presented in
the web application in a near real-time manner. The recorded
biopotential samples in the test were then downloaded for post-
A. Biopotential acquisition and remote monitoring
The monitored multi-channel biopotentials are shown in
Fig. 6. The waveforms are updated on the dashboard in a
laptop web browser. Waveforms without and with on-line
ﬁltering are presented separately. Fig. 6(a) shows the 8 channel
biopotential waveforms collected from the test subject’s face
without processing. The raw data received in the cloud server
is displayed on the dashboard. It can be observed that a
few concurrent spikes and reversals occur at the same time
from Channel 1 to Channel 6. The eye blink interference in
sEMG are triggered by eyelids movement, where the ﬁrst two
channels are dominated by upper eyelid and Channel 3 to
Channel 6 reﬂect lower eyelid movement. As a result, the
eye blinks are captured in Channel 1 and Channel 2 as rising
pulses, while the concurrent signals in Channel 3 till Channel 6
are transient sharp declines. In addition, it can be found that the
dips in Channel 5 and Channel 6 are much smaller than those
in Channel 3 and Channel 4 because of locating further lower
from eyelids. During blink, the muscle groups around eye sides
make simultaneous contractions towards the eye ball, which
means the orientation of the biopotential signals measured
from the forehead is opposite to its counter parts measured
JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 7
from the points below the eye. As the result shown in Fig. 6(a),
the eye-blink captured and shown in Channel 1 and Channel
2 are rising pulses, while the concurrent signals captured
in Channel 3 till Channel 6 are transient sharp declines. In
addition, it can be found that the dips in Channel 5 and
Channel 6 are much smaller than those in Channel 3 and
Channel 4 because of locating further lower from the central
muscle group around the eye.
Facial activities in the pain expression can be clearly
differentiated from the neutral expression although no signal
processing is applied. The sEMG signal is dominant in the
frequency range of 50 - 150 Hz . While baseline wander
and motion artifact, as shown along with sEMG signal are
caused by body or muscle movements and in low frequency
range below 20 Hz. Since the offending artifacts obscure the
target sEMG signals in study, digital ﬁlters can be applied
to remove the interference. A high pass ﬁlter of 20 Hz can
efﬁciently suppress the base line wander noise and remove
motion artifacts. Besides, the high pass ﬁlter removes eye blink
pulses from the signal at the same time. A second digital ﬁlter
is added to remove powerline electrical interference, which is
a 50 Hz notch ﬁlter. The digital ﬁlters were implemented in
the mobile web application as 4th order Butterworth ﬁlters.
Butterworth ﬁlter was chosen for its ﬂat frequency response
in the passband.
By leveraging cloud resources and web application, digital
signal processing is available in a real-time manner and the
ﬁltered samples are shown in Fig. 6(b). In the ﬁrst facial
expression, muscle activity of corrugator in Channel 2 is
observed due to frowning. It is followed by a neutral face
and then a facial expression of pain. In Neutral Face section,
the test subject remains calm; as a result, all sEMG channels
keep quiet. In Pain expression section, the test subject mimics
suffering from acute pain where facial muscles groups are
actively simulated for a few seconds. As can be observed in
Fig. 6(b), Channel 2, 3 and 5 record signiﬁcant facial muscle
response. The time axis in the dashboard is in milliseconds
(ms) and the peak to peak amplitude of sEMG is in a few
millivolts after ampliﬁcation in sensor node.
B. Post data analysis
Raw sEMG signals in the test are saved in ﬁle for further
ofﬂine analysis. The pattern of facial expressions in sEMG is
revealed by root mean square (RMS) feature extraction and
feature visualization. The feature RMS indicates the energy
level of the signal. Samples in time series is ﬁrst ﬁltered and
segmented, then RMS can be calculated from each segment.
Fig. 7 shows the RMS out of the ﬁrst six channel sEMG in
Fig. 6(b), where the signal is cut into 500 ms segments. The
distribution of the RMS features from the test is shown in
Fig. 8 after dimension reduction with t-Distributed Stochastic
Neighbor Embedding technique . A k-NN classiﬁer (k=5)
was trained and tested with the RMS features. The classiﬁca-
tion accuracy in the 10-fold cross validation is 95.9%. .
C. Device summary
This remote pain monitoring system centers on the sensor
node from the patient end. Cloud and the designed mobile web
5 10 15 20 25 30
5 10 15 20 25 30
5 10 15 20 25 30
5 10 15 20 25 30
5 10 15 20 25 30
5 10 15 20 25 30
Fig. 7. RMS features of collected samples in 500 ms segments
Fig. 8. The distribution of RMS features
application assist in taking over the collected biopotentials
automatically and remotely. The implemented wearable IoT
device together with the back-end cloud architecture as a
whole can provide the users not only the online signal pro-
cessing and data storage functions, but also data visualization
and graphical interacting interface solution. Key features of
the designed sensor are summarized in Table II. The designed
sensor node is aiming at minimized size with full function of
biopotential data collection and Wi-Fi wireless transmission.
It reaches the size of 60mm ×30mm as a ﬂat and soft
module, for 8 channel biopotential collection at 1000 SPS.
Energy efﬁciency is fully addressed by using ultra low power
electronic components and cutting down the radio frequency
power consumption by triggering wireless data transmission
into burst mode. The applied biopotential measurement AFE
component is at the power of 8.2 mW and Wi-Fi part integrated
with the embedded micro processor consumes only 9.1 mW
when listening interval is 100 ms.
JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 8
SUMMARY OF BIOPOTENTIAL MEASUREMENT SENSOR NODE
Sampling parameters 8 channels, 1000 SPS sample rate, 16-bit
Data rate 128 Kbps
Biopotential measurement: 8.2 mW with 5 V
Wi-Fi module supply voltage: 3.5 V
–Listening interval: 1000 ms
Wi-Fi module supply current: 0.76 mA
–Listening interval: 100 ms
Wi-Fi module supply current: 2.6 mA
This paper presented a design of a wearable bio-sensing
device for biopotentials monitoring in up to eight channels.
With a wearable facial mask, the device is capable of collect-
ing sEMG from several facial muscles simultaneously. The
design can be applied in pain assessment when monitoring
facial expressions as a behavioural sign of pain. Both the
sensing facial mask and the sensor node are potential for
long term use because both wearing comfortableness and low
energy consumption are considered and qualiﬁed in the design.
Furthermore, the wearable device works as a Wi-Fi sensor
node, integrated into an IoT system for remote monitoring use.
The IoT-based remote monitoring system is scalable in terms
of devices and functionality due to the sensor-gateway-cloud
architecture. In the implemented system, the cloud platform
enables mobile web applications so that caregivers are able to
reach the interactive GUI for biopotential monitoring across
operation systems. Moreover, the cloud platform provides
room for any further implementation on on-line data analysis
and decision-making support algorithm for the pain manage-
ment application. The implemented system is also applicable
to other healthcare applications where biosignals need to be
monitored in the near real-time manner.
The authors would like to thank Gaoyang Pang for his work
developing PDMS based mask and Jia Deng for her volunteer
work as a test subject.
 H. C. Noel, D. C. Vogel, J. J. Erdos, D. Cornwall, and F. Levin, “Home
telehealth reduces healthcare costs,” Telemedicine Journal & E-Health,
vol. 10, no. 2, pp. 170–183, 2004.
 C. R. Jonassaint, N. Shah, J. Jonassaint, and L. De Castro, “Usability
and feasibility of an mHealth intervention for monitoring and managing
pain symptoms in sickle cell disease: The sickle cell disease mobile
application to record symptoms via technology (SMART),” Hemoglobin,
vol. 39, no. 3, pp. 162–168, 2015.
 L. Catarinucci, D. De Donno, L. Mainetti, L. Palano, L. Patrono,
M. L. Stefanizzi, and L. Tarricone, “An IoT-aware architecture for smart
healthcare systems,” IEEE Internet Things J., vol. 2, no. 6, pp. 515–526,
 E. Jacob, J. Duran, J. Stinson, M. A. Lewis, and L. Zeltzer, “Remote
monitoring of pain and symptoms using wireless technology in children
and adolescents with sickle cell disease,” Journal of the American
Academy of Nurse Practitioners, vol. 25, no. 1, pp. 42–54, 2013.
 S. Kofoed, S. Breen, K. Gough, and S. Aranda, “Beneﬁts of remote
real-time side-effect monitoring systems for patients receiving cancer
treatment,” Oncology reviews, vol. 6, no. 1, 2012.
 K. Kroenke, D. Theobald, J. Wu, K. Norton, G. Morrison, J. Carpenter,
and W. Tu, “Effect of telecare management on pain and depression
in patients with cancer: A randomized trial,” Journal of the American
Medical Association, vol. 304, no. 2, pp. 163–171, 2010.
 P. W. Peng, M. A. Stafford, D. T. Wong, and M. E. Salenieks, “Use of
telemedicine in chronic pain consultation: A pilot study,” The Clinical
journal of pain, vol. 22, no. 4, pp. 350–352, 2006.
 P. Lucey, J. F. Cohn, I. Matthews, S. Lucey, S. Sridharan, J. Howlett, and
K. M. Prkachin, “Automatically detecting pain in video through facial
action units,” IEEE Trans. Syst. Man Cybern. B, bern., vol. 41, no. 3,
pp. 664–674, 2011.
 M. K¨
achele, P. Werner, A. Al-Hamadi, G. Palm, S. Walter, and
F. Schwenker, “Bio-visual fusion for person-independent recognition of
pain intensity,” in Multiple Classiﬁer Systems, 2015, pp. 220–230.
 M. S. Hossain and G. Muhammad, “Cloud-assisted speech and face
recognition framework for health monitoring,” Mobile Networks and
Applications, vol. 20, no. 3, pp. 391–399, 2015.
 Y. Zhong and L. Liu, “Remote neonatal pain assessment system based
on internet of things,” in IEEE Int. Conf. on Internet of Things, 2011,
 K. M. Prkachin, “Assessing pain by facial expression: Facial expression
as nexus,” Pain Research and Management, vol. 14, no. 1, pp. 53–58,
 W. Guo, X. Sheng, H. Liu, and X. Zhu, “Development of a multi-channel
compact-size wireless hybrid sEMG/NIRS sensor system for prosthetic
manipulation,” IEEE Sensors J., vol. 16, no. 2, pp. 447–456, 2016.
 S. Benatti, F. Casamassima, B. Milosevic, E. Farella, P. Sch¨
S. Fateh, T. Burger, Q. Huang, and L. Benini, “A versatile embedded
platform for emg acquisition and gesture recognition,” IEEE transactions
on biomedical circuits and systems, vol. 9, no. 5, pp. 620–630, 2015.
 A. Gruebler and K. Suzuki, “Design of a wearable device for reading
positive expressions from facial emg signals,” IEEE Transactions on
Affective Computing, vol. 5, no. 3, pp. 227–237, 2014.
 A. Albulbul, “Evaluating major electrode types for idle biological signal
measurements for modern medical technology,” Bioengineering, vol. 3,
no. 3, p. 20, 2016.
 M. Chimene and R. Pall`
as Areny, “A comprehensive model for power
line interference in biopotential measurements,” IEEE Trans. Instrum.
Meas., vol. 49, no. 3, pp. 535–540, 2000.
 K. Maharatna, E. B. Mazomenos, J. Morgan, and S. Bonﬁglio, “Towards
the development of next-generation remote healthcare system: Some
practical considerations,” in IEEE Int. Symp. on Circuits and Systems,
2012, pp. 1–4.
 M. Jiang, T. N. Gia, A. Anzanpour, A.-M. Rahmani, T. Westerlund,
a, P. Liljeberg, and H. Tenhunen, “IoT-based remote facial
expression monitoring system with sEMG signal,” in IEEE Sensors
Applications Symp., 2016, pp. 211–216.
 G. Ji, W. Ouyang, K. Yang, and G. Yang, “Skin-attached sensor and
artifact removal using cloud computing,” in 7th Int. Conf. on e-Health,
 A. M. Rahmani, T. N. Gia, B. Negash, A. Anzanpour, I. Azimi, M. Jiang,
and P. Liljeberg, “Exploiting smart e-health gateways at the edge
of healthcare internet-of-things: A fog computing approach,” Future
Generation Computer Systems, 2017.
 D. Guinard, V. Trifa, F. Mattern, and E. Wilde, “From the internet of
things to the web of things: Resource-oriented architecture and best
practices,” in Architecting the Internet of things. Springer, 2011, pp.
 A. Charland and B. Leroux, “Mobile application development: web vs.
native,” Communications of the ACM, vol. 54, no. 5, pp. 49–53, 2011.
 C. R. Raj and S. B. Tolety, “A study on approaches to build cross-
platform mobile applications and criteria to select appropriate approach,”
in India Conference (INDICON), 2012 Annual IEEE. IEEE, 2012, pp.
 A.-M. Rahmani, N. K. Thanigaivelan, T. N. Gia, J. Granados, B. Negash,
P. Liljeberg, and H. Tenhunen, “Smart e-health gateway: Bringing
intelligence to internet-of-things based ubiquitous healthcare systems,”
in IEEE Consumer Communications and Networking Conf., 2015, pp.
 “ADS1198 low-noise, 8 channel, 16 bit analog front end for ECG/EEG
measurements,” http://www.ti.com/product/ADS1198, [Online; accessed
 A. Van Boxtel, “Optimal signal bandwidth for the recording of surface
emg activity of facial, jaw, oral, and neck muscles,” Psychophysiology,
vol. 38, no. 01, pp. 22–34, 2001.
 “RTX41xx low power modules,” https://www.rtx.dk/, [Online; accessed
JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 9
 M. S. Mahmoud and A. A. Mohamad, “A study of efﬁcient power
consumption wireless communication techniques/modules for internet of
things (iot) applications,” Advances in Internet of Things, vol. 6, no. 02,
p. 19, 2016.
 P. Ekman and W. V. Friesen, “Facial Action Coding System: A
Techniques for the Measurement of Facial Movement,” Consulting
Psychologists Press, Palo Alto, 1978.
 A. J. Fridlund and J. T. Cacioppo, “Guidelines for human electromyo-
graphic research,” Psychophysiology, vol. 23, no. 5, pp. 567–589, 1986.
 A. Moniruzzaman and S. A. Hossain, “Nosql database: New era of
databases for big data analytics-classiﬁcation, characteristics and com-
parison,” arXiv preprint arXiv:1307.0191, 2013.
 C. J. De Luca, “Surface electromyography: Detection and recording,”
DelSys Incorporated, pp. 1–10, 2002.
 L. v. d. Maaten and G. Hinton, “Visualizing data using t-sne,” Journal
of Machine Learning Research, vol. 9, no. Nov, pp. 2579–2605, 2008.
Geng Yang received his Ph.D. degree from Elec-
tronic and Computer Systems from the Royal In-
stitute of Technology (KTH), Stockholm, Sweden,
in 2013. From 2013 to 2015, he worked as a Post-
Doc researcher in iPack VINN Excellence Center,
the School of Information and Communication Tech-
nology (ICT), KTH, Stockholm, Sweden. Currently,
he is a Research Associate in Zhejiang University,
Hangzhou, China. He developed low power, low
noise bio-electric SoC sensors for m-health. His
research interests include ﬂexible and stretchable
electronics, mixed-mode IC design, low-power biomedical microsystem, wear-
able bio-devices, human-computer interface, intelligent sensors and Internet-
of-Things for healthcare.
Mingzhe Jiang received her B.Eng and M.Eng in
Instrument Science and Technology from Harbin
Institute of Technology, Harbin, China, in the year
2012 and 2014, respectively. She is currently with
Internet-of-Things for Healthcare (IoT4Health) re-
search group as a PhD student, at University of
Turku, Finland, working on biomedical signal pro-
cessing and pain pattern recognition in the project
Smart Pain Assessment (SPA).
Wei Ouyang received his Master’s degree from
Department of Measuring and Optical Engineering,
Nanchang Hangkong University, China, in 2013. He
was a visiting researcher in KTH Royal Institute
of Technology, Sweden, in 2014 and an engineer
in Institut Pasteur, France, in 2015. Currently, he
is a PhD candidate in a joint doctoral program
between Institut Pasteur and Centre for Research
and Interdisciplinary in Paris, working on imaging
and modeling yeast chromosome architecture with
Super-resolution Localization Microscopy and Deep
Guangchao Ji received his Master’s degree from
Department of System-on-chip Design, KTH Royal
Institute of Technology, Sweden in 2013. Currently,
he is a PhD candidate in Department of School of
Technology and Health,in KTH Royal Institute of
Technology, working on applied biomedical device.
Amir M. Rahmani received his Master’s degree
from Department of Electrical and Computer En-
gineering, University of Tehran, Iran, in 2009 and
Ph.D. degree from Department of Information Tech-
nology, University of Turku, Finland, in 2012. He
also received his MBA jointly from Turku School
of Economics and European Institute of Innovation
& Technology (EIT) ICT Labs, in 2014. He is
currently Marie Curie Global Fellow at University of
California Irvine (USA) and TU Wien (Austria). He
is also an adjunct professor (Docent) in embedded
parallel and distributed computing at the University of Turku, Finland. He is
the author of more than 140 peer-reviewed publications.
Pasi Liljeberg received the MSc and PhD degrees
in electronics and information technology from the
University of Turku, Turku, Finland, in 1999 and
2005, respectively. He received Adjunct professor-
ship in embedded computing architectures in 2010.
Currently he is working as a professor in University
of Turku in the ﬁeld of Embedded Systems and
Internet of Things. At the moment his research is
focused on biomedical engineering and health tech-
nology. In that context he has established and leading
the Internet-of-Things for Healthcare (IoT4Health)
research group. Liljeberg is the author of more than 250 peer-reviewed
Hannu Tenhunen received the diplomas from the
Helsinki University of Technology, Finland, 1982,
and the PhD degree from Cornell University, Ithaca,
NY, 1986. In 1985, he joined the Signal Process-
ing Laboratory, Tampere University of Technology,
Finland, as an associate professor and later served
as a professor and department director. Since 1992,
ha has been a professor at the Royal Institute of
Technology (KTH), Sweden, where he also served as
a dean. He has more than 600 reviewed publications
and 16 patents internationality.