Identification of Cardiac Diseases from(ECG) Signals based on Fractal Analysis

This paper investigates the use of fractal geometry for analyzing ECG time series signals. A technique of identifying cardiac diseases is proposed which is based on estimation of Fractal Dimension (FD) of ECG recordings. Using this approach, variations in texture across an ECG signal can be characterized in terms of variations in the FD values. An overview of methods for computing the FD is presented focusing on the Power Spectrum Method (PSM) that makes use of the characteristic of Power Spectral Density Function (PSDF) of a Random Scaling Fractal Signal. A 20 dataset of ECG signals taken from MIT-BIH arrhythmia database has been utilized to estimate the FD, which established ranges of FD for healthy person and persons with various heart diseases. The obtained ranges of FD are presented in tabular fashion with proper analysis. Moreover, the experimental results showing comparison of Normal and Abnormal (arrhythmia) ECG signals and demonstrated that the PSM shows a better distinguish between the ECG signals for healthy and non-healthy persons versus the other methods.


INTRODUCTION
Heart is one of the vital organs of human being.An Electrocardiograph (ECG) is a signal that records the electrical activity of the heart muscle as it changes with time; they usually printed on paper for easier analysis.It is a very popular and useful biosignal which has been used by doctors and physicians for the purpose of diagnosis different of cardiac diseases including arrhythmia.Heart rhythm disorders, called arrhythmias, present abnormal electrical activities due to cardiovascular diseases.
Analysis of heart failure is of tremendous significance since it is a major medical problem that affects most of people all over the world [1].Healthy normal heart rhythm which is called Normal sinus rhythm is a rhythm where the sinus node triggers the cardiac activation [2].This is easily diagnosed by noting that the three deflections, P-QRS-T, follow in this order and are differentiable, see Figure 1.

Figure 1. Typical ECG signal
When the activation in the cardiac atria is fully irregular and disordered, producing irregular fluctuations in the baseline heart rhythm disorders.A consequence is that the ventricular rate is rapid and irregular, though the QRS contour is usually normal [2].Atrial fibrillation (AV) occurs as a consequence of rheumatic disease, atherosclerotic disease, hyperthyroidism [2].It may also occur in healthy subjects as a result of strong sympathetic activation. .Supraventricular tachycardia (SVT) means that from time to time heart beats very fast for a reason other than exercise, high fever or stress,.When the Pwave always precedes the QRS-complex but the PR-interval is extended over 0.2s, heart block is diagnosed.Finding arrhythmia characteristics corresponding to Atrial Fibrillation (AF), Supraventricular tachycardia (SVT), and Heart Block from ECG recording have received considerabl attention in recent years.Differences in normal and abnormal ECG signals can't be easily determined especially with human eyes.Developing an intelligent method for identification of such cardiac diseases is very helpful in biomedical field, as it will be an aid to clinical staff in the absence of doctor, it will also help doctor to diagnose and act faster in case of emergency conditions.
In this paper, a fractal dimension (FD) for 20 dataset of ECG signals has been determined in time domain and frequency domain, then ranges of FD, is established for healthy person and persons with various heart diseases.The sample of ECG signals for the present study is obtained from MIT/BIH database via Physionet website [3].The MIT-BIH database contains both normal and abnormal types of ECG signals.In this study, the considered beats refer to the following classes: Normal Sinus Rhythm (N), Atrial Fibrillation beat (AFIB), Supraventricul Arrhythmia (SVT), and Heart Block (BII).The beats were selected from the recordings of 20 patients, which correspond to the following les: 16786m, 17052m, 16420m, 19088m, 16265m for Normal Rhythm, 05261m, 04908m, 05121m, 04746m, 06453m for Atrial Fibrilliation beat, 801m, 803m, 805m, 820m, 824m for Suparventricul Arrhythmia, and ecg2_20m, ecg4_20m, ecg10_20m, ecg11_20m, ecg12_20m for Heart Block.The properties of these signals are directed in Table 1 and their plots are shown in Figure 2 to Figure 5.The rest of this paper is organized as follows: In section 2 we present definition of fractals and fractal dimension.An overview of time domain methods for estimating fractal dimension is given in Section 3. In Section 4, the power Spectrum Method (PSM) is introduced as a method of estimating the fractal dimension in frequency domain.The experimental results are given in Section 5. Finally, in Section 6 we conclude with the conclusions and future works.

FRACTALS AND FRACTAL DIMENSION
Fractal geometry mathematically characterizes systems that are fundamentally irregular at all scales.The term fractal was first introduced by Mandelbrot [4].Fractals are fragmented geometric objects that can be divided into parts, each of which is approximately similar to the original whole.
Therefore, they are self-similar objects independent of scale.The fractal dimension (FD) is a measure of how complicated a self-similar object is, taking greater values for increasing complexity.FD is a non integer number that measures the degree of irregularity over multiple scales and it determines how fractal differs from Euclidean objects [5].Strict self-similarity is a property that only artificially generated mathematical objects are characterized by.Sierpinski triangle is such an example [6].

