Sunteți pe pagina 1din 5

TECHNIA International Journal oI Computing Science and Communication Technologies, VOL. 2, NO. 1, July 2009.

(ISSN 0974-3375)
320
Abstract-Various methods have been proposed and used for
ECG feature extraction with considerable percentage of correct
detection. Nevertheless, the problem remains open especially
with respect to higher detection accuracy in noisy ECGs. In this
work we have developed an algorithm based on wavelet
transform approach using LabVIEW 8.6. LabVIEW (Laboratory
Virtual Instrument Engineering Workbench) is a graphical
programming language that uses icons instead of lines of text to
create programs. Unlike text based programming language,
LabVIEW uses the data flow programming, where the flow of
data determines execution. The flexibility, modular nature and
ease to use programming possible with labview, makes it less
complex. The proposed algorithm is executed in two stages.
Firstly, it preprocesses (denoises) the signal to remove the noise
from the ECG signal. Then it detects P-wave, T- wave, QRS
complex and their onsets and offsets. LabVIEW and the related
toolkits, advanced signal processing toolkit and math script are
used to build the graphical programme for both the stages. The
algorithm is evaluated with ECG data files, with different ECG
morphologies and noise content taken from CSE multilead data
base which contains 5000 samples per ECG, recorded at a
sampling frequency of 500Hz.
Keywords: ECG, Eeature Extraction, Wavelet TransIorm,
LabVIEW.
I. INTRODUCTION
H Biomedical signals are Iundamental observations Ior
analyzing the body Iunctions and Ior diagnosing a wide
spectrum oI diseases. The analysis oI ECG has been
widely used Ior diagnosing many cardiac diseases. The ECG
is a graphic record oI the duration and magnitude oI the
electrical activity that is generated by depolarization and
repolarization oI the atria and ventricles. One cardiac cycle in
an ECG consists oI the P-QRS-T waves. Most oI the clinically
useIul inIormation in the ECG is Iound in the intervals and
amplitudes deIined by its Ieatures (characteristics wave peaks
and time durations). The development oI accurate and quick
methods Ior automatic ECG Ieature extraction is oI major
Manuscript received
*Channappa.Bhyri is with the Department oI Instrumentation Technology,
P.D.A.College oI Engineering, Gulbarga, Karnataka, India (e-mail:
channubhyri yahoo.com).
Kalpana.V. is with the Department oI Instrumentation Technology,
P.D.A.College oI Engineering, Gulbarga, Karnataka, India (e-mail:
kvanjerkhede yahoo.co.in).
S.T.Hamde is with the Department oI Instrumentation
Engineering,S.G.G.S. Institute oI Engineering and Technology,Nanded,
Maharashtra, India(e-mail:sthamdesggs.ac.in).
L.M.Waghmare is with the Department oI Instrumentation
Engineering,S.G.G.S. Institute oI Engineering and Technology,Nanded,
Maharashtra, India(e-mail:lmwaghmaresggs.ac.in).
importance. The ECG Ieature extraction provides Iundamental
Ieatures (amplitudes and intervals) to be used in subsequent
automatic analysis.
Producing an algorithm Ior the detection oI the P wave, QRS
complex and T wave in an ECG is a diIIicult problem due to
the time varying morphology oI the signal subject to the
physiological conditions and presence oI noise. The
algorithms in the relevant bibliography adapt a range oI
diIIerent approaches to yield a procedure leading to the
denoising and identiIication oI the waves under consideration.
These approaches are mainly based on wavelet |1-10|,
matched Iilters |11-12|, Poisson transIorm |13|, mathematical
morphology |14|, Iuzzy logic |15-19|, LabVIEW|20-
22|.Erom the bibliography|20-21|,it is seen that LabVIEW
can be used eIIectively Ior QRS detection. In the work
presented here an algorithm is proposed with low
computational complexity using LabVIEW Ior Iiltering ECG
signals and detection oI P wave, T wave, QRS wave and their
onsets and oIIsets.
In a virtual instrumentation system, a computer including
calculating, storing, replaying, accessing, displaying and Iile
managing etc. are used which realize perIorming the Iunctions
oI traditional instrumentation via soItware. ThereIore a Virtual
ECG Instrumentation system is a new Instrumentation system,
which is much better and Ilexible with the aid oI computer
intelligent resource.
II. WAVELET TRANSEORM
A wavelet is a mathematical Iunction used to divide a given
Iunction or continuous time signal into diIIerent scale
components. Usually one can assign a Irequency range to each
scale component. Each scale component can then be studied
with a resolution that matches its scale. A wavelet transIorm is
the representation oI a Iunction by wavelets. The wavelets are
scaled and translated copies (known as daughter wavelets) oI
a Iinite length or Iast decaying oscillating waveIorm (known
as mother wavelet). Wavelet transIorms have advantages over
traditional Eourier transIorms Ior representing Iunctions that
have discontinuities and sharp peaks Ior accurately
deconstructing and reconstructing Iinite, non-periodic and/or
non-stationary signals. The mother wavelet is scaled by a
Iactor oI a` and translated (or shiIted) by a Iactor oI b` to
give
a
b t
a
t
b a
1
) (
,
Wavelet transIorms provide an approach to multi resolution
analysis oI a signal and this technique has been used to
Estimation oI ECG Ieatures using LabVIEW
Channappa Bhyri*, Kalpana.V, S.T.Hamde, and L.M.Waghmare
T
Bhyri et al.: Estimation oI ECG Ieatures using LabVIEW
321
identiIy the ECG signal Ieatures such as P wave, QRS
complex and T wave. The wavelet transIorm provides a
description oI the signal in the time scale domain, allowing the
representation oI the temporal Ieatures oI a signal at diIIerent
resolutions thereIore, it is a suitable tool to analyse the ECG
signal, which is characterized by a cyclic occurrence oI
patterns with diIIerent Irequency content. Moreover the noise
and artiIacts aIIecting the ECG signal also appear at diIIerent
Irequency bands, thus having diIIerent contributions at
various scales. A large number oI known wavelet Iamilies and
Iunctions provide a rich space in which to search Ior a
wavelet, which will very eIIiciently represent a signal oI
interest in a large variety oI applications. The choice oI the
wavelet Iunction depends on the application. Selecting a
wavelet Iunction, which closely matches the signal to be
processed, is oI utmost importance in the wavelet applications.
Daubechies wavelet Iamily is similar in shape to QRS
complex and their energy spectrum is concentrated around
low Irequencies. Hence Daubechies WT is more suited Ior
ECG analysis.
III. DESCRIPTION 0E THE ALGORITHM
The algorithm presented in this section is applied directly at
one run over the whole ECG signals which are available as
data Iiles. The algorithm is divided into two parts.
A. Preprocessing oI the ECG signal (Denoising).
B. Eeature extraction oI the ECG signal.
A. Preprocessing of ECG signal
The recorded ECG signal is oIten contaminated by noise and
artiIacts that can be within the Irequency band oI interest and
maniIest with similar characteristics as the ECG signal itselI.
In order to extract useIul inIormation Irom the noisy ECG
signal, we need to processes the raw ECG signal.
Preprocessing ECG signals remove contaminants Irom the
ECG signals.
A.1.Removal of Baseline wandering
Baseline wandering usually comes Irom respiration at
Irequency wandering between 0.15Hz and 0.3Hz and it can be
suppressed by a high pass digital Iilter. Wavelet transIorm can
also be used to remove the baseline wandering by eliminating
the trend oI the ECG signal. The wavelet transIorm based
approach is better because it introduces no latency and less
distortion than the digital Iilter based approach |21|.The
LabVIEW ASPT (Advanced signal processing toolkit)
provides the WA Detrend virtual instrument which removes
the low Irequency trend oI the signal.
N
t
level Trend
2
2
log
2 log
Where t is the sampling duration and N is the number oI
sampling points. The data used here has a sampling duration
oI 10 secs and 5000 sampling points in total, thereIore the
trend level is 0.35 according to the above equation. Trend
level speciIies the number oI levels oI the wavelet
decomposition, which is approximately,
) ( log * ) 1 (
2
N level trend
level ion decomposit of Number
and Ior the data base we are using here it is 8. The WA
detrend virtual instrument has an option to speciIy the wavelet
type used Ior the discrete wavelet analysis. The one selected
here is Daubechies(db06)wavelet because this wavelet is
similar to the real ECG signal and also Daubechies wavelet
being orthogonal wavelet is suitable Ior signal denoising
where as biorthogonal wavelet is suitable Ior signal Ieature
extraction.
A.2. Removal of wideband noise
AIter removing baseline wander the resulting ECG signal is
more stationary and explicit than the original signal. However,
some other types oI noise might still aIIect Ieature extraction
oI the ECG signal. The noise may be complex stochastic
processes within a wideband, so one cannot remove them by
using traditional digital Iilters. To remove the wideband
noises, the Wavelet Denoise Express Virtual instrument is
used here.
The Express Virtual instrument decomposes the ECG signal
into several sub bands by applying the wavelet transIorm and
then modiIies each wavelet coeIIicient by applying a threshold
or shrinking a Iunction and Iinally reconstructs denoised
signal. Erom the threshold setting options available, soIt
thresholding is selected and the thresholding rule selected is
universal` and the Virtual instrument sets the threshold to
sqrt(2xlog(N)).The Virtual instrument oIIers an option to
select either discrete wavelet transIorm or undecimated
wavelet transIorm to denoise the signal. The transIorm type
used is undecimated wavelet TransIorm (UWT) to denoise the
ECG signal. The UWT has a better balance between
smoothness and accuracy than the discrete wavelet transIorm.
The VI diagram and the obtained waveIorms are shown in
Iigure 1(a) and 1(b).
B. Eeature extraction
A Eor the purpose oI diagnosis, we oIten need to extract
various Ieatures Irom the preprocessed (denoised) ECG data,
such as peaks oI P,T,QRS waves and their onsets and oIIsets
oI P,T and QRS waves.
Eigure 1(a): VI diagram to remove baseline wander and noise
TECHNIA International Journal oI Computing Science and Communication Technologies, VOL. 2, NO. 1, July 2009. (ISSN 0974-3375)
322
Eigure 1 (b): Original ECG, Base line wander removed signal and Denoised
signal
B.1. Detection of peaks
A well-chosen wavelet can extract main Ieatures Irom noisy
signals by multiresolution analysis. Multiresolution express
virtual instrument is used in this algorithm to decompose the
ECG signal by 8 level Daubechies(db06) wavelets and then
the signal is reconstructed Irom the approximation coeIIicients
and the detail coeIIicients oI all the Irequency bands. AIter
multiresolution analysis peak/valley detection is done. WA
multiscale peak detection virtual instrument is used in peak
detecting mode to detect P, R, and T points by speciIying
proper width and threshold. Width speciIies the width in
number oI samples. Threshold speciIies the value, which the
virtual instrument uses to reject peaks oI a particular size. The
peak detector uses the Iollowing steps to detect the peaks.
1. PerIorms undecimated discrete wavelet
decomposition with the biorthogonal wavelet on the
input signal.
2. Searches Ior zero crossing points in the detail
coeIIicients at all levels.
3. Selects the zero crossing points at the largest scale
as the coarse estimation oI the real peaks.
4. Searches the Iine scale Ior the corresponding
nearest zero crossing point Ior each detected point.
5. Repeats step Iour until it reaches the Iinest scale,
which is the Iirst level.
In the proposed algorithm one peak detector is used Ior R
wave, another peak detector is used Ior P and T waves. The
VI diagram and waveIorms are shown in Iigure 2(a) and 2(b).
Once the R peaks are detected, with reIerence to this peak the
signal is scanned Ior 50 msec on the leIt side to get the
minimum value and this corresponds to Q peak. Similarly the
minimum value on the right side oI the R peak corresponds to
S peak. This procedure is implemented using mathscript.
Eigure 2(a): VI diagram Ior multiresolution analysis and peak detection
Eigure 2 (b): ECG aIter multiresolution analysis and ECG aIter peak detection
Mathscript is a LabVIEW tool Ior executing textual
mathematical commands (or expressions). Mathscript node is
used to evaluate scripts that are created in the LabVIEW
mathscript window. The LabVIEW math script syntax is
similar to matlab language syntax.
B.2. Detection of onsets and offsets
Once all the peaks are detected, these are taken as the
reIerences and an optimum window width is selected and the
waves are scanned on both the sides oI the peaks to get the
zero crossing points Ior obtaining onsets and oIIsets. II the
signal is not crossing zero line, then the minimum values in
that window are considered as onsets and oIIsets. Mathscript
is used to evaluate onsets and oIIsets. The peak values
detected using LabVIEW are carried to the mathscript node as
inputs and zero crossing points or minimum values(onsets and
oIIsets) are taken as outputs Irom the mathscript node.
IV. RESULTS
The detection perIormance oI the proposed LabVIEW based
algorithm is tested with diIIerent CSE multilead data Iiles. The
results obtained are given in the table 1. The results obtained
Bhyri et al.: Estimation oI ECG Ieatures using LabVIEW
323
TABLE 1. Results oI P, QRS and T waves detection
Lead P-Wave Q-wave
Amp
in mv
R-wave
Amp
in mv
S-wave
Amp
in mv
QRS
Duration
in msec
T-Wave
Amp
in mv
Duration
in msec
Amp
in mv
Duration
in msec
1L1
1L2
1L1mv
1L2mv
1L3mv
1L4mv
0.027
0.050
0.050
0.047
0.045
0.054
0.051
0.047
0.047
0.038
0.001
0.077
0.172
0.055
0.078
0.062
0.062
0.072
0.063
0.059
0.016
0.048
0.006
-
-
0.025
0.050
0.047
0.054
0.052
0.044
0.043
0.027
0.039
0.032
0.056
0.058
0.057
0.060
0.055
0.023
0.009
0.036
0.035
0.047
0.023
0.027
0.006
0.016
0.006
-0.032
-0.044
-0.012
-0.022
-0.003
-0.040
-0.055
-0.052
-0.059
-0.056
72
86
84
96
96
90
92
96
96
76
56
104
174
96
106
100
106
100
100
96
88
74
18
-
-
62
80
86
90
22
94
66
52
44
42
62
70
66
74
76
122
20
188
130
100
86
120
42
32
70
68
74
38
38
12
62
76
78
84
82
-0.115
-0.066
-0.058
-0.095
-0.052
-0.054
-0.103
-0.058
-0.069
-0.065
-0.279
-0.119
-0.195
-0.129
-0.116
-0.122
-0.116
-0.126
-0.122
-0.140
-0.089
-0.073
-0.078
-0.084
-0.082
-0.059
-0.038
-0.052
-0.075
-0.070
-0.096
-0.079
-0.100
-0.070
-0.079
-0.068
-0.065
-0.073
-0.060
-0.069
-0.008
-0.028
-0.029
0.005
-0.007
-0.014
-0.035
-0.028
-0.005
-0.014
0.082
0.069
0.092
0.077
0.082
0.052
0.044
0.054
0.063
0.065
1.103
1.083
1.056
1.103
1.052
1.081
1.109
1.014
1.034
1.067
0.638
0.883
0.819
0.819
0.915
0.873
0.811
0.923
0.833
0.873
0.596
0.589
0.610
0.616
0.596
0.610
0.620
0.605
0.606
0.613
0.589
0.607
0.623
0.594
0.674
0.612
0.600
0.625
0.597
0.603
0.098
0.153
0.156
0.129
0.154
0.116
0.113
0.105
0.110
0.138
-0.604
-0.608
-0.627
-0.596
-0.632
-0.619
-0.620
-0.626
-0.610
-0.604
-0.131
-0.134
-0.145
-0.154
-0.131
-0.136
-0.152
-0.141
-0.166
-0.130
0.017
-0.096
-0.099
-0.086
-0.097
-0.093
-0.099
-0.115
-0.112
-0.092
-0.086
-0.057
-0.070
-0.070
-0.049
-0.063
-0.053
-0.058
-0.068
-0.071
-0.266
-0.259
-0.261
-0.255
-0.255
-0.248
-0.222
-0.232
-0.230
-0.223
-0.222
-0.273
-0.355
-0.288
-0.327
-0.293
-0.285
-0.229
-0.273
-0.270
0.168
0.141
0.140
0.148
0.127
0.131
0.123
0.137
0.142
0.140
160
164
162
182
192
198
182
166
180
166
196
182
190
186
206
220
174
212
212
222
210
212
182
170
194
212
202
162
210
202
108
126
112
118
126
116
126
108
134
140
92
106
94
140
126
108
108
102
102
106
104
102
110
100
120
110
104
136
140
130
0.040
0.021
0.025
0.024
0.024
0.026
0.027
0.036
0.029
-
0.043
0.046
0.081
0.053
0.037
0.044
0.043
0.043
0.043
-
0.168
0.148
0.212
0.193
0.191
0.166
0.174
0.160
0.174
0.165
0.156
0.173
0.201
0.172
0.184
0.169
0.154
0.159
0.143
0.151
0.017
0.030
0.006
0.018
-
0.015
0.025
0.016
0.017
0.009
-0.167
-0.167
-0.214
-0.189
-0.193
-0.175
-0.170
-0.165
-0.163
-0.163
184
128
146
124
136
122
160
66
240
-
94
130
146
128
100
150
134
122
76
-
110
110
178
176
150
124
116
114
120
108
128
120
150
144
144
136
128
126
124
128
160
222
68
58
-
138
170
112
186
-
118
114
178
144
160
130
120
120
122
116
TECHNIA International Journal oI Computing Science and Communication Technologies, VOL. 2, NO. 1, July 2009. (ISSN 0974-3375)
324
by this algorithm using LabVIEW Ior both denoising and
Ieature extractions oI ECG signal are comparable with
other algorithms reported in the literature. By using the WA
Detrend virtual instrument and Wavelet denoising express
virtual instrument, baseline wandering and all the irrelevant
noise has been successIully removed Irom the signal
without any additional Iilters.
V. CONCLUSION
The large variety oI ECG Ieature extraction algorithms, and
the continuous eIIorts Ior their enhancement, proves that
universally acceptable solution has not been Iound yet.
DiIIiculties arise mainly Irom the huge diversity oI the
waveIorm the noise and artiIacts accompanying the ECG
signals. The main advantage oI this graphical programming
language is that, it provides a robust and eIIicient
environment and tool Ior generating very Iast, less complex
and useIul algorithms.
ACKNOWLEDGMENT
The authors would like to acknowledge the Department oI
Instrumentation Engineering, S.G.G.S. Institute oI
Engineering and Technology, Nanded and Department oI
Instrumentation Technology, P.D.A.College oI
Engineering, Gulbarga Ior providing the Iacilities to carry
out this work.
REEERENCES
|1| Juan Pablo Martinez, Rute Almeida, Salvador Olmos,,A Wavelet
Based ECG Delinator: Evaluation on standard data bases, IEEE
Transactions on Biomedical Engineering. 2004, Vol 51, No (4),570-581.
|2| S.Z.Mahamoodabadi, A.Ahmadian, M.D.Abolhasani: 'ECG Eeature
extraction using Daubechies Wavelets, IEEE, 343-348.
|3| Alice de Jesus kozakevicius, Cesar Ramos Rodrigues, Raul ceretta
Nunes, Roberto Guerra Eillo , 'Adaptive ECG Iiltering and QRS detection
using orthogonal Wavelet transIorm.
|4| A.Schuck Jr, J.O.Wisback, 'QRS Detector pre-processing using the
complex wavelet transIorm, Proceedings oI 25th Annual International
ConIerence oI IEEE, 2003, 2590-2593.
|5| S.C.Saxena, V.kumar and S.T.Hamde , 'Eeature Extraction Erom ECG
signals Using Wavelet TransIorm Ior disease diagnosis, International
journal oI system science, 2002 , volume 33, number13, 1073 -1085.
|6| S. Nibhanupadi, R.YoussiI and C.purdy, 'Data spesiIic signal
denoising using wavelets, with applications to ECG data, The 47th IEEE
International Midwest symposium on circuits and systems, 2004, 219-
222.
|7| J. S. Sahambi, S. N. Tandon and R. K. P. Bhatt, A new approach Ior
on-line ECG characteristics, 409-411.
|8| B. Castro, D. Kogan and A. B. Gova, 'ECG Eeature extraction using
optimal mother wavelet, IEEE, 2000, 346-350.
|9| P.de. Chazal, B. G. Celler and R. B. Reilly 'Using wavelet coeIIicient
Ior the classiIication oI the electrocardiogram, Proceedings oI 22nd
Annual EBMS International conIerence, 2000, July 23-28, 64- 67.
|10| S.Z.Mahamoodabadi, A.Ahmadian, M.D.Abolhasani and M Eslami,
'ECG Eeature extraction based on multiresolution wavelet transIorm,
Proceedings oI 27th Annual conIerence oI the IEEE Engineering in
medicine and biology, 2005, 3902-3905.
|11| Eelipe.E.Olvera, 'Electrocardiogram waveIorm Ieature extraction
using the matched Iilter, 2006.
|12| Daniel.T.Kaplam, 'Simultaneous QRS detection and Ieature
extraction using simple matched Iilter basis Iunctions, IEEE, 1991, 503-
506.
|13| Leena Wahab, 'Detection oI QRS complexes in ECG signal based on
poisson transIorm and root moments.
|14| H.Gholam Hosseini and H.Nazeran, 'Detection and extraction oI the
ECG signal parameters, Proceedings oI 20th annual International
conIerence oI the IEEE Engineering in medicine and biology,1998,
Volume 20,Number 1,127-130.
|15| W.Zong and D.Jiang, 'Automated ECG Rhythm analysis using Iuzzy
reasoning, Journal oI Computers in Cardiology, IEEE, 1998, Volume
25,69-72.
|16| J.Laski and N.Hanzel, 'A Euzzy method Ior ECG Ieature extraction,
Proceedings oI Ist joint BMEI / EBMS conIerence,IEEE,1999, 930-934.
|17| E.Chowdhary and Lc Ludeman, 'Discrimination oI cardiac arrythmias
using a Iuzzy rule based method, Journal oI Computers in Cardiology,
IEEE, 1994, 549-552.
|18| M.Kundu,M.Nasipuri and D.K.Basu,A knowledge based approach to
ECG interpretation using Iuzzy logic, IEEE Transactions on systems,
man and cybernetics, 1998, volume 28, Number 2,237-243.
|19| Mrs.B.Anuradha and V.C.Veera reddy, 'Cardiac arythmia
classiIication using Iuzzy classiIiers, Journal oI theoretical and applied
inIormation technology, 2008, 353-357.
|20| Mihaela Lascu and Dan Lascu, 'LabVIEW Electrocardiogram Event
and Beat DectionWSEAS Transactions on computer research,2008, Issue
1, Volume 3,9-18.
|21| National Instruments Developer zone, 'LabVIEW Ior ECG signal
processing, 2008.
|22| Shuran quin,Zhong Ji, Hongjun Zhu, 'The ECG recording and
analysis instrumentation based on virtual instrument technology and
continuous wavalet transIorm, Proceedings oI 25th Annual International
ConIerence oI the IEEE EBMS, 3176-3179.

S-ar putea să vă placă și