 Open Access
 Total Downloads : 756
 Authors : Amol R. Madane, Gajanan G. Kale
 Paper ID : IJERTV2IS60021
 Volume & Issue : Volume 02, Issue 06 (June 2013)
 Published (First Online): 01062013
 ISSN (Online) : 22780181
 Publisher Name : IJERT
 License: This work is licensed under a Creative Commons Attribution 4.0 International License
Electrocardiography Compression using Fast Fourier Transform
Amol R. Madane Gajanan G. Kale
Tata Consultancy Services Ltd., Dr. N. P. Hirani Polytechnic, Pune Pusad
In this project Transform based signal compression is proposed. This method is used to exploit the redundancy in the signal. This Paper uses Wavelet Transform to compress the signals. We compare the two existing wavelet methods with the proposed algorithm to determine which of them has better compression ratio (CR) and percent root mean square difference (PRD) [1]. The appropriate use of a block based DCT associated to a uniform scalar dead zone quantiser and arithmetic coding show very good results, confirming that the proposed strategy exhibits competitive performances compared with the most popular compressors used for ECG compression. Each specific transform is applied to a preselected data segment from the CSE database, and then compression is performed [2]. The appropriate use of a block based DCT associated to a uniform scalar dead zone quantiser and arithmetic coding show very good results, confirming that the proposed strategy exhibits competitive performances compared with the most popular compressors used for ECG compression. Each specific transform is applied to a preselected data segment from the MITBIH database and then compression is performed [3]. A wide range of compression techniques based on different transformation techniques like DCT, FFT; DST & DCT2 were evaluated to find an optimal compression strategy for ECG data compression. Wavelet compression techniques were found to be optimal in terms of compression [4].
Electrocardiogram
An electrocardiogram (ECG or EKG, abbreviated from the German Electrocardiogram) is a graphic produced by an electrocardiograph, which records the electrical activity of the heart over time. Analysis of the various waves and normal vectors of depolarization and repolarisation yields important diagnostic information.

It is the gold standard for the diagnosis of cardiac arrhythmias.

It guides therapy and risk stratification for patients with suspected acute myocardial infarction.

It helps detect electrolyte disturbances (e.g. hyperkalemia and hypokalemia).
In this project Transform based signal compression is proposed. This method is used to exploit the redundancy in the signal. This Paper uses Wavelet Transform to compress the signals. We compare the two existing wavelet methods with the proposed algorithm to determine which of them has better compression ratio (CR) and percent root mean square difference (PRD) [1]. The appropriate use of a block based DCT associated to a uniform scalar dead zone quantiser and arithmetic coding show very good results, confirming that the proposed strategy exhibits competitive performances compared with the most popular compressors used for ECG compression. Each specific transform is applied to a preselected data segment from the CSE database, and then compression is performed [2]. The appropriate use of a block based DCT associated to a uniform scalar dead zone quantiser and arithmetic coding show very good results, confirming that the proposed strategy exhibits competitive performances compared with the most popular compressors used for ECG compression. Each specific transform is applied to a preselected data segment from the MITBIH database and then compression is performed [3]. A wide range of compression techniques based on different transformation techniques like DCT, FFT; DST & DCT2 were evaluated to find an optimal compression strategy for ECG data compression. Wavelet compression techniques were found to be optimal in terms of compression [4].
Electrocardiogram
An electrocardiogram (ECG or EKG, abbreviated from the German Electrocardiogram) is a graphic produced by an electrocardiograph, which records the electrical activity of the heart over time. Analysis of the various waves and normal vectors of depolarization and repolarisation yields important diagnostic information.

It is the gold standard for the diagnosis of cardiac arrhythmias.

It guides therapy and risk stratification for patients with suspected acute myocardial infarction.

It helps detect electrolyte disturbances (e.g. hyperkalemia and hypokalemia).
Abstract
This research paper presents an Electrocardiography (ECG) compression based on optimized quantization of Fast Fourier Transform (FFT) coefficients. The ECG to be compressed is partitioned in blocks of fixed size, and each FFT block is quantized using a quantization vector that are specifically defined for each signal. The Percent RootMeanSquare Difference (PRD) was adopted as a measure of the distortion introduced by the compressor. We also present traces of test signals before and after the compression/decompression process. The results show that the proposed method achieves good compression ratios (CR). The objective is realized by constructing and designing an algorithm & software for compression which would enable optimal storage of ECG signals in the database for future references.
Keywords
Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Electrocardiography (ECG), Fast Fourier Transform (FFT).

Introduction
Here the input ECG signal is in .mat file format (MATLAB database text file), which is loaded for compression using load instruction.
Sample ECG Database signals were compressed, measured by the percent rootmean square difference (PRD), and the compression ratios (CR) were computed. We present traces of original and decompressed signals. The method achieves good CR values with excellent reconstruction quality.
The performance of compression of signals is evaluated on the basis of

