You are on page 1of 4

New Efficient Fractal based Compression Method

for Electrocardiogram Signals


A.Khalaj and H. Miar Naimi
Electrical and Computer Engineering Faculty,Babol university of Technology
P.B.O: 484, Telfax: +98-111-3239214
E_mail:h_miare@nit.ac.ir,alikhalaj2006@gmail.com

Abstract- In this paper a new efficient fractal based of research has been performed to find evermore algorithms
compression algorithm is proposed for electrocardiogram for compressing the ECG.[1] which can be classified into
signals. The self-similarities in the ECG signals make three main categories:
them suitable to be compressed efficiently using fractal a) Direct Data Compression: for this class we can address
based methods. In the proposed method, as in the basic the following methods: Turning Point (TP) method [2], Time
fractal based compression method, each part of the signal Epoch Coding (AZTEC) method [3], Encoding System
is mapped to another part with a reasonable error. The (CORTES) method [4], delta coding algorithm [5], Sample
transformed maps are then stored instead of the original Skipping SLOPE the scan-along polygonal approximation
signal samples. The signal is built up using these (SAPA) [6], (DPCM) [7] and entropy coding [8].
transforms in an iterative process using an arbitrary b)Transform based Methods like Fourier Transform (FT)
initial signal. Here, the morphological information of [9], Karhunen–Loeve transform (KLT) [10], Wavelet
ECG is incorporated to improve the compression Transform (WT) [11], Wavelet Packet-Based Transform
algorithm in Compression Ratio, PRD and CC. As a (WPT) [12], SPHIT[13],JPEG2000[14].
novel point and in contrary to other methods there is no c)Parameter Extraction Techniques like syntactic methods,
need to detect ECG complexes, this makes the algorithm linear prediction methods [15] and neural networks methods.
more robust and accurate. The fixed size of blocks with Direct compression and transform-based methods contain
rotated transformed blocks and optimal coefficients for actual and transformed data respectively. Whereby, the
the maximum similarity between blocks are employed. original data are reconstructed by an inversed process. The
The proposed algorithm was tested on a reasonable set of direct data compressors are based on the detection of
MIT-BIH database signals. The experiments all showed redundancies within the original signal using direct analysis.
that the proposed algorithm outperforms all reported In contrast, transformation compression methods mainly
Fractal-Based methods. utilize spectral and energy distribution analysis for detecting
redundancies. Parameter extraction methods are irreversible
Keywords: Data Compression, Electrocardiogram Signal, processes with which a particular characteristics or
Fractals. parameters of the signal is extracted.

1. Introduction 2. Electrocardiogram Signals

Electrocardiogram is one of the most important biological The theory of chaos represents that in any irregularity there
signal representing muscular activities of the heart and is a regularity. There are many similarities among different
vessels. This signal is recorded by contacting two or more parts of ECG signals, on the basis of quasi-periodicity,
electrodes on the human body, detecting electrical potentials making it suitable to be compressed by fractal based methods.
resulting from body heart breathing. ECG exhibits special Fractal based methods have received a great deal of
complexes named P,Q,R,S,T wavelets. Because of the close attention, because they are capable of producing complicated
relationship between the shape of the signal and systematic and various functions with as little as few maps. In addition,
operation of organs, such as heart and vessels, several these methods are able to produce structures with non integer
syndromes affect the shape of the ECG . This fact lends itself dimension. Since Fractal based methods can model
to the significance of the processing and storing of the ECG complicated functions with only a few maps.,an active area
signals. To ensure the accuracy of ECG signal recordings of research is the inverse problem i.e., determination of the
they are generally digitized in high resolutions. The large map parameters needed to model a given function. It is
amount of recorded data results in problems such as storage hoped that if the inverse problem is solved then this theory
space and bandwidth limitations. Thus, the necessity of could be used to model arbitrary functions and achieve high
efficient compression schemes is readily understood. The compression ratios.
main goal of any compression technique is to achieve
maximum data volume reduction while preserving the
significant signal morphological features. A broad spectrum 3. Fractal Structures

978-1-4244-3508-1/09/$25.00 ©2009 IEEE 983

