Professional Documents
Culture Documents
1, JANUARY 2015
165
I. INTRODUCTION
EALTHCARE spending is increasingly becoming the major contributor of expenditure in many countries. U.S.
alone spends roughly 18% of its GDP on healthcare [1]. Cardiovascular diseases are one of the leading causes of the overall
expenditure. These expenses are expected to skyrocket in the
coming years due to an aging population, as a result of increasing life expectancies. The quality of life in this scenario
can be improved by focusing on prevention and early detection
of diseases. This can be achieved by proactive and long-term
monitoring of individuals cardiovascular health using low-cost
wearable electrocardiogram (ECG) sensor devices (e.g. [2], [3]).
The main features of the ECG, i.e., the P, Q, R, S, and T points,
give information about the cardiac health of the person.
A wearable ECG sensor, as shown in Fig. 1, can be used to
acquire, process, and wirelessly transmit ECG signal to a monitoring center. The main challenge involved in the development
of the sensor is to make the device low profile, unobtrusive, easy
to use with long battery life for continuous usage. A high level of
integration with inbuilt signal acquisition and data conversion is
required to minimize the size, cost, and power consumption of
such a sensor. The major source of power consumption in such
Manuscript received March 13, 2014; revised June 14, 2014; accepted July
10, 2014. Date of publication July 24, 2014; date of current version December
18, 2014. This work was supported in part by the National Research Foundation
Competitive Research Programme under Grant NRF-CRP8-2011-01 and NUS
Faculty Strategic Funding under Grant R-263-000-A02-731. Asterisk indicates
corresponding author.
C. J. Deepu is with the Department of Electrical and Computer Engineering, National University of Singapore, Singapore 119077 (e-mail: deepu_
john@ieee.org).
Y. Lian is with the Department of Electrical and Computer Engineering, National University of Singapore, Singapore 119077 (e-mail: eleliany@
nus.edu.sg).
Color versions of one or more of the figures in this paper are available online
at http://ieeexplore.ieee.org.
Digital Object Identifier 10.1109/TBME.2014.2342879
Fig. 1.
0018-9294 2014 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications standards/publications/rights/index.html for more information.
166
in higher overall system complexity. Till now, there are no reports on joint approaches for QRS detection and lossless data
compression.
In this paper, we present a joint approach for QRS detection
and ECG compression algorithm for use in wireless sensors. The
central idea of the proposed algorithm is to use a single technique for processing of QRS detection and data compression,
instead of using two distinct approaches. The algorithm lowers
the average computational complexity per task by sharing the
computational load among two operations. This is done using a
shared adaptive linear predictor for performing both ECG beatdetection and lossless data compression. In addition, a novel
fixed-length data coding-packaging technique for convenient
representation of the signal entropy is presented.
This paper is organized as follows. Section II introduces
the concept of the joint QRS detection compression (JQDC)
scheme. In Section III, the details of QRS detection scheme
are discussed. Section IV describes the lossless compression
scheme. The performance analysis of the algorithm and the simulation results are detailed in Section V. Concluding remarks
are given in Section VI.
Fig. 2.
Fig. 3.
m
hk x(n k)
(1)
k =1
k
where x
(n) is the estimate of x(n) and h is the predictor
coefficient. Upon convergence, the predictor is able to closely
estimate the future samples, including the P, T wave segments
and the slow baseline variations in the ECG signal. Therefore,
the instantaneous prediction error e(n), which is the difference
between the actual sample and its estimate x
(n), will be minimal
in these regions
e(n) = x(n) x
(n).
(2)
signal [8]
E(z) =
m
h Z
k
X(z).
(3)
k =1
DEEPU AND LIAN: A JOINT QRS DETECTION AND DATA COMPRESSION SCHEME FOR WEARABLE SENSORS
Fig. 4.
Fig. 5.
Algorithm
Se (%)
+P (%)
CR
LMS
NLMS
SLMS
SSLMS
99.51
99.56
99.65
99.64
99.75
99.68
99.72
99.81
2.29
2.31
2.30
2.28
TABLE II
HARDWARE COMPLEXITY FOR A FOUR-TAP ADAPTIVE UPDATER
Algorithm
LMS
NLMS
SLMS
SSLMS
Adders
Multipliers
4
7
5
5
8
16
4
0
The predictor is realized by using a tapped-delay line structure. For updating predictor weights, LMS algorithm and its
variants were considered, as follows [20]:
LMS h(n + 1) = h(n) + . e(n) . x(n).
NLMS h(n + 1) = h(n) + .e(n) .
x(n)
.
x(n)2
(4)
(5)
167
carried out using the ECG signals from the MIT/BIH database,
along with SSLMS predictor and initialization methodology
mentioned in the next section. Fig. 5 shows the QRS detection
performance and CR versus predictors order. As expected, the
CR improves as the predictor order increases. This is because the
predictor could more accurately predict the future data as predictor order increases. The QRS detection performance based
on SE and +P, on the other hand, shows a different pattern. The
performance increases as the order is increased till 4 and started
to gradually decline thereafter. As the order increases QRS segment becomes more and more predictable, and hence, the instantaneous error contains less signal component of the QRS
complex, which results in a lower detection accuracy. While at
very low orders, the prediction accuracy is lower, which leads
to presence of low-frequency baseline variations and P/T wave
components in the instantaneous error output that affects QRS
detection accuracy.
(6)
(7)
hinit
=
1
N
1
h1n ,
N n =1
hinit
=
2
N
1
h2n
N n =1
(8)
=
hinit
3
N
1
h3n ,
N n =1
hinit
=
4
N
1
h4n
N n =1
(9)
init
init
init
where hinit
are the statistical averages of
1 , h2 , h3 , and h4
the predictor coefficients (h1n , h2n , h3n , h4n ) obtained from the
datasets in the MIT/BIH database. As the signal characteristics
of ECG vary from patient to another, the statistical average from
several datasets serves as a good starting point for the adaptation
for all inputs. The coefficients of the datasets were computed
by using LevinsonDurbin algorithm [20]. A variable step e
168
Fig. 6.
init ,
nal ,
N < NL
N NL .
(10)
Fig. 7.
Filtering a noisy signal with (a) moving average filter and (b) SG filter.
A. SG Filtering
SG filters are known well in domains like analytical chemistry
and has been of recent interest in ECG signal processing [22].
SG filters smoothen the incoming signal by approximating the
signal within a specified window of size L to a polynomial of
order K, which best matches the given signal in a least-squares
ci xi .
(11)
i=1
K
It is shown in [22] that this polynomial fitting and reevaluation is equivalent to discrete convolution with a fixed
impulse response
esg (n) =
M
h[m]e(n m)
(12)
m =M
DEEPU AND LIAN: A JOINT QRS DETECTION AND DATA COMPRESSION SCHEME FOR WEARABLE SENSORS
169
m /2
eno(n) =
|e sg(n)|2
(13)
n =m /2
The number of samples for moving integration, M, is selected such that it corresponds to the width of the QRS complex
in the ECG signal. For 360-Hz sampling, M = 26 was chosen
as it gave the best tradeoff between complexity and detection
performance.
C. Adaptive Thresholding and Peak detection
The enhanced signal, eno(n), is continuously scanned to find
QRS peaks. As the signal amplitudes vary across patients and
based on external conditions, an adaptive threshold is used for
detection. The threshold is initialized with a default value, Thdef
in the beginning, and a new threshold is computed based on the
maximum value of the signal in a training period of first 2 s, i.e.,
the threshold is updated to 25% of the maximum value during
this period. Every time the signal exceeds the threshold, the
peak detection algorithm searches and locates the presence of
a peak, Tam p , as described later. The average threshold Thavg
is computed as 25% of the average of last four detected peaks,
i.e.,
1
Thk .
(14)
Thavg = 0.25
4
Fig. 8.
Fig. 9.
Peak detection.
k 3
4
i=1
For every RRavg duration, if a new peak is not detected, then
the average threshold is reduced to 75% of its current value.
This threshold reduction continues until the average threshold
hits a predefined minimum value, so that noise signals are not
picked up as QRS peaks. The threshold adaptation routine is
given in Fig. 8.
The peak detection algorithm starts when the filtered signal
eno(n) exceeds the threshold. It begins with finding a continually
j =0
2
j =0
(16)
(17)
170
Fig. 11.
Fig. 10.
DEEPU AND LIAN: A JOINT QRS DETECTION AND DATA COMPRESSION SCHEME FOR WEARABLE SENSORS
171
TABLE III
SIMPLIFIED CODING-PACKAGING ROUTINE
Simplified data packaging routine.
1) Receive 2sC coded prediction error, e 2 c(n ), into a 6word local memory.
2) If the memory is full go to Step 3), else go to Step 1)
3) If-2 e 2 c(n 5 i n ) 1, append header 0000, use framing format D
form Table IV and go to Step 1) else Step 4)
4) If-4 e 2 c(n 3 i n ) 3, append header 0001, use framing format C
form Table IV and go to Step 1) else Step 5)
5) If-16 e 2 c(n 2 i n ) 15, append header 1, use framing format A
form Table IV and go to Step 1) else Step 6)
6) If-64 e 2 c(n 1 i n ) 63, append header 01, use framing format B
form Table IV and go to Step 1) else Step 7)
7) If-65 e 2 c(n ) 64, append header 0011, use framing format E form
Table IV, replace e 2 c(n ) with corresponding x(n) and go to Step 1)
TABLE IV
SPECIFICATIONS OF THE FABRICATED DEVICES
TABLE V
ECG COMPRESSION DE-COMPRESSION SUMMARY
ECG Compression De-Compression Summary
Compression
1) Initialize the SSLMS predictor
2) While new input sample do
, from previous sample using SSLMS predictor
a. Estimate new sample, x
b. Read new sample, x
Fig. 12. QRS detection over tape 117 of the MIT/BIH database with large T
waves (a) ECG signal (b) Prediction Error (c) SG filtered signal (d)smoothened
signal with adaptive thresholding and detected QRS peaks (Red).
V. PERFORMANCE RESULTS
A. QRS Detection
The performance of the proposed algorithm is evaluated using
the MIT/BIH Arrhythmia database. The MIT/BIH database is a
benchmark database with 48 half-hour two-channel ambulatory
ECG recordings. These recordings have 11-bit resolution over
10 mV and are sampled at 360 Hz.
To evaluate the QRS detection performance, false positive
(FP) and false negative (FN) detections are used. FP indicates
the declaration of a QRS peak when there is actually none and
FN indicates that the algorithm failed to detect an actual beat.
Further, by using FP and FN, the sensitivity (Se) and positive
prediction (+P) are computed using the following equations:
TP
TP + FN
TP
+P (%) =
.
TP + FP
Se(%) =
(18)
(19)
172
TABLE VI
PERFORMANCE OF THE PROPOSED ALGORITHM USING
THE MIT/BIH DATABASE
Tape
Total
FP
FN
Se (%)
+P (%)
100
101
102
103
104
105
106
107
108
109
111
112
113
114
115
116
117
118
119
121
122
123
124
200
201
202
203
205
207
208
209
210
212
213
214
215
217
219
220
221
222
223
228
230
231
232
233
234
2273
1865
2187
2084
2229
2572
2027
2137
1774
2532
2124
2539
1795
1879
1953
2412
1535
2278
1987
1863
2476
1518
1619
2601
1963
2136
2980
2656
1860
2955
3004
2650
2748
3251
2265
3363
2209
2154
2048
2427
2483
2605
2053
2256
1571
1780
3079
2753
0
3
0
0
24
27
1
0
30
3
3
0
0
8
0
2
0
1
1
1
1
5
1
2
0
0
22
0
14
4
0
5
2
0
2
3
0
0
0
1
4
0
31
0
0
0
0
0
1
1
0
1
3
9
4
4
3
4
1
0
1
2
0
20
0
0
0
0
0
3
7
2
85
17
56
12
4
24
0
19
0
34
4
4
3
5
0
7
1
6
4
0
0
37
4
3
99.96
99.95
100
99.95
99.87
99.65
99.8
99.81
99.83
99.84
99.95
100
99.94
99.89
100
99.17
100
100
100
100
100
99.8
99.57
99.92
95.67
99.2
98.12
99.55
99.78
99.19
100
99.28
100
98.95
99.82
99.88
99.86
99.77
100
99.71
99.96
99.77
99.81
100
100
97.92
99.87
99.89
100
99.84
100
100
98.93
98.96
99.95
100
98.32
99.88
99.86
100
100
99.58
100
99.92
100
99.96
99.95
99.95
99.96
99.67
99.94
99.92
100
100
99.25
100
99.25
99.86
100
99.81
99.93
100
99.91
99.91
100
100
100
99.96
99.84
100
98.51
100
100
100
100
100
Total
109508
201
395
99.64
99.81
shows the instantaneous prediction error e(n). The third plot (c)
shows the SG filtered signal. It can be observed that the impulse
noise is drastically reduced after SG filtering. The fourth plot
(d) shows the smoothened signal after squaring and integration
with threshold varying adaptively based on signal amplitude.
The peak detections are marked as a red colored spike in the
plot (d). Fig. 12 shows the performance of the algorithm under
the presence of elevated T waves, which are often misidentified as QRS peaks due to their amplitude. It can be seen from
Fig. 12(b)(d) that the T waves are effectively removed by the
filtering and processing stages. Fig. 13 shows the detection performance, when QRS complexes with varying morphologies,
Fig. 13. QRS detection over tape 200 of the MIT/BIH database with irregular
inverted peaks. (a) ECG signal. (b) Prediction error. (c) SG filtered signal. (d)
Smoothened signal with adaptive thresholding and detected QRS peaks (Red).
DEEPU AND LIAN: A JOINT QRS DETECTION AND DATA COMPRESSION SCHEME FOR WEARABLE SENSORS
173
TABLE VII
PERFORMANCE COMPARISON WITH OTHER PUBLISHED ALGORITHMS
Fig. 14. QRS detection of tape 203 of the MIT database with severe baseline
drift and noise. (a) ECG signal. (b) Prediction error. (c) SG filtered signal. (d)
Smoothened signal with adaptive thresholding and detected QRS peaks (Red).
Method
Se(%)
+P(%)
Ref
Wavelet De-noising
Genetic Algorithm
Filter Banks
BPF/Search-back
Multiscale Morphology
Quadratic Spline wavelet
Pulse Train approach
Wavelet Delineation
Proposed method
99.55
99.60
99.59
99.69
99.81
99.31
99.58
99.66
99.64
99.49
99.51
99.56
99.77
99.80
99.70
99.55
99.56
99.81
[27]
[28]
[29]
[30]
[31]
[10]
[4]
[32]
174
TABLE VIII
COMPRESSION PERFORMANCE OF THE PROPOSED ALGORITHM USING THE
MIT/BIH DATABASE
Tape
Statistical
Huffman
Coding
Selective
Huffman
Coding
Proposed
Joint coding
Packaging
100
101
102
103
104
105
106
107
108
109
111
112
113
114
115
116
117
118
119
121
122
123
124
200
201
202
203
205
207
208
209
210
212
213
214
215
217
219
220
221
222
223
228
230
231
232
233
234
2.7748
2.7287
2.7431
2.7125
2.6096
2.662
2.5418
2.5466
2.6444
2.7443
2.7299
2.9021
2.5496
2.7145
2.7494
2.4911
2.7192
2.5063
2.5856
2.9946
2.5772
2.6791
2.8712
2.6221
2.9862
2.6623
2.3297
2.9638
2.7089
2.5433
2.4936
2.7111
2.4203
2.6227
2.5715
2.4818
2.545
2.8075
2.722
2.6238
2.6923
2.8428
2.664
2.7724
2.848
2.9561
2.7628
2.8064
2.2244
2.1952
2.2198
2.1919
2.1471
2.1512
2.0833
2.0959
2.1395
2.2023
2.1927
2.3004
2.1001
2.1833
2.2199
2.0613
2.1861
2.0537
2.104
2.3554
2.0959
2.163
2.2816
2.1272
2.351
2.15
1.9387
2.3382
2.1804
2.0793
2.0447
2.1815
1.9988
2.1284
2.0938
2.0365
2.0864
2.2443
2.2083
2.1258
2.1694
2.2643
2.1517
2.2226
2.2722
2.3323
2.2141
2.2402
2.3173
2.2858
2.2962
2.288
2.247
2.2533
2.1825
2.1978
2.2452
2.2951
2.245
2.432
2.1748
2.2555
2.3724
2.2054
2.2952
2.2023
2.2422
2.4432
2.2141
2.2907
2.4283
2.2572
2.4281
2.2361
2.1136
2.5446
2.2751
2.18
2.1817
2.2712
2.1449
2.2962
2.1913
2.1593
2.1776
2.4021
2.3582
2.2174
2.2411
2.4042
2.2428
2.3808
2.4149
2.4403
2.3535
2.3855
2.69
2.99
2.17
2.35
2.286
2.544
Avg BCR
Max. BCR
TABLE IX
COMPRESSION PERFORMANCE COMPARISON WITH OTHER ALGORITHMS
Method
BCR
Ref
2.38
2.43
1.92
2.25
2.28
[13]
[14]
[33]
[26]
DEEPU AND LIAN: A JOINT QRS DETECTION AND DATA COMPRESSION SCHEME FOR WEARABLE SENSORS
[16] K. P. Lin and W. H. Chang, QRS feature extraction using linear prediction, IEEE Trans. Biomed. Eng., vol. 36, no. 10, pp. 10501055, Oct.
1989.
[17] A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff, P. C.
Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E.
Stanley, PhysioBank, PhysioToolkit, and PhysioNet: Components of a
new research resource for complex physiologic signals, Circulation, vol.
101, no. 23, pp. e215e220, Jun. 2000.
[18] G. B. Moody and R. G. Mark, The impact of the MIT-BIH Arrhythmia
database, IEEE Eng. Med. Biol. Mag., vol. 20, no. 3. pp. 4550, May/Jun.
2001.
[19] A. Koski, Lossless ECG encoding, Comput. Methods Programs
Biomed., vol. 52, no. 1, pp. 2333, Jan. 1997.
[20] B. Farhang-Boroujeny, Adaptive filters: Theory and Applications. New
York, NY, USA: Wiley, 1998.
[21] L. Der and B. Razavi, A 2-GHz CMOS image-reject receiver with LMS
calibration, IEEE J. Solid-State Circuits, vol. 38, no. 2, pp. 167175, Feb.
2003.
[22] R. W. Schafer, What Is a Savitzky-Golay filter? IEEE Signal Process.
Mag., vol. 28, no. 4. pp. 111117, Jul. 2011.
[23] A. Jas, J. Ghosh-Dastidar, M.-E. Ng, and N. a. A. Touba, An efficient test
vector compression scheme using selective Huffman coding, IEEE Trans.
Comput.-Aided Des. Integr. Circuits Syst., vol. 22, no. 6, pp. 797806, Jun.
2003.
[24] S. Rigler, W. Bishop, and A. Kennings, FPGA-based lossless data compression using Huffman and LZ77 algorithms, in Proc. Can. Conf. Electron. Comput. Eng., 2007, pp. 12351238.
[25] R. A. Becker and T. Acharya, Variable length coding packing architecture, U.S. Patent US6 653 953 B2, Intel Corporation, 2003.
[26] C. J. Deepu, X. Zhang, W.-S. Liew, D. L. T. Wong, and Y. Lian, An
ECG-SoC with 535nW/channel lossless data compression for wearable
sensors, in Proc. IEEE Asian Solid-State Circuits Conf., 2013, pp. 145
148.
[27] S.-W. Chen, H.-C. Chen, and H.-L. Chan, A real-time QRS detection
method based on moving-averaging incorporating with wavelet denoising, Comput. Methods Programs Biomed., vol. 82, no. 3, pp. 187195,
Jun. 2006.
[28] R. Poli, S. Cagnoni, and G. Valli, Genetic design of optimum linear and
nonlinear QRS detectors, IEEE Trans. Biomed. Eng., vol. 42, no. 11. pp.
11371141, Nov. 1995.
[29] V. X. Afonso, W. J. Tompkins, T. Q. Nguyen, and S. Luo, ECG beat
detection using filter banks, IEEE Trans. Biomed. Eng., vol. 46, no. 2.
pp. 192202, Feb. 1999.
[30] P. S. Hamilton and W. J. Tompkins, Quantitative investigation of QRS
detection rules using the MIT/BIH arrhythmia database, IEEE Trans.
Biomed. Eng., vol. BME-33, no. 12. pp. 11571165, Dec. 1986.
[31] F. Zhang and Y. Lian, QRS detection based on multiscale mathematical
morphology for wearable ECG devices in body area networks, IEEE
Trans. Biomed. Circuits Syst., vol. 3, no. 4, pp. 220228, Aug. 2009.
[32] J. P. Martinez, R. Almeida, S. Olmos, a P. Rocha, and P. Laguna, A
wavelet-based ECG delineator: evaluation on standard databases, IEEE
Trans. Biomed. Eng., vol. 51, no. 4, pp. 570581, Apr. 2004.
[33] S. S.-L. Chen, H. H.-Y. Lee, C. C.-A. Chen, H.-Y. Huang, and C.-H.
Luo, Wireless body sensor network with adaptive low-power design for
biometrics and healthcare applications, IEEE Syst. J., vol. 3, no. 4, pp.
398409, Dec. 2009.
175