Table 1. Description of the used dataset
Natural objects show statistical self-similarity.In the statistical sense, an object is self-similar if its parts, on average, are similar to the whole, but there exist no exact replicas of particular parts.In statistical self-similarity or self-affinity, a measure of complexity for a given magnification will have the same statistical moments as at any other magnification, although the details will not be identical [8].Many real-world phenomena exhibit fractal properties.So it can often be useful to characterize the FD of a set of sampled data.
There are numerous signals such as speech signals [9], biomedical signals [10], and Internet Traffic time series signal [11] with fractal properties such that their graph is a fractal set.FD is a descriptive measure that has been proven useful in quantifying the complexity or self similarity of biomedical signals.Such analysis of complexity of biomedical signals helps us to study physiological processes underlying the systems.The FD can be used to study dynamics of transitions between different states of systems like heart, as also in various physiological and pathological conditions [12].
As ECG signal of a human heart is a self-similar object, so it must has a fractal dimension that can be extracted using mathematical methods to help identifying and distinguish specific States of heart pathological conditions.Several methods have been proposed in the literature to estimate the FD of signals or time series data either in time or frequency domain.Analysis in the time domain processing the signal data directly, while analysis in frequency domain requires Fourier or wavelet transform of the signal [13].

3.TIME DOMAIN METHODS OF ESTIMATING FRACTAL DIMENSION
Herein, fractal complexity of signal is characterized in real time by computing its FD using each of Katz's method, Hugshi's method and Hurst's method.

A. Katz's method
The FD of a signal curve, based on Katz's method [15], can be defined as: where, L is the total signal curve length or sum of distance between successive points, and d is the diameter estimation of the distance between the first data point and the data which gives the farthest distance.d and L , are respectively, can be expressed mathematically as below: Normalizing distances in (1) by the average distance between successive points, say a, gives:

B. Higuchi's method
Higuchi proposed an efficient algorithm to calculate the FD directly from time series [16].Assume a one dimensional time series X= {X(1), X(2), X(3), …, X(N)} where, N is the total number of samples, in our case the series X would be the successive values of ECG signal.The Higuch's algorithm constructs k new time series as: where k and m are integers, represent time interval between points and initial time value respectively, M = For each new time series constructed the length is computed as: where, is a normalization factor for the curve length of .The length of the series L(k) for the time interval k is computed as the mean of the k values, for m = 1, 2, ..., k .
, then the curve describing the shape of ECG time series is fractal-like with the dimension FD.In this case, if ln(L(k)) is plotted against ln(k) , k = 1, 2, 3, ..., , the points fall on a straight line with a slope equal to FD.The fractal dimension of ECG signal is calculated via above method while applying adaptive and fixed windowing method.

C. Rescaled Rang (R/S) Method
Hurst developed R/S method which is a statistical technique to analyze a large number of natural phenomena [17].The R/S method is one of the oldest and best known methods for estimating H (Hurst parameter).Let { , k = 1, 2, 3, ..., N be a set of N sample points of an ECG recordings.The mean and the standard deviation S(N) of these points are, respectively, and S(N) = The R/S-statistic or rescaled adjusted range , is defined by the ratio: where, Hurst found empirically, that for many time series observed in nature, they are well represented by the relation where C is a finite positive constant.By taking logs we obtain Therefore, the slope of a plot of log(R/S) against log(N) provides the Hurst parameter, H [6].The relation between the Hurst exponent and the fractal dimension is simply determined as FD=2-H.So fractal dimension with the help of these equations can easily evaluated in the rescaled range analysis.

FREQUENCY DOMAIN METHOD OF ESTIMATION FRACTAL DIMENSION
As we have seen that the Hurst parameter (Dimension) H measures the feature of self-affinity of time series in real-time domain.Herein, we present the description of this feature through processing the time series in the frequency domain in which we assume that the power spectrum of this signal is dominated by a Random Scaling Fractal(RSF) model P(f) = c/ , where c > 0. In the following we introduce a power spectrum method (PSM) depending on the frequency analysis by which we try to capture the fractal behavior of ECG signals based on the RSF model.

The Power Spectrum Method (PSM)
Fractals are applicable when the underlying process being mathematically modeled has a similar appearance regardless of the scale over which it is observed.It turns out that many of natural signals can be modeled using fractals.Many signals observed in nature are random fractals including biomedical signals such as ECG time series signal.Random Scaling Fractal (RSF) signals are signals whose probability distribution function (PDF) has the same 'shape' irrespective of the scale over which they are observed.So that, random fractal signals are statistically self similar (self-affinity), they are self-similar in a statistical sense [18].However, ECG time series signal exhibit the features of self-affinity so it can be considered as an example of RSF signals.RSF signals are characterized by power spectra whose frequency distribution is proportional to 1/ where is the frequency and q > 0 is the 'Fourier Dimension', a value that is simply related to the Fractal Dimension, FD and Hurst (Dimension) parameter H, by the relation q = H + 1/2 = (5 -2D)/2.This power law describes the conventional RSF models which based on stationary processes in which the 'statistics' of the RSF signals are invariant of time and the value of q is constant.
Assume X(t), in time domain, is a time series of ECG signal which assumed to be a self-affine signal.Notice that each of Figure 6 and Figure 7 shows the plotting of 1024 points of normal and abnormal ECG signals, respectively, with its similar small version of size 512 points from each of them. .The power spectrum of such a signal can be written as P ( ) = , where X ( ) is Fast Fourier Transform (FFT) of the time series in frequency domain ( i.e.X( ) = t(X(t))).For such time series the power spectrum, P ( ) obeys the RSF model To estimate the fractal parameter in this series we convert them to frequency domain in which we assumed that the empirical power spectrum of each series has an envelope Power Spectrum Density Function (PSDF) which given as the RSF model P ( ) = .By using Moving Window technique, we choose a window q of size N to move over the points of the time series to be analyzed.From each window segment we apply the PSM to estimate the Fourier Dimension q, after implementing normalizing and transformation to spectral domain on the given segment.
If we consider the error function ) where = , and it is assumed that the spatial frequency and the measured power spectrum then the solution of equation the 0 q E using least square method, and gives: Since the power spectrum of real signals of size N is symmetric about the DC level, where the DC level is taken to the midpoint + 1 of the array, so in practice only the data that lie to the right of DC [18].

