ECG Signal Compression Using the High Frequency Components of Wavelet Transform

Electrocardiography (ECG) is the method of recording electrical activity of the heart by using electrodes. In ambulatory and continuous monitoring of ECG, the data that need to be handled is huge. Hence we require an efficient compression technique. The data also must retain the clinically important features after compression. For most of the signals, the low frequency component is considered as most important part of the signal. In wavelet analysis, the approximation coefficients are the low frequency components of the signal. The detail coefficients are the high frequency components of the signal. Most of the time the detail coefficients (high frequency components) are not considered. In this paper, we propose to use detail coefficients of Wavelet transform for ECG signal compression. The Compression Ratio (CR) of both the approximation and detail coefficients are compared. Threshold based technique is adopted. The Threshold value helps to remove the coefficients below the set threshold value of coefficients. Experiment is carried out using different types of Wavelet transforms. MIT BIH ECG data base is used for experimentation. MATLAB tool is used for simulation purpose. The novelty of the method is that the CR achieved by detail coefficients is better. CR of about 88% is achieved using Sym3 Wavelet. The performance measure of the reconstructed signal is carried out by PRD. Keywords—ECG; PRD; transform


INTRODUCTION
ECG is used as an important signal which gives information about health of the heart.It also helps physicians to diagnose cardiac arrhythmias and different heart diseases.The heart rate can also be determined by calculating time between successive QRS complexes.
The different methods of electrocardiography [1,2] are standard clinical ECG, Vector cardiogram and ECG signals are recorded continuously to monitor the abnormality.
Electrocardiogram signal is an important source of information for doctors in diagnosis purpose.It helps the doctors to diagnose heart abnormalities.Most of the time, due to continuous monitoring of ECG signals in 24 hour monitoring system and in ambulatory system, the data storage requirement increases.This in turn increases the storage cost.Instead of transmitting the stored data directly, ECG signal is compressed before transmission through common communication channels like phone line or mobile channel.The compression of ECG signal reduces the storage and transmission cost.The important factor to be considered in compression of ECG signal is to obtain maximum data reduction.At the same time, the clinically important features of ECG signal must be preserved after reconstruction.
The ECG signal is shown in fig. 1.It consists of P, Q, R, S, T and U waves.The first positive wave is the P wave.The QRS complex consists of Q, R and S waves.The wave is produced by ventricular activation.The T wave is produced by ventricular repolarization and it is a smooth dome shaped .The U wave follows the T wave and precedes the P wave of the next cycle.This paper is structured as follows: section 2 describes the lossy and lossless compression techniques; Section 3 describes the performance measure to validate the technique used in this research; Section 4 covers the methodology.Results and discussion are covered in section 5 and 6 respectively.Conclusion and references are the concluding sections.

II. LOSSY AND LOSSLESS COMPRESSION
The main focus of the research is on compression.The basic types of compression are Lossy and Lossless.The lossy compression accepts slight loss of data [3].Lossless data compression allows the original data to be perfectly reconstructed from the compressed data.Lossy compression allows reconstruction only of an approximation of the original data.The lossy compression also improves compression ratio which in turn decreases the storage space and also the transmission cost.In lossy compression method, better compression is achieved by losing some information.When the decompression takes place, the resulting output data does not match with the original input data.If the loss of data is small, it is difficult to tell the difference [4].When we consider text files, especially files containing computer programs, even if a single bit gets modified, it becomes worthless.In such cases, we require only lossless compression techniques.Higher compression ratio is achieved in Lossy compression method.Most of the compression techniques used for ECG is lossy.www.ijacsa.thesai.org In an ambulatory and continuous monitoring of data, huge data need to be handled.This leads to huge amount of data for storage and transmission.Hence the ECG data needs a proper compression technique, for data reduction [5][6][7][8][9][10][11][12][13]20].Various compression methods used are: 1) Direct Method: In the Direct method, time domain signal samples are analyzed.The examples of direct methods are TP (Turning Point), AZTEC (Amplitude Zone Time Epoch Coding), ASEC (Analysis by Synthesis ECG Compressor), CORTES (Coordinate Reduction Time Encoding System), FAN etc. [5]. 2

) Transformational Method:
The technique uses transformation of the signal from one domain to another domain.The examples of transformation method are Discrete Cosine Transform, Fourier Transform, Wavelet Transform, Walsh Hadamard Transform, Fast Fourier Transform [17], Fractional Fourier transform [18,19] etc.
3) Parameter Extraction Methods: The method uses a set of parameters from the original signal and are used in the reconstruction process.
The advantage of direct method is its simplicity.In the transform, small transform coefficients become insignificant and can be removed.This way, a better compression ratio is achieved in transform technique.The Wavelet Transform technique is considered in this research and a brief description of the same is given below.

A. The Wavelet Transform
The wavelet transform is suitable for ECG signal compression because of its non-stationary nature.The wavelet transform is also capable of capturing both frequency and location in time information.The different types of Wavelet transforms are continuous wavelet transform (CWT), a wavelet series expansion, and a DWT [6,14].
A DWT is the one for which the wavelets are discretely sampled.An important advantage of Wavelet Transform over Fourier transform is that it captures both frequency and location in time information.
The signal x is passed through a series of filters to obtain DWT of the signal.As a first step, the samples are passed through a low pass filter with impulse response g.This procedure leads to convolution of the input signal with the impulse response.

[ ] ( )[ ] ∑ [ ] [ ]
---------------------(1) Signal is then simultaneously passed through high pass filter with impulse response h.The outputs from high pass filter are called the detail coefficients.The outputs from the low pass filter are called the approximation coefficients.The filter outputs are then subsampled by 2. The block diagram of filter analysis is shown in fig. 2. The wavelet transform achieves higher frequency resolution by cascading.The cascading structure is shown in fig. 3.In this structure, the decomposition procedure is repeated.In this methodology, approximation coefficients are decomposed with high pass and low pass filters.After the filtering process, the down sampling is also repeated.Two level filter decomposition is shown in fig. 3. From level 2, the further expansion takes place to higher levels.At each level the signal is decomposed into low and high frequencies.
The discrete wavelet transform is defined as:

III. PERFORMANCE MEASURE
The standard performance measure technique is used in this research to ascertain the usefulness of the compression method adopted.The standard methods are Percent Root mean square Difference (PRD), Compression Ratio [CR] [16] and Peak Signal to Noise Ratio(PSNR).
The PRD is defined as the distortion between the original and the reconstructed signal.

√[ ∑ [ ( ) ( )] ∑ [ ( )]
] ( ) Here, x 0 indicates the original data, x r indicates the reconstructed data, and N represents the number of samples.The CR is defined as the ratio of number of bits in the original signal to the number of bits in the compressed signal.

IV. METHODOLOGY
Different types of noise and interferences corrupt the ECG signal during recording [15].As the ECG signal is susceptible to noise and interference, the signal is passed through various stages to remove the noise and interference.In the preprocessing stage, a High Pass filter is used to remove the base line wander noise and Band Pass filter is used to remove the power line interference.A threshold value is chosen in this method.The Threshold value helps to remove the coefficients below the set threshold value of coefficients.Decomposition of wavelet transform is restricted to the first level.The detail coefficients are used and the less important coefficients will be made zero.Compression ratio of the signal is increased with this threshold based method.

V. RESULTS AND
The ECG signal used for the testing purpose is taken from MITBIH data base [21].The MATLAB tool is used for simulation.We have used a sampling frequency of 330 Hz.The results are tabulated for different Wavelets.Table 1 shows results for the Haar Wavelet.Table 2 shows the results for the Db2.Table 3 shows the result Sym3 Wavelet.
The different levels of threshold levels are used for testing purpose.The threshold is taken with reference to the R peak.The level 1 (0.05% of R peak is considered as the lowest level and level 3 (1% of R peak) is considered as the highest level.Level selection is as follows: 3-Highest level Level 1=0.05% of R peak.

VI. DISCUSSION
The main focus of our research to use the detail coefficients of wavelet transform for ECG signal compression.Various wavelet transforms like Haar, db2 and Sym3 are considered for experimentation.The performance evaluation is carried out to test the effectiveness of the compression technique.As shown in Table 3, the Sym3 wavelet shows better CR among all the three wavelets used.The PRD value indicates reconstruction quality of the signal after compression.The PRD value obtained in the experimentation are within the limits.The threshold levels have significant impact on the CR value.Results obtained for the threshold level 1 shows minimum value of CR.As the threshold value increases, the CR also increases.

VII. CONCLUSION AND FUTURE SCOPE
The methodology used in our research to investigate the usefulness of detail coefficients has given better results.The results also show that the compression of ECG signal is possible using detail coefficients.Detail coefficients show significant improvement in the CR value compared to the approximation coefficients.The Sym3 wavelet has done well among the different wavelets compared here.Proper selection of threshold level plays an important role in the reconstructed signal.As the level of threshold increases, the PRD also increases.Due to this, distortion may occur in the reconstructed signal.
The results with the change in threshold level are also highlighted in the result table.It is possible to achieve better compression ratio & PRD by adjusting threshold value.
Further improvement in compression ratio may be possible by using efficient encoding techniques.

TABLE III .
CR & PRD COMPUTATION FOR SYM3 WAVELET