Compression ratio (CR),

Percentrootmeansquare difference (PRD).
This project implements ECG compressor based on optimized quantization of Fast Fourier transform (FFT) coefficients.


Technical Background

It allows for the detection of conduction abnormalities (e.g. right and left bundle branch block) and many others.
The electrocardiogram does not directly assess the contractility of the heart. However, it can give a rough indication of increased or decreased contractility.

It allows for the detection of conduction abnormalities (e.g. right and left bundle branch block) and many others.
The electrocardiogram does not directly assess the contractility of the heart. However, it can give a rough indication of increased or decreased contractility.
A Fast Fourier Transform (FFT) is an efficient algorithm to compute the discrete Fourier transform (DFT) and its inverse. FFTs are of great importance to a wide variety of applications, from digital signal processing to solving partial differential equations to algorithms for quickly multiplying large integers. This article describes the algorithms, of which there are many; see discrete Fourier transform for properties and applications of the transform.
Let x0, … xN1 be complex numbers. The DFT is defined by the formula
A Fast Fourier Transform (FFT) is an efficient algorithm to compute the discrete Fourier transform (DFT) and its inverse. FFTs are of great importance to a wide variety of applications, from digital signal processing to solving partial differential equations to algorithms for quickly multiplying large integers. This article describes the algorithms, of which there are many; see discrete Fourier transform for properties and applications of the transform.
Let x0, … xN1 be complex numbers. The DFT is defined by the formula
FFT (Fast Fourier Transform)
Evaluating these sums directly would take O (N2) arithmetical operations (see Big O notation). An FFT is an algorithm to compute the same result in only O(N log N) operations. In general, such algorithms depend upon the factorization of N, but (contrary to popular misconception) there are FFTs with O (N log N) complexity for all N, even for prime N.
Many FFT algorithms only depend on the fact that is a primitive root of unity, and thus can be applied to analogous transforms over any finite field, such as numbertheoretic transforms.
4. Waves and intervals
4. Waves and intervals
Fig 2: Schematic representation of normal ECG
3. ECG Signal Recording
The above figure illustrates the process of recording ECG signal.
3. ECG Signal Recording
The above figure illustrates the process of recording ECG signal.
Fig 1: Schematic representation of ECG Signal
A typical ECG tracing of a normal heartbeat (or cardiac cycle) consists of a P wave, a QRS complex and a T wave. A small U wave is normally visible in 50 to 75% of ECGs. The baseline voltage of the electrocardiogram is known as the isoelectric line. Typically the isoelectric line is measured as the portion of the tracing following the T wave and preceeding the next P wave.
P wave
During normal arterial depolarization, the mean electrical vector is directed from the SA node towards the AV node, and spreads from the right atrium to the left atrium. This turns into the P wave on the EKG, which is upright in II, III, and aVF (since the general electrical activity is going toward the positive electrode in those leads), and inverted in aVR (since it is going away from the positive electrode for that lead). A P wave must be upright in leads II and aVF and inverted in lead aVR to designate a cardiac rhythm as Sinus Rhythm.
PR interval
The PR interval is measured from the beginning of the P wave to the beginning of the QRS complex. It is usually 0.12 to 0.20 sec (120 to 200 ms). On an ECG tracing this is defined as 3 to 5 small boxes.
A typical ECG tracing of a normal heartbeat (or cardiac cycle) consists of a P wave, a QRS complex and a T wave. A small U wave is normally visible in 50 to 75% of ECGs. The baseline voltage of the electrocardiogram is known as the isoelectric line. Typically the isoelectric line is measured as the portion of the tracing following the T wave and preceeding the next P wave.
P wave
During normal arterial depolarization, the mean electrical vector is directed from the SA node towards the AV node, and spreads from the right atrium to the left atrium. This turns into the P wave on the EKG, which is upright in II, III, and aVF (since the general electrical activity is going toward the positive electrode in those leads), and inverted in aVR (since it is going away from the positive electrode for that lead). A P wave must be upright in leads II and aVF and inverted in lead aVR to designate a cardiac rhythm as Sinus Rhythm.
PR interval
The PR interval is measured from the beginning of the P wave to the beginning of the QRS complex. It is usually 0.12 to 0.20 sec (120 to 200 ms). On an ECG tracing this is defined as 3 to 5 small boxes.
The duration, amplitude, and morphology of the QRS complex is useful in diagnosing cardiac arrhythmias, conduction abnormalities, ventricular hypertrophy, myocardial infarction, electrolyte derangements, and other disease states.
The duration, amplitude, and morphology of the QRS complex is useful in diagnosing cardiac arrhythmias, conduction abnormalities, ventricular hypertrophy, myocardial infarction, electrolyte derangements, and other disease states.
QRS Complex
Q Wave
Q waves can be normal (physiological) or pathological. Normal Q waves, when present, represent depolarization of the interventricular septum. For this reason, they are referred to as septal Q waves, and can be appreciated in the lateral leads I, aVL, V5 and V6.
ST segment
The ST segment connects the QRS complex and the T wave and has duration of 0.08 to 0.12 sec (80 to 120 ms). It starts at the J point (junction between the QRS complex and ST segment) and ends at the beginning of the T wave. The normal ST segment has a slight upward concavity. Flat, down sloping, or depressed ST segments may indicate coronary ischemia. ST segment elevation may indicate myocardial infarction.
T wave
The T wave represents the depolarization (or recovery) of the ventricles. The interval from the beginning of the QRS complex to the apex of the T wave is referred to as the absolute refractory period. The last half of the T wave is referred to as the relative refractory period (or vulnerable period).
QT interval
The QT interval is measured from the beginning of the QRS complex to the end of the T wave. A normal QT interval is usually about 0.40 seconds. The QT intervals as well as the corrected QT interval are important in the diagnosis of long QT syndrome and short QT syndrome. The QT interval varies based on the heart rate, and various correction factors have been developed to correct the QT interval for the heart rate.
Q Wave
Q waves can be normal (physiological) or pathological. Normal Q waves, when present, represent depolarization of the interventricular septum. For this reason, they are referred to as septal Q waves, and can be appreciated in the lateral leads I, aVL, V5 and V6.
ST segment
The ST segment connects the QRS complex and the T wave and has duration of 0.08 to 0.12 sec (80 to 120 ms). It starts at the J point (junction between the QRS complex and ST segment) and ends at the beginning of the T wave. The normal ST segment has a slight upward concavity. Flat, down sloping, or depressed ST segments may indicate coronary ischemia. ST segment elevation may indicate myocardial infarction.
T wave
The T wave represents the depolarization (or recovery) of the ventricles. The interval from the beginning of the QRS complex to the apex of the T wave is referred to as the absolute refractory period. The last half of the T wave is referred to as the relative refractory period (or vulnerable period).
QT interval
The QT interval is measured from the beginning of the QRS complex to the end of the T wave. A normal QT interval is usually about 0.40 seconds. The QT intervals as well as the corrected QT interval are important in the diagnosis of long QT syndrome and short QT syndrome. The QT interval varies based on the heart rate, and various correction factors have been developed to correct the QT interval for the heart rate.

Initialize the values in the range of 0.10 and –
0.10 of the FFT of the input ECG signal to zero.

Perform step 9 again by using a new counter variable and plot the new FFT values graph

Calculate Compression Ratio and Percentroot meansquare difference (PRD) of the new compressed signal and plot it.

Calculate the errors introduced in the signal (as data is lost in the FFT compression)

Plot the Error in the Signal

5. Results
This will ask the user to enter the desired ECG signal to be compressed.
Fig 3: Graphical User Interface
4. ECG signal compressed using FFT Algorithm
4. ECG signal compressed using FFT Algorithm
Following are the steps that user needs to follow to complete the algorithm,

Take input ECG signal in .mat format to compression

Load the above .mat file for compression

Initialize a variable END that will calculate the length of the signal

Input the actual ECG signal from the file in terms of x and y

Plot the original ECG signal

Take FFT o the input signal and plot it

Initialize a counter that will count the number of points where FFT of the input ECG signal is not equal to zero.
Fig 4: Actual ECG signal compressed using FFT algorithm
Conclusion
The ECG signal compression is required for two main reasons, effective and economic data storage
and online transmission of the signal.ECG signal can be compressed using Fast Fourier Transform Lossy Compression and the PRD and Compression Ratio are calculated.
References

P. K. Charles, and R. Prasad K, A Contemporary Approach for ECG Signal compression using Wavelet Transform, Signal & Image Processing: An International journal (SIPIJ), Vol. 2, NO. 1, March 2011, pp 178189.

P. Sigh, O. P. Yadav, and Y. Yadav, ECG Signal compression Implementation by a New 2Dimensional Transform Technique, International Journal of Engineering and Advanced Technology (IJEAT), Vol1, Issue6, August 2012, pp 167170.

M. Sharma, Dr. A. K. Wadhwani, Efficient Algorithm for ECG Coding, Internal Journal of scientific and Engineering Research, Vol2, Issue 6, June 2011, pp 19.

A. Khare, M. Saxena, V. Nerkar, ECG Data Compression Using DWT, International journal of Engineering and Advanced Technology (IJEAT), Vol1, Issue1, October 2011, pp 1113.