Enda Barrett, Des Chambers and Cosmin Rotariu
National University of Ireland, Galway, University Road, Galway, Ireland
Keywords: Wireless Sensor Networks, Ambulatory ECG monitoring, Arrhythmia analysis, Biomedical Signal
Abstract: Wireless technology has become ubiquitous in our daily lives. From 802.11 to Bluetooth we have become
familiar with new technologies and expectations are rife as to its potential. The medical world is potentially
lucrative for the use of such technology. The ability to improve patient comfort, monitor patients remotely
and increase device mobility should all contribute handsomely to patient life quality. It also offers the
unique opportunity to monitor ambulatory patients in a real-time environment. Outlined is an approach to
integrate an Electrocardiogram (ECG) classifier into an overall wireless patient monitoring system enabling
real-time classification and analysis of ECG data. Our research has shown that it is possible to use the open
source classifier (Hamilton, 2002) in a wireless sensor network for beat detection and arrhythmia
classification. We have tested the classifier with up to 80 simulated sensors proving that its lightweight
implementation enables it to cope perfectly with only minor modifications needed. It was found that the
addition of multiples of sensors produced on average 0.01% performance degradation.
Ambulatory patient monitoring is crucial to post
operative care in many modern day hospitals. In
many cases the onset of cardiac arrhythmias can
signal a more serious underlying condition.
Traditionally holter monitors were used to classify
infrequently occurring arrhythmias and cardiac
abnormalities in an ambulatory environment. Holter
recordings normally comprise of 24-48 hours of
ECG data, with post-classification occurring after
the recording has completed. Potentially life
threatening conditions and arrhythmias would only
be detected in retrospect. With this in mind it was
decided that, classifying ECG data in real-time,
raising alarms as problems arose, would be
extremely beneficial for both patient and
Classifying arrhythmia’s in a real-time
ambulatory environment poses challenges with
respect to redundancy, reliability and resource
constraints. A beat detector and classifier was
needed that could operate effectively under these
limitations. The Open Source classifier written by
Patrick Hamilton and provided by EP Limited was
chosen as a result of this. With QRS detection
sensitivities close to 99.8% on MIT/BIH and AHA
databases coupled with classification positive
predictivities of 96.48% and 97.83% on MIT and
AHA databases respectively (Hamilton, 2002), it’s
accuracy is excellent. Its QRS detector was
originally developed by Pan and Tompkins and
designed to operate in real-time. All the processing
is done with integer arithmetic so that the algorithm
can operate in real-time without requiring excessive
computing power (Pan, 1985).
This paper aims to demonstrate an approach to
ECG classification in a wireless sensor network. We
show how the Open Source beat detector and
arrhythmia classifier in a Zigbee enabled wireless
sensor network copes easily with the demands of
real-time classification.
ECG data classification is part of a wider project
called VISOR (Enhanced VItal Sign Observation
and Recording). VISOR is an overall wireless
patient monitoring system that monitors respiratory,
pulse oximetry (SP02), and ECG data in real-time,
raising alarms as problems arise. The VISOR project
has been in existence for three years.
Barrett E., Chambers D. and Rotariu C. (2009).
In Proceedings of the International Conference on Bio-inspired Systems and Signal Processing, pages 322-326
DOI: 10.5220/0001548703220326
Extensive research has been carried out in the
application of wireless sensor networks to the
medical domain. Projects such as Harvard’s
“CodeBlue” project (Malan) have proven the
validity of transmitting ECG data over Zigbee, but
they are not classifying the data in real-time. Others
such as the “WISE” (Jovanov, 2001) bio-medical
sensors tend to focus more on data acquisition rather
than data analysis. Fensli propose using sensor
networks coupled with limited arrhythmia
classification in the home (Fensli et al, 2005). ECG
is transmitted from the home via a GPRS/GSM band
to the hospital for analysis by consultants. In
contrast our system aims to detect a wide range of
cardiac arrhythmias, focusing on potentially serious
abnormalities with the view to early diagnosis. Our
system will also display other patient vitals.
While commercially available products such as
the G.E. Apex Pro Telemetry System (GE
Healthcare) and the LifeSync Wireless ECG system
(Wireless ECG) are not using sensor networks to
transmit ECG data, they are proving the commercial
potential of wirelessly enabling ECG.
VISOR is a Zigbee enabled patient monitoring
system, consisting of multiple sensors attached to
multiple patients. These sensors currently consist of
ECG, SP02 and MDI (Medical Device Interface)
sensors. The sensors obtain bio-data from the patient
and transmit it to the server for analysis via a Zigbee
module on the device. The server analyses the bio-
data for eventual display on the client. A database is
used to store all relevant patient demographics and
bio-data for historical playback.
Data produced by the ECG sensors is sampled at
200Hz, and then passed through three second order
band pass filters and the savitzky-golay (Savitzky,
1964) smoothing filter. It’s then transmitted to the
server for classification and analysis. The SP02
sensors transmit the heart rate and oxygen saturation
levels, while the MDI sensor which is essentially a
serial to wireless bridge, interfaces with existing
devices in the ward to obtain patient bio-data. These
devices can range from vital signs monitors to
ventilators and infusion pumps. Our MDI
architecture allows for the addition of new or legacy
medical devices to the system increasing scalability.
3.1 Zigbee
Zigbee’s suitability has already been established by
others as a reliable platform for the transmission of
ECG data (Lin et al, 2006). It has also been shown
(Frehill, 2008) how Zigbee meets our requirements
with respect to bandwidth, scalability and
redundancy when handling real-time ECG data.
Zigbee is based on the IEEE 802.15.4 standard
(IEEE 802.15.4). Its advantages include, mesh
networking, low power consumption, security and
mobility (Zigbee Alliance). The Zigbee mesh
networking framework provides a flexible approach
to routing data in a hospital environment where any
node can be used to route the ECG data. Zigbee’s
low power consumption enables ECG sensors to
have smaller, lighter batteries that run for longer.
This also offers relatively low device maintenance
for nurses and hospital care workers, where sensors
need only be re-charged once every 7 days.
3.2 Custom GUI Client
The central server relays relevant data to all
subscribed clients. Our client software was
developed using the .NET framework, enabling the
software to operate on any windows based device.
Subscribed clients can range from handheld
PDA’s/laptops to PC’s. The client contains all
relevant patient demographics, displaying details of
attached devices and patient vitals. A patient’s
ventilator data, ECG “Figure 1” and plethysmogram
“Figure 2” graphs are rendered for the user to
If an arrhythmia or alarm condition is detected,
the server will notify associated clients, by raising an
alarm on that client. Annotation codes defined by
physionet (Physiologic Signals) to label events in an
ECG recording are used to identify the type of
arrhythmia that occurred. If the user wishes to view
a particular alarm, the ECG graph can be played
back to view the detected arrhythmia. This allows
critical care workers to monitor patients remotely
and less frequently.
Figure 1: Client ECG Trace.
Figure 2: Client SP02 Plethysmogram.
3.3 Wireless Gateway
A PANC (Personal Area Network Coordinator) acts
as a gateway transmitting data from the sensors to
the analysis server as shown in “Figure 3”. The
gateway is responsible for forming the network and
inserting/removing wireless sensor nodes from the
Figure 3: High Level Architecture.
3.4 Central Analysis Server
Our system classifies ECG data on a central server.
Unlike other ECG wireless sensors that classify the
ECG data on the device itself (Fariborzi, 2007), we
feel that classifying the ECG data on the server gives
us scope for scalability, allowing us to eventually
analyze ECG data with multiple ECG classifiers.
Combining multiple classifiers on a tiny ECG
module where memory, battery life and processing
power are at a premium would not be prudent. The
focus of VISOR is to produce sensors that are
lightweight and cost effective (Rotariu, 2006).
Once a node is powered on it begins sending
status messages to the server via the gateway. When
the server receives a status message from a sensor it
adds that sensor to its list of active sensors, only
active sensors can be associated with a patient.
Analyzing bio-data on a single central server can
raise concerns regarding efficiency and scalability.
The VISOR project has placed enormous emphasis
on developing computationally efficient analytical
modules. It has been possible as a result of this, to
maintain our single analysis server architecture, all
the while increasing scalability and cost
To facilitate the processing of live ECG data we
needed a QRS detector and beat classifier that could
operate in real-time. We felt that since the open
source classifier’s QRS detector had originally been
intended to analyse real-time ECG data, it would
cope with the constraints of beat detection in this
unique environment. Its lightweight classifier,
implemented in C, added to its efficiency.
The QRS beat detector was ported to C by
Hamilton and Tompkins (Hamilton, 1986). The beat
classification rules were developed by Hamilton.
The advantages of this QRS detection algorithm are
that it is computationally efficient and easily
modified for different samples rates (Hamilton,
2002). Our ECG sensors produce 1 lead ECG
data sampled at 200Hz. The performance of the
classifier has been shown to be slightly better with
data sampled at 200Hz, compared to data sampled at
higher rates. Its published results were based on a
single channel of ECG data, similar to the data our
sensors produce. Many modern day commercial
classifiers work with 12 lead, 3 channel ECG data to
detect arrhythmias and abnormalities. For these
reasons we felt the open source classifier was the
closest match in meeting our requirements for
efficiency and accuracy.
4.1 Dynamic Link Layer (dll)
In keeping with the existing server architecture
which supports several devices, the classifier was
implemented as a dll on the analysis server (Frehill,
2007). Within this framework subsequent classifiers
can be added as required by loading their respective
In order to allow for classification in a real-time
environment a number of modifications have had to
be made. The classifier comes with functions to
analyse MIT/BIH and AHA records. It uses the
WFDB library functions to read the ECG data from
the records and write to annotation files. We stripped
the classifier of all WFDB types, rewriting a number
of functions and deleting redundant ones. The entire
C program was converted into OO C++, for the
purpose of instantiating instances of classifier
BIOSIGNALS 2009 - International Conference on Bio-inspired Systems and Signal Processing
objects. This allowed the classification of multiple
sensors in real-time.
With this in place we were then able to modify
and integrate George Moody’s ihr.c. Instantaneous
heart rate (IHR) calculates the heart rate from the
reciprocals of the inter-beat intervals. This extension
enabled the detection of episodes of Sinus
Tachycardia/Bradycardia during normal Sinus
rhythm. Once an episode has been detected an event
is raised on the server that is handled on the client.
4.2 Packet Loss
A single packet loss on the network could result in
the detection of an arrhythmia or unclassifiable beat
due to packet size. The Zigbee software stack
handles packet loss which we have proved in our
laboratory environment. In addition packet sequence
numbers are tracked and if a discontinuity is
detected, the classifier is notified. Any arrhythmias
and beats detected during this window are ignored. It
would be inappropriate to call the reset method on
the classifier, as normal rhythms and beat templates
have already been determined and would be lost.
Packet loss may occur as a result of a sensor moving
out of range or if the battery is fully drained.
In the absence at the time of publication of a
sufficient quantity of physical ECG sensors, it was
decided to simulate the presence of multiple sensors
on the system to ascertain results. We placed both
the simulation software and the server software on
separate P.C’s with each P.C containing a Pentium 4
HT processor and 1GB of RAM. The physical ECG
sensors transmit 100 bytes of data at a rate of 1
packet every 500ms, which our simulation software
emulates. For the ECG data simulation we took a
single record at a time, with each sensor transmitting
data from the same record simultaneously. In trying
to mimic a hospital environment, we simulated a
mixed scenario where some patients were associated
with one sensor and some with many sensors. The
data was handled by the PANC and sent to the
server for processing.
Four MIT/BIH arrhythmia records (100, 103,
106 and 119) were chosen to simulate the ECG data.
These were selected for their disparate
abnormalities. Records 106 and 119 contain a
substantial amount of premature ventricular
contractions (PVC) whereas 100 and 103 contain
predominately normal beats. As you can see from
“Table 1” the classifier had lower detection times on
records that contained fewer PVC’s (100, 103).
The performance differential on records 106 and 119
is largely due to the beat classification techniques
involved in arrhythmia detection. It shows that
detecting arrhythmias involves longer detection
times, due to post classification and beat template
When classifying normal beats the classifier will
compare the beat to the dominant rhythm, if it’s the
same it’s classified as normal.
Table 1: Detection Times (ms).
Number of Sensors
20 40 60 80
100 1436.98 1437.01 1437.07 1437.14
103 1530.00 1530.01 1530.04 1530.06
106 1668.07 1668.07 1668.11 1668.25
119 1642.09 1642.20 1642.32 1642.35
To derive the beat detection average, the
processing times for five hundred beats were used.
From the graph “Figure 4” you will see that there is
virtually no performance degradation even when
tested with upwards of 100 sensors. In fact in the lab
we found that performance only began to lag with 20
times that amount. Theoretically we hope to be able
to classify beats from hundreds of sensors on a
single server. With the advent of multi-core
processors and cheaper faster RAM our server
implementation will scale to meet demands.
Figure 4: Detection Degradation.
We are currently integrating the HeartFx 2000
arrhythmia (Heart FX 2000) classifier developed by
Medata. Unlike the QRS detector in the open source
classifier, the HeartFx 2000 classifier was not
designed for real-time analysis. It is intended instead
to be used in a post classification environment,
analyzing holter recordings.
We hope to compare the performance of both of
these classifiers, with respect to efficiency, accuracy
and reliability while running multiple ECG sensors
transmitting data simultaneously. We feel that
multiple ECG classifiers would give us greater beat
detection and classification redundancy in a range of
disparate environments.
Using the commercial classifier as a reference
we would hope to extend the open source classifier
to detect new arrhythmias such as VT (Ventricular
Tachycardia), VF (Ventricular Fibrillation) and
Asystole. There are plans to carry out usability
testing in a hospital.
It has been shown that it is possible to integrate and
implement an open source ECG beat detector and
arrhythmia classifier in an ambulatory patient
monitoring system. Our results prove that our
architecture is capable of supporting large numbers
of ECG sensors simultaneously. Using Zigbee as our
wireless infrastructure has enabled us to produce low
cost, low power ECG sensors. We hope that, in long
term patient monitoring, where accurate
classification of arrhythmias is crucial, our system
will prove useful.
Open Source ECG Analysis, P Hamilton E.P. Ltd
Somerville, USA. IEEE Computers in Cardiology
Pan J, Tompkins WJ. A real-time QRS detection
algorithm. IEEE Trans.Biomed. Eng 1985;32 :230-6.
Paul Frehill, Des Chambers, Cosmin Rotariu. A Wireless
Network Sensor and Server Architecture for Legacy
Medical Devices. In proceedings of 15th International
Conference on Telecommunications. 16-19 June. 2008
David Malan, Thaddeus Fulford-Jones, Matt Welsh, Steve
Moulton. CodeBlue: An Ad Hoc Sensor Network
Infrastructure for Emergency Medical Care.
E. Jovanov, D. Raskovic, J. Price, J. Chapman, A. Moore,
A. Krishnamurthy. Patient Monitoring Using Personal
Area Networks of Wireless Intelligent Sensors.
Biomed Sci Instrum, vol. 37, pp. 373-8, 2001.
Rune Fensli, Einar Gunnarson, and Torstein Gundersen. A
wearable ECG-recording system for continuous
arrhythmia monitoring in a wireless tele-home-care
situation. In Proceedings of the IEEE International
Symposium on Computer-Based Medical Systems
(CBMS), 2005.
GE Healthcare Wireless ECG Device http://www.geh
Wireless ECG specification,
A. Savitzky and Marcel J.E. Golay (1964). Smoothing and
Differentiation of Data by Simplified Least Squares
Procedures. Analytical Chemistry, 36: 1627–1639.
Jun-Liang Lin et al. The Development of Wireless Sensor
Network for ECG Monitoring. The proceedings of the
IEEE EMBS annual international conference
IEEE 802.15.4 standard. Available at http://www.ieee802.
Zigbee Alliance, Zigbee Specification, http://www.
Physiologic Signals,
H. Fariborzi, M. Moghavvemi, S. Mehrkanoon. Design of
a Low-power Microcontroller-based Wireless ECG
Monitoring System. The 5th Student Conference on
Research and Development –SCOReD 2007 11-12
December 2007, Malaysia
C. Rotariu, Des Chambers, Petronel Bigioi. “Lightweight
PnP ECG sensor for Monitoring of Biomedical
Signals”. In proceeding of 5th RoEduNet IEEE
Internation Conference, June 2006, Pages 17-22.
Hamilton PS, Tompkins WJ. Quantitative investigation of
QRS detection rules using the MIT/BIH arrhythmia
database. IEEE Trans. Biomed Eng. 1986;33:1157-65.
Paul Frehill, Des Chambers, Cosmin Rotariu. Using
Zigbee to Integrate Medical Devices. Proceedings of
the 29th Annual International Conference of the IEEE
EMBS Cité Internationale, Lyon, France 2007
Heart Fx 2000 Specification,
BIOSIGNALS 2009 - International Conference on Bio-inspired Systems and Signal Processing