Authorized licensed use limited to: Univ Rey Juan Carlos. Downloaded on April 07,2010 at 11:48:41 EDT from IEEE Xplore. Restrictions apply.
As we know fractals are inherently self-similar structures domain block provides more chance for finding
where there is a set of transforms map it to its different parts. transforms with smaller error. Consider a range block of
It was shown that the mentioned transforms can represent size n and a domain block of size 2n. Now the aim is
fractals so that having the transforms; one can rebuild the finding a transform to map these two blocks with
original fractal in an Iterative Function System (IFS), with an minimum error. The distance between the transformed
arbitrary start structure [16]. domain block and the range blocks is the objective
Assume X is a fractal and T is the transform describing it, function that should be minimized.
based on discussion above. Equation(1) holds: The mapping is performed between the two blocks after
T(X)=X (1) omitting their mean. Thus the mean of range block should
As (2) shows, X is the fixed point of T, being mapped on directly be stored.
itself under T. We say that fractal X is self similar. Having Assume that R is the range and D is the domain block.
only T, we can rebuild X using following recursive equation For the optimal mapping we find a real number k, which
shown in (2). minimizes the following distance function:
Ref. [17] introduced mathematical proof for convergence n 2
of (2) and showed that after enough number of iterations X(n) E ( D, R) = ∑ ( Ri − kDi ) (3)
i =1
converges to X; the fixed point of T.
Differentiating on k yields:
X (0 ) = X 0 a n a rb itra ry in itia l in p u t n
(2) ∑ Di Ri
X ( n + 1) = T ( X ( n )) n = 0,1, 2, ... dE n
= 0 ⇒ − ∑ 2 Di ( Ri − kDi ) = 0 ⇒ kopt = i =n1
Regarding to above algorithm, we can store and rebuild the dk i =1 2 (4)
∑D
initial structure having only the related transforms and gain a i =1 i
high compression ratio. Here performing the iterations
infinitely, we can rebuild the initial fractal without any error. To enrich the mapping, in addition to each domain block,
This is the base of fractal compression methods. To apply four rotations are considered as well, these are obtained
this method to data sets such as images and one dimensional by rotating the domain block 0, 90, 180 and 270 degrees
data, we must note that these types of data are not fully self- clockwise. Each range block is represented and stored by
similar. A solution here is to exploit the similarities among a triple as ( m, kopt , j ) , in which m represents the related
different parts of the data. So we compute a set of transforms
that map different parts of the data. Since in natural data, domain block, kopt is the optimum coefficient and j
different parts are not fully similar, the fractal compression is denotes rotation amount.
not a lossless compression methods.

4. The proposed method

To introduce the proposed method we start looking at


figure.1 as a typical one dimensional signal. Considering
samples in figure.1, the similarity among different parts is a c
evident. As the traditional fractal compression method, we b
segment the ECG into equal length non-overlapped parts Figure.2. a) A typical one dimensional range block, b) Related
domain block, c)Four rotated forms of the domain block (It is clear
named range blocks(Rs) and for each we search for block of the best transform is the bolded case)
signal ,domain block(Ds), that can be transformed to it with To find the best domain block related each range block,
minimum error. The transform along with the address of the best block is accepted if the related mapping error is
related domain block is saved for each range block. less than a predefined threshold. Otherwise the range
block is split into two smaller blocks and the mapping
continues in a smaller scale. Entering into a smaller scale
may continue for several (normally four) times and the
best domain found in the smallest scale is accepted
unconditionally.
Each range block is coded by the data structure shown
in figure.3. One first bit represents the rotations code 0 or
Figure.1. Range (Ri) and Domain (Di) blocks. 1 for 0 or 180 degrees, respectively. The other bit
As shown in figure.1 the domain block DK+2 is mapped to allocation is X bytes for domain address calculated by:
range block R2 under T2 and …. Usually the length of
domain blocks is twice of ranges. So to map to range blocks,
domain blocks should be down sampled. Performing this where DN is the maximum value of domain address.
step makes their length equal to n .The larger length of Since we limit our algorithm in a very small block length,

984

Authorized licensed use limited to: Univ Rey Juan Carlos. Downloaded on April 07,2010 at 11:48:41 EDT from IEEE Xplore. Restrictions apply.
just 2bits is sufficient for step storage that yields 4 steps. For best role in 32 samples size for all the mentioned domains'
Kopt and mean values ,DC , just 5 and 4 bits is needed, length equally, making no difference.
respectively. This is explained later. 3.Transition areas:
Transform Domain Kopt Step Range Mean As shown before high amount of distortion occurs in
transition areas containing QRS complexes, noting that
1bits X bits 5 bits 2 bits 4 bits S,T encode in first step normally. Distortion in
mentioned complexes are due to two main factors:
Figure.3. The data structure describing a range block a-A limitation of block lengths since a limited number
The reconstruction process starts with an arbitrary signal of lengths are considered to match the range and domain
and an iterated operation converges into the original signal. blocks .This makes unbalanced peaks in related domain
converges very fast and after a few steps of iterative process and range blocks resulting the main proportion of errors.
the coded signal is recreated with a reasonable error. b-Down sampling in domain blocks for high slope
areas remains unpredictable fluctuations that similar
5. Results & Discussions leaves unpredictable fluctuations that similar areas don’t
know each other. In rapidly varying parts this cause
1. Quantization: lowering altitudes.
In signal compression we aim for describing a signal in a Table.1 represents some of achieved experimental
compact form that consist of a small set of numbers results by our scheme.
Table.1-Average Experimental Results in Proposed Method on MIT-
representing the significant parameters. Separate encoding of BIH Database
magnitudes such as DC, Kop, will disable a significant
signal CC PRD CR
portion of our compression capabilities. Without much loss
100 97.29 11.06 13.79
of similarity, we can quantize them as store them by codes
assigned to each magnitudes. The maximum and minimum 102 98.71 10.17 14.2
values of DC and Kop should be stored. Then by M-bits we 103 98 11 13.78
M 104 99 11.2 13
can make 2 intervals(codes),assigned to the closest values.
Experimental results showed us the best bit allocation for 105 98.56 12 15.13
mean values(DC),varying less, 4bits and for Kop 6bits, 108 98.37 8.22 15.42
yields 16 intervals and 64 intervals, respectively. In 109 98.27 11 17.39
reconstruction progress it is just sufficient to reproduce 117 98.48 4.5 14.64
intervals before performing the decoding algorithm AVE 98.33 9.80 14.66
according to the codes that calculates the main magnitudes. Table.2 represents some of the proposed algorithm like
The calculated values is embedded in codes. SPIHT[13] a wavelet transform with layers in a
2. Transforms: hierarchical tree for coefficients. Then it is filtered to
a-In all our tested signals just two transforms is utilized in generate low-pass & high-pass signals and utilizes down-
representing rotations. On the basis of eliminating mean sampling by a factor of two, SVD[18](Singular Value
values, self-similarity describes itself just with itself and Decomposition) which considers ECG signal to be a
symmetric to the origin(rotation by 180). So by ignoring the periodic one, utilizes periodic segmentation and
two other not used it is sufficient to store just one of the normalizing periods, JPEG2000[14] a scheme as an image
other two unused versions, it is sufficient to store just one of compression of ECG signals and Fractal Interpolation
the two required bits. with a contraction factor for mapping that is constrained
b-All ranges are encoded in the first step except those to be real and lie in the interval (-1,1) . Our method
containing QRS complexes. In steps more than one ,each proves more efficient than the previous algorithms with
range maps to its corresponded domain by itself (rotation by fixed range blocks methods. The peak error is
0),hence no other transform is needed. So if we know that significantly lower than aforementioned algorithms, with
our step is higher than one the transform should be the a superior compression ratio.
domain block itself with no transform, undoubtedly. Table.2-Comparison Of Different Coding on ECG-117
As shown before different parameters in compression rate Methods CR PRD CC
and error value these signals can be compressed widely, in SPIHT[13] 8:1 1.18 >=99
a high spectrum, with low CR and high CC in short block SVD[18] 10:1 3.14 >=99
lengths consequently. Experimental results in acceptable JPEG2000[14] 10:1 1.03 >=99
results recommend the length of 64 samples size for domain Fractal
blocks, there is no relation to signal length ,protecting high 7.4:1 3.50 >=99
Interpolation[19]
CR and CC, that has declared its efficiency in 128 samples Proposed
size too. So each signal has different factors. Overlapping 14.64:1 4.5 >=98
Algorithm
acts its best role in 32 samples size for all the mentioned its 6.Conclusion

985

Authorized licensed use limited to: Univ Rey Juan Carlos. Downloaded on April 07,2010 at 11:48:41 EDT from IEEE Xplore. Restrictions apply.
The proposed algorithm, modeled by MATLAB computing construction of fractal” Proc.Roy.Soc.London A ,vol.399 .pp.243-
275, 1985.
environment, was tested on ECG arrhythmia databases. in
[17] Kreyszig, Introductory Functional Analysis with Application, John
MIT-BIH. Evaluating each algorithm is tested in results with Wiley & Sons, New York , NY USA,1978
PRD<10% and CC>95% ,maintaining arrhythmic [18] J.-J.Wei,C,-J, Chang,N,-KChou and G,-JJan ” ECG data
information. Compression using truncated singular value decomposition ”
IEEE Trans. on Information Technology in Biomedicine , vol.5,
In this method each signal is compressed generally with
pp.290-299,2001
no necessity to find transition areas. On account of self- [19] Y.IL.Jun,Y.R.Yoon and H.R.Yoon”ECG Data Compression Using
similarities in electrocardiogram signals, they are the best Fractal Interpolation ” IEEE Trans. on Biomed . Eng .vol .47, pp.
suitable choice to based on chaos theory. 161-162,1994
In practice, mapping the whole of a signal with a
transformation proves unworkable. Therefore, we split it in
domain and range blocks. Then we seek for the best related
domain block for the range block with an error lower than
predefined threshold. Each higher threshold causes the
further splitting of range block. The seeking process is
repeated unless the best mapping is found or the last scale is
reached. For the best mapping the DC value and optimum
coefficient Kopt is stored separately.
In order to reconstruct the initial signal, an arbitrary signal,
(say zero) is assumed. The reverse algorithm is utilized in the
reconstruction progress.

REFRENCES:
[1] S .Jalaleddine, C.Hutchens , R.Strattan, and W.Coberly “ ECG
data compression techniques_ A unified approach ” IEEE Trans.
on Biomed. Eng., vol.BME-37, pp.329-343 , Apr 1990.
[2] W.C.Mueller,”Arrhythmia detection program for an ambulatory ECG
monitor. ” Biomed. Sci. Instrument , vol.14, pp.81 -85,1978
[3] J.R.Cox.F.M.Nolle, H.A.Fozzard,and G.C.Oliver”AZTEC ,a preproc-
essing program for real-time ECG rhythm analysis”IEEE Trans.
on Biomedical Engineering,vol.BME-15,pp.128-129 , Apr..1968
[4] J.P.Abenstein and W.J.Tompkins,” New data-reduction algorithm for
real-time ECG analysis” IEEE Trans. on Biomedical Engineering,
vol. BME-29,pp.43-48,Jan.1982
[5] D.Stewart ,G.E.Dower and O.Seurnyi,”An ECG compression code.”
J.Electrocardiol,vol.6, no.2 , pp.175- 176,1973
[6] L.W.Grdenhire.” Redundancy reduction the key to adaptive
telemetry.’in Proc.1964Nat .Telemetry Conf.1964,pp.1-16
[7] A. S.Krishnakumar , J.L.Karpowicz, N.Belic D.H.Singer and
J.M.Jenkins,” Microprocessor-Based data compression scheme for
enhanced digital transmission of Holter reco-rding ” Computers
Crdiol.Long Beach, CA pp.435-437, 1980
[8] U.E.Ruttimann and H.V.Pipberger’Compression of ECG by prediction
interpolation and entropy encoding.” IEEE Trans. on Biomedical
Engineering, vol.BME-2, pp.613-62 Nov.1979
[9] B.R.S.Reddy and I.S.N.Murthy .” ECG data compression using Fourier
descriptors” IEEE,Trans. on Biomedical Engineering, vol. BME 33, pp.
428- 434,Apr.1986
[10] N.Ahmed, P.J.Milne and S.G.Harris ” Elecrocardiographic data
compression via orthogonal transforms” IEEE Trans. on Biomedical
Engineering, vol.BME-22, pp.484-487, Nov.1975
[11] M.Abo-Zahhad and B.A Rajoub,” An effective coding technique
for the compression of one-dimensional signals using wavelet transfor-
m” Medical Engineering Physics, vol. 24 ,pp.185-199,2002
[12] Bradie B. ” Wavelet packet-based compression of signal lead ECG”
IEEE Trans. on Biomedical Engineering 1996; 43(5):493-501
[13] Z.Lu,D.Y.Kim and W.A.Pearlman ” Wavelet Compression of ECG
Signals by the set partitioning in hierarchical tree algorithm ”
IEEE Trans. on Biomed .Eng .,vol .47,pp. 849-856, 2000
[14] A.Bilgin , M.W.Marcellin and M.I.Altbach ” Compression of
electrocardiogram signals using JPEG2000” IEEE Trans. on
Consumer Electronics,vol.49,pp,833-840, 203
[15] G.Nave,A.Cohen,” ECG compression using long-term prediction,”
IEEE Trans .Biomed .Eng. vol.BME-40, pp.877-885, Sept. 1993.
[16] M.F.Barnsley and S.Demko.”Iterated function systems and the global

986

Authorized licensed use limited to: Univ Rey Juan Carlos. Downloaded on April 07,2010 at 11:48:41 EDT from IEEE Xplore. Restrictions apply.

You might also like