al. (2008) proposed an encoding scheme to compress
the DWT coefficients using bit-field preserving
(BFP) and running length encoding (RLE) and it
was tested on an FPGA system (Lee et al., 2011).
The method was simple to implement and allows
forward data processing compared to other methods
that require sorting and heavy computations.
Most of the ECG compression methods are open
loop methods that have fixed performance. On the
other hand, there are new closed loop compression
methods that were designed to check the quality of
the compressed signal by evaluating the amount of
error introduced to the reconstructed signal before
transmitting the compressed packet (Benzid et al.,
2006).
This paper introduces a dynamic compression
method that was not addressed in published
literature yet. The dynamic compression method
handles the issue of the limited payload size when
the compressed packet is exceeding the maximum
payload available. In other words, it controls the size
of the compressed packets dynamically by a closed
loop. For example, in low power wireless
technologies like Bluetooth, Bluetooth Low Energy,
6LoWPAN, and ZigBee, the payload size is not very
large and thus sending a continuous raw data will
not be efficient in terms of energy saving.
Consequently, the data have to be compressed and
the overheads have to be designed optimally to make
sure that the packet holds much more data than
headers. As a result the data rate is reduced without
a significant loss in the clinical features. The
proposed dynamic compression method was
designed based on a modified DWT-BFP-RLE
compression algorithm. The method was tested on
ECG records from MIT-BIH Arrhythmia database
after obtaining the proper compression parameters.
2 METHODS
2.1 Wavelet Decomposition and
Reconstruction
The ECG signal is a non-stationary signal that has
varying frequency components with time and the
DWT showed its powerfulness in decomposing the
different ECG waveforms. The wavelet-based
techniques fit with the standard signal filtering
methods and encoding schemes and thus produce
good compression results (Addison, 2002). The
discrete wavelet transform (DWT) method can be
done using decimation and without decimation
(redundant or shift-invariant). Here undecimated
DWT has been chosen due its better results in de-
noising (Raj and Venkateswarlu, 2011). The ECG
signal can be decomposed into J decomposition
levels as shown in Figure 1, using lowpass g(n) and
highpass h(n) FIR filter banks and then down-
sampling by a factor of 2. The decomposed signal in
each level is divided into low frequency signal (a
n
)
and high frequency signal (d
n
). The low frequency
signal a
n
is called the approximation signal and the
high frequency signal d
n
is called the detail signal.
The low frequency signal is decomposed again into
two signals and so on up to d
J
and a
J
. The filter
banks are constructed from wavelet basis functions
such as Haar, Daubechies, Biorthogonal, Coiflet,
Symmlet, Morlet, and Mexican Hat. The selection of
wavelet transform function mainly depends on the
application. The decomposed signal can be
reconstructed back again into the original signal
using reconstruction filters, which are the inverse of
the decomposition filters. In this work, Daubechies
(Db4 and Db5) and Symmlet (Sym4 and Sym6)
mother wavelets were adopted and the
decomposition level (J) was varied from 3 to 7.
Figure 1: DWT with 2 level decomposition.
2.2 Thresholding and Bit-Field
Preserving
After decomposing the signal into sub-bands using
DWT, thresholds are applied to each sub-band. The
thresholding process mainly contributes in filtering
and used for decoding as well. One of the commonly
used adaptive thresholds is provided in equation (1).
N
n
log2
where, is the standard deviation of the sub-band
and N is the number of samples in the same sub-
band. However, in this work the threshold (Thres
Sb
)
was calculated based on the bit-depth (B
Sb
) of each
sub-band and the desired preserved bit-length (I
Sb
).
The bit-depth B
Sb
is the most significant bit of the
maximum coefficient in the sub-band. While, the
preserved-length I
Sb
is controlled according to the
desired compression performance where Sb stands
for the sub-band coefficients d
1
, d
2
,.., d
J
and a
J
.
h(n)
g(n)
d
1
h(n)
g(n)
↓2x
or
(n)
↓2 ↓2
d
2
↓2
a
2
Packet-size-ControlledECGCompressionAlgorithmbasedonDiscreteWaveletTransformandRunningLengthEncoding
247