EXPERIMENTAL RESULYS AND DISCUSSION
In this study, for analysis, we have utilized four dataset which are composed of ECG signals recorded from healthy subjects and patients with heart arrhythmia.We have performed the experiments using Matlab 7 on ECG datasets from the MITBIH arrhythmia database [8].The FD feature from each class of ECG timesereis signal is extracted using a non overlapping window of size 512 points by means of the presented methods.Tables 2-5 show the results obtained for the estimation of FD from the experimental signals and Table 6-9 show the intervals (lower bound and upper bound) of the estimated FD for each specific disease corresponding to each estimation method.Such intervals can distinguish clearly between healthy and non-healthy parsons by putting each of them in distinct FD range.
On the other hand, Table 10 shows the average of FD values for each of ECG signal type along with the estimated methods that are used.For the PSM we note that the average FD value for Normal Sinus Rhythm is 1.5156.
During the other heart arrhythmias, Atrial Fibrillation, Supraventricular and Heart attack the values are lower, and are equal to 0.1161, 0.2806, and 0.4314, respectively.There is a decrease in the average of FD value lie between 71% and 92%.This decrease in the FD value indicates a decrease in the heterogeneity of the cardiac recording Meanwhile, if we compare the average FD value of Normal heart rhythms with abnormal heart rhythms that obtained by each of the time domain methods (i.e.Katz's, Higuch's and Hurst's method) and the frequency domain method (i.e., PSM) it's clear that the PSM has an advantage of distinguishing between the normal condition and the pathological one more clearly than these methods.So that the PSM it can provides a significant clinical advantage where it can readily be incorporated 'on line' to provide (and to possibly control) the onset of a pathological condition, which is indicated by a drop in the FD value.

CONCLUSIONS AND FUTURE WORK
In this paper a method of identifying Heart disease type based on fractal analysis of biomedical ECG signals is presented to help distinguish between normal and pathological condition.Three methods in time domain and one method in frequency domain are used to estimate the fractal dimension, FD, values for the normal and different pathological conditions which are established different ranges of FD for each specific disease.Such intervals are utilized to distinguish clearly between healthy and non-healthy parsons by putting each of them in distinct FD range.This should facilitate in its application as a supplemental method to support the diagnosis of a pathological or normal heart condition.The Power Spectrum Method (PSM) shows a better distinguish between the ECG signals for healthy and non-healthy persons versus the other methods.The results also suggest that FD is a practical tool for identification abnormality characteristic in the ECG recordings.For future work, it would be an interesting further to analyze another feature of cardiac signal such as the Heart Voice signal, Heart Variability Beat (HRV) signal.

Figure 2 .Figure 4
Figure 2. (A) -(D) ECG signals of Normal Rhythm Figure 3. (A) -(D) ECG signals of an Atrial Vibrillation n as the number of steps in the signal curve less than the number of points N, then a L n .Substituting n in (4), FD according to Katz's approach is expressed as:

Figure 8 andFigure 6 .Figure 7 .
Figure 8 and Figure 9 show example of different plots of the measured power spectrum of normal and abnormal ECG signal, respectively, over different window size.These figures give the evident that the power spectrum of the ECG time series signals obeys the RSF model.The behavior of ECG signals can be characterized through estimating the parameter q in the proposed model where the estimated value of this parameter reflects the degree of self-similarity (fractality) in ECG signals.To do this the least square technique is applied on the measurements of ECG signals as follow:Let, , , ..., (N being a power of 2) be sample points of an ECG signal .By Consider the case in which the digital power spectrum P( ) is give by applying a FFT to this time series.This data can be approximated by: