0% found this document useful (0 votes)
8 views8 pages

ECG_compression_and_labview_implementation

The document discusses ECG compression techniques and their implementation using LabVIEW, focusing on the importance of efficient data handling for cardiac signal analysis. It compares various compression methods such as DCT, AZTEC, and Turning Point, concluding that DCT offers the best compression ratio of about 100:1 while preserving signal integrity. The paper also highlights the significance of accurate ECG analysis for timely medical interventions in heart-related conditions.

Uploaded by

Rafael Tapia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views8 pages

ECG_compression_and_labview_implementation

The document discusses ECG compression techniques and their implementation using LabVIEW, focusing on the importance of efficient data handling for cardiac signal analysis. It compares various compression methods such as DCT, AZTEC, and Turning Point, concluding that DCT offers the best compression ratio of about 100:1 while preserving signal integrity. The paper also highlights the significance of accurate ECG analysis for timely medical interventions in heart-related conditions.

Uploaded by

Rafael Tapia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/247919133

ECG compression and labview implementation

Article in Journal of Biomedical Science and Engineering · January 2009


DOI: 10.4236/jbise.2009.23030

CITATIONS READS

22 17,583

1 author:

Tatiparti Padma
Gokaraju Rangaraju Institute of Engineering & Technology
3 PUBLICATIONS 30 CITATIONS

SEE PROFILE

All content following this page was uploaded by Tatiparti Padma on 05 April 2014.

The user has requested enhancement of the downloaded file.


J. Biomedical Science and Engineering, 2009, 2, 177-183 JBiSE

ECG compression and labview implementation


Tatiparti Padma1, M. Madhavi Latha2, Abrar Ahmed3
1
GRIET, JNTU, Hyderabad, India, Member IETE; 2JNTU, Hyderabad, India, Member IEEE; 3GRIET, Hyderabad, India.
Email: [email protected]

Received 11 February 2009; revised 19 March 2009; accepted 25 March 2009.

ABSTRACT can be measured at selectively placed electrodes (elec-


trical contacts) on the skin. Electrodes on different sides
It is often very difficult for the patient to tell the of the heart measure the activity of different parts of the
difference between angina symptoms and heart heart muscle. An ECG displays the voltage between
attack symptoms, so it is very important to pairs of these electrodes, and the muscle activity that
recognize the signs of heart attack and immedi- they measure, from different directions, also understood
ately seek medical attention. A practical case of as vectors. After acquiring the signal, different signal
this type of remote consultation is examined in analysis techniques using MATLAB software where
this paper. To deal with the huge amount of various abnormalities can be traced out in ECG of a par-
electrocardiogram (ECG) data for analysis, ticular patient. The signal is then transmitted using wire-
storage and transmission; an efficient ECG less technology using Blue-Tooth as a transmitting tech-
compression technique is needed to reduce the nique. The device operates at a range of 100-150m, a
amount of data as much as possible while pre- distance that is ideal for use in a hospital.
serving the clinical significant signal for cardiac Digital analysis of electrocardiogram (ECG) signal
diagnosis. Here the ECG signal is analyzed for imposes a practical requirement that digitized data be
various parameters such as heart rate, selectively compressed to minimize analysis efforts and
QRS-width, etc. Then the various parameters data storage space. Therefore, it is desirable to carry out
and the compressed signal can be transmitted data reduction or data compression. Data reduction is
with less channel capacity. Comparison of achieved by discarding digitized samples that are not
various ECG compression techniques like important for subsequent pattern analysis and rhythm
TURNING POINT, AZTEC, CORTES, FFT and interpretation. Examples of such data reduction algo-
DCT it was found that DCT is the best suitable rithms are: AZTEC, turning point (TP). AZTEC retains
compression technique with compression ratio only the samples for which there is sufficient amplitude
of about 100:1. In addition, different techniques change. TP retains points where the signal curves (such
are available for implementation of hardware as at the QRS peak) and discards every alternate sample.
components for signal pickup the virtual im- The data reduction algorithms are empirically designed
plementation with labview is also used for to achieve good reduction without causing significant
analysis of various cardiac parameters and to distortion error.
identify the abnormalities like Tachycardia, Another class of algorithms compresses the data under
Bradycardia, AV Block, etc. Both hardware and mathematically rigorous rules, so that digitized samples
virtual implementation are also detailed in this are compressed and recovered under some reversible
context. mathematical criteria operating under predefined error
limits. This approach has the benefit that the original
Keywords: ECG Compression; Labview; Imple- signal can be recovered by with a minimum loss of in-
mentation formation.
Einthoven named the waves he observed on the ECG
1. INTRODUCTION using five capital letters from the alphabet: P, Q, R, S,
and T. The width of a wave on the horizontal axis repre-
An electrocardiogram (ECG or EKG) is a recording of sents a measure of time. The height and depth of a wave
the electrical activity of the heart over time produced by represent a measure of voltage. An upward deflection of
an electrocardiograph. Electrical impulses in the heart a wave is called positive deflection and a downward
originate in the sinoatrial node and travel through the deflection is called negative deflection. A typical repre-
heart muscle where they impart electrical initiation of sentation of the ECG waves is presented in the following
systole or contraction of the heart. The electrical waves Figure 1.

Published Online June 2009 in SciRes. http://www.scirp.org/journal/jbise


178 T. Padma et al. / J. Biomedical Science and Engineering 2 (2009) 177-183

Figure 1. A typical representation of the ECG waves.

2. SYSTEM DESCRIPTION inter- and intra-patient variability of both normal and


abnormal ECG features. In this paper, the attempt is
Continuous monitoring of the electrocardiogram in both made to replace the bedside monitors in the intensive
inpatients and ambulatory subjects has become a very care units so as to reduce the workload of the staff and
common procedure during the past thirty years, with increase the efficiency in interpreting the abnormalities.
diverse applications ranging from screening for cardiac The basic block diagram of the module is as shown in
arrhythmias or transient ischemia, to evaluation of the the Figure 2.
efficacy of anti arrhythmic drug therapy, to surgical and The standard lead system used in intensive care units
critical care monitoring. The need for automated data is lead II system; the acquired signal is taken and is fed
reduction and analysis of the ECG has been apparent, to an instrumentation amplifier that amplifies the signal.
motivated by the very large amount of data that must be The amplifier is used to set the gain and it also amplifies
analyzed (on the order of 105 cardiac cycles per patient very low amplitude ECG signal into perceptible view.
per day). As clinical experience has led to the identifica- The acquisition of pure ECG signal is of higher im-
tion of more and more prognostic indicators in the ECG, portance. As we know that the ECG signal will be in
clinicians have demanded and received increasingly so- the range of milli-volts range, which is difficult to
phisticated automated ECG analyzers. analyze. So the prior requirement is to amplify the
Visual analysis of the ECG is far from simple. Accu- acquired signal. The acquisition and amplification of
rate diagnosis of ECG abnormalities requires attention ECG signal is showed in Figure 3 using an instru-
to subtle features of the signals, features that may ap- mentation amplifier AD620.
pear only rarely, and which are often obscured or mim- The output gain can be programmed by varying the
icked by noise. Diagnostic criteria are complicated by value of RG.The amplified output is shown in Figure 4.

MATLAB / SIMULINK

ECG Instrumentation
Signal amplifier A/D Micro-
From Converter Controller Filters Compression Transmission
patient through RF

Analysis
Reconstruction Decompression Receiver
of the signal of the signal

Figure 2. Basic block diagram of the ECG module.

SciRes Copyright © 2009 JBiSE


T. Padma et al. / J. Biomedical Science and Engineering 2 (2009) 177-183 179

+5V
PATIENT/CIRCUIT
PROTECTION/ISOLATION

7
3
8
0.03Hz
RG AD620A HIGH-
6
PASS
8.25kΩ G=7 FILTER
1 5
2
4

-5V

Figure 3. ECG acquisition with instrumentation amplifier AD620.

As the ECG signal is going to be transmitted through


wires to the module, it is obviously corrupted by various
noises such as power line interference, muscle tremors
etc. Hence various filtering techniques are applied to
remove the noise and to send the error/noise free signal
for further processing. Here adaptive noise filtering is
used for removal of 50 Hz that is the power line inter-
ference because, the ECG signal also contains 50 Hz
signal and if normal band reject filter is used, then the 50
Hz signal which is very important in the ECG signal will
be lost. Therefore by opting adaptive noise filtering, the
power line frequency can be eliminated at the same time
retaining the 50 Hz signal in the original waveform.
Figure 4. ECG signal output before ADC. After the filtering process, the signal is set for the
transmission, but it is important to compress it so as to
The amplified output is then fed to the analog to digi- transmit at a faster rate. In this paper compared various
tal converter for digitalizing the ECG data using ADC basic compression techniques like Turning point, AZTEC,
and microcontroller. In this process, micro-controller is CORTES and found that CORTES is the better option for
used so as to set the clocks for picking up the summation the compression of ECG signal as it compresses the signal
of the signals that are generated form the heart. The heart at a rate of around 100:1. Before transmitting the com-
generates different signals at various nodes that is shown pressed data, the ECG signal is analyzed.
in Figure 1. The summation of the signals that are gen- 3. ECG ANALYSIS
erated by the heart is taken and then it is sent for filtering
processes. The processing and the analysis of the ECG has gained
The digital output of the ECG is displayed in LCD as clinical significance. The various cardiac parameters are
shown in Figure 5. heart rate, R-R interval, QRS duration; etc can be ob-
tained at any instance of time or continuously depending
upon the requirement. The better analysis of the ECG
can help doctors to give the appropriate care to the pa-
tients and also helps to avoid various severe situations
that may arise. Here the ECG signal is analyzed and the
result has been displayed as shown in Figure 6.
After analysis of ECG signal, it can be compressed
using various techniques and hence transmit the com-
pressed data to the main system. The various compres-
sion techniques have been explained below.
4. COMPRESSION TECHNIQUES
The various compression techniques like AZTEC, TP,
CORTES, DFT, FFT algorithms are compared with PRD
Figure 5. Digital output of the ECG is displayed in LCD. and Compression ratio and best suitable was considered.

SciRes Copyright © 2009 JBiSE


180 T. Padma et al. / J. Biomedical Science and Engineering 2 (2009) 177-183

already compressed data to increase the compression


ratio to 4:1. As shown in Figure 7.
4.2. AZTEC ALGORITHM
Another commonly used technique is known as AZTEC
(Amplitude Zone Time Epoch Coding). This converts
the ECG waveform into plateaus (flat line segments) and
sloping lines. As there may be two consecutive plateaus
at different heights, the reconstructed waveform shows
discontinuities. Even though the AZTEC provides a high
data reduction ratio, the fidelity of the reconstructed
signal is not acceptable to the cardiologist because of the
discontinuity (step-like quantization) that occurs in the
Figure 6. ECG analysis output. reconstructed ECG waveform. As shown in Figure 8.
AZTEC Algorithm is implemented in 2 phases:
4.1. Turning Point Algorithm
4.2.1. Horizontal Mode
1) Acquire the ECG signal 1) Acquire the ECG signal
2) Take the first three samples and check for the con- 2) Assign the first sample to Xmax and Xmin which
dition as mentioned below: represents highest and lowest elevations of the current
(x1-x0)*(x2-x1)<0 line.
(or) 3) Check for the following condition and store the
(x1-x0)*(x2-x1)>0 plateau if
a) If X1>Xmax then Xmax =X1 and
3) If the above condition-1 is correct then x1 is stored b) If X1<Xmin then Xmin =X1 and so on till Xn samples,
else x2 is stored. repeat this until the following 2 conditions are
4) Reconstructing the compressed signal. satisfied
The compression ratio of Turning point algorithm is ① the difference between VMAX and VMIN is
2:1, if higher compression is required then the same al- greater than a predetermined threshold or
gorithm can be implemented on the already compressed ② if line length is > 50 are satisfied
signal so that it is further compressed to a ratio of 4:1. 4) The stored values are the length L=S-1, where S is
But after the 2nd compression, the required data in the no. of samples and L is length and the average amplitude
signal may be lost since the signal is overlapped on one of the plateau (VMAX+VMIN)/2.
another. Therefore, TP algorithm is limited to compres- 5) Algorithm starts assigning the next samples to Xmax
sion ratio of 2:1. TP algorithm can be applied on the and Xmin.
4.2.2. Slope Mode
1) If no. of samples <=3, then the line parameters are
not saved. Instead the algorithm begins to produce
slopes.

Figure 7. Turning point compression analysis. Figure 8. AZTEC compression analysis.

SciRes Copyright © 2009 JBiSE


T. Padma et al. / J. Biomedical Science and Engineering 2 (2009) 177-183 181

2) The direction of the slope is determined by check-


ing the following conditions.
a) If (X2 - X1) * (X1 - X0) is +ve then the slope is +ve.
b) If (X2 - X1) * (X1 - X0) is -ve then the slope is -ve.
3) The slope is terminated if the no. of samples is >=3
and if direction of slope is changed.

mv
4.3. CORTES Algorithm
An enhanced method known as CORTES (Coordinate
Reduction Time Encoding System) applies TP to some
portions of the waveform and AZTEC to other portions
and does not suffer from discontinuities. AZTEC line sec
length threshold Lth, CORTES saves the AZTEC line
otherwise it saves the TP data. As shown in Figure 9. Figure 10. DCT compression analysis.
1) Acquire the ECG signal
2) Define the Vth and Lth.
3) Find the current Maximum and minimum.
4) If the Sample greater than threshold than compare
the length with Lth
5) If (len>lth)
AZTEC Else
mv
TP
6) Plot the compressed signal
4.4. DCT Compression
1) Separate the ECG components into three compo-
nents x, y, z.
sec
2) Find the frequency and time between two samples.
3) Find the dct of ecg signal check for dct coefficients Figure 11. FFT compression analysis.
(before compression)=0, increment the counter A if it is
between +0.22 to -0.22 and assign to Index=0. 2) Find the frequency and time between two samples.
4) Check for DCT coefficients(after compression)=0, 3) Find the FFT of ECG signal check for fft coeffi-
increment the Counter B.
cients (before compression) =0, increment the counter A
5) Calculate inverse dct and plot decompression, error.
if it is between +25 to-25 and assign to Index=0.
6) Calculate the compression ratio, PRD.
As shown in Figure 10. 4) Check for FFT coefficients (after compression) =0,
increment the Counter B.
4.5. FFT Compression 5) Calculate inverse FFT and plot decompression, error.
1) Separate the ECG components into three components 6) Calculate the compression ratio, PRD.
x, y, z. As shown in Figure 11.
4.6. Summary
9

Summary of ECG data compression schemes.


8 The comparison table shown in Table 1 above, details
the resultant compression techniques. This gives the
mv

7
choice to select the best suitable compression method.
sec Hence in this project the DCT found to be compressed
6
0 100 200 300 400 500 600 700 800 900 1000 90.43 with PRD as 0.93.
9 Table 1. Comparison of compression techniques.

8 METHOD COMPRESSION RATIO PRD


mv

CORTES 4.8 3.75


7
TURNING POINT 5 3.20
sec AZTEC 10.37 2.42
6
0 100 200 300 400 500 600 700 800 900 1000
FFT 89.57 1.16

Figure 9. CORTES compression analysis. DCT 90.43 0.93

SciRes Copyright © 2009 JBiSE


182 T. Padma et al. / J. Biomedical Science and Engineering 2 (2009) 177-183

5. HARDWARE IMPLEMENTATION reject filter is used, then the 50 Hz signal which is very
important in the ECG signal will be lost. Therefore by
The hardware implementation part is rather large and opting adaptive noise filtering, the power line frequency
complex and the present trend in the BIOMEDICAL can be eliminated at the same time retaining the 50 Hz
field is moving towards the miniaturization, thereby an signal in the original waveform.
efficient design flow is necessary, which was imple-
mented using LABVIEW as shown in Figure 12. 6. RESULTS
The ECG signal is acquired with the help of elec-
trodes that are connected to the patient and the signal is Extracting the portion of the signal and finding the R
fed for further processing like instrumentation amplifier, peaks in the signal by a first difference method. Once
the R peaks are identified the heart rate is calculated
Analog to Digital converter, micro controller, and filters.
After acquiring the signal, different signal analysis tech- the by knowing the period between successive R-
peaks.
niques using LABVIEW software where various abnor-
malities are to be checked for and finally display the x(n  1)  x(n)
Y(n)  ; where T is sampling period.
problem in ECG of a particular patient. T
The standard lead system used in intensive care units Heart rate Calculation:
is lead II system. (ECG data was acquired from a data
file MIT-BIH (.m file)). 60
HR   ______ BPM.
The signal is taken and fed to an instrumentation am- Y(n)
plifier that amplifies the signal. The amplifier is used to
set the gain and it also amplifies very low amplitude 7. CONCLUSIONS
ECG signal into perceptible view. Then the signal goes
for analog to digital conversion for the sake of easier The feeling of being in virtual contact with the health
transmission. The amplified signals are then sent for care professionals provides a sense of safety to the sub-
filtering processes. jects, without the hassles of permanent monitoring.
The adaptive noise filtering is used for removal of 50 Offers a valuable tool for easy measurement of ECG.
Hz that is the power line interference because, the ECG Offers first hand help when ever patient requires im-
signal also contains 50 Hz signal and if normal band mediate medical attention.

Figure 12. QRS detection & heart rate calculation module.

SciRes Copyright © 2009 JBiSE


T. Padma et al. / J. Biomedical Science and Engineering 2 (2009) 177-183 183

REFERENCES
[1] S. Jalaleddine, C. Hutchens, R. Stratan, and W. A. Co-
berly, (1990) ECG data compression techniques-a unified
approach, IEEE Trans. Biomed. Eng., 37, 329-343.
[2] J. R. Cox, F. M. Nolle, H. A. Fozzard, and G. C. Oliver,
(1968) AZTEC, a preprocessing program for real time
ECG rhythm analysis, IEEE Trans. Biomed. Eng.,
BME-15, 129-129.
[3] B. R. S. Reddy and I. S. N. Murthy, (1986) ECG data
compression using fourier descriptors, IEEE Trans. Bio-
med. Eng., BME-33, 428-433.
[4] D. C. Reddy, (2007) Biomedical signal process-
ing-principles and techniques, 254-300, Tata
Figure 13. Heart rate display. McGraw-Hill, Third reprint.
[5] J. L. Simmlow, Biosignal and biomedical image proc-
essing- MATLAB based applications, 4-29.
The results achieved were quite satisfactory the DCT [6] A. S. Al-Fahoum, (2006) Quality assessment of ECG
found to be compressed 90.43 with PRD as 0.93. The compression techniques using a wavelet-based diagnostic
signal analysis techniques using LABVIEW software measure, IEEE Trans. in Biomedicine, 10, 182-191.
where various abnormalities are to be checked for and [7] V. Kumar, S. C. Saxena, and V. K. Giri, (2006) Direct
data compression of ECG signal for telemedicine, ICSS ,
finally display the problem in ECG of a particular pa- 10, 45-63.
tient was also given a positive indication, with this as the [8] A. Perkusich, G. S. Deep, M. L. B. Perkusich, and M. L.
goal set the further implementation in matlab simulink Varani, (1989) An expert ECG acquisition and analysis
work is also under the implementation stage. system, IMTC- 89, 184-189.

SciRes Copyright © 2009 JBiSE

View publication stats

You might also like