Sie sind auf Seite 1von 8

Medical Engineering and Physics 21 (1999) 167174

www.elsevier.com/locate/medengphy

Biorthogonal wavelet transforms for ECG parameters estimation


N. Sivannarayana a, D.C. Reddy
b

b,*

a
Research Centre Imarat, Vigyanakancha, Hyderabad, India 500 069
Director, R and T Unit for Navigational Electronics Osmania University, Hyderabad, India 500 007

Received 2 December 1998; received in revised form 23 March 1999; accepted 16 April 1999

Abstract
The parameters of various morphologies of ECG waveform are basic in characterizing them as normal or otherwise. The use of
multiscale analysis, through biorthogonal wavelets presented in this paper, appears very promising for such a characterization. This
is on account of the fact that various morphologies are excited better at different scales. From these different scales, amplitudes,
durations and various segments, widths can be determined more accurately. Simulation studies, with real ECG data, have shown
that even when the signal-to-noise ratios are poor, the proposed technique can be used to accurately estimate the said parameters.
1999 IPEM. Published by Elsevier Science Ltd. All rights reserved.
Keywords: ECG parameters; Multiscale; Wavelet transforms; Bio-medical signal processing

1. Introduction
The formulation and properties of an electrical
impulse through the heart muscle result in time-varying
potentials on the surface of the human body, which are
known as the ECG signals [8]. The signal represents
various activities of the heart. A typical ECG signal is
indicated in Fig. 1. As seen from it, the dominant morphologies are the P, QRS and T waves. Occasionally a
U-wave will be present immediately after the T-wave,
the genesis of which is uncertain. The P-wave represents
atrial activation, the QRS complex represents ventricular

activation or depolarization. An initial downward


deflection after the P-wave is termed as, Q, the dominant upward deflection is the R and the terminal part
is denoted as S. The T-wave represents ventricular
recovery or repolarization. The ST segment, the T-wave
and the U-wave together represent the total duration of
ventricular recovery. The ST segment represents the
greater part of ventricular repolarization. The ST segment usually merges smoothly and imperceptibly with
the T-wave.
There are different leads used for diagnosis, typically
3 or 12, as given in [8]. These leads provide electrical

Fig. 1. ECG waveform, x-axis is sampled at 250 Hz and y-axis represents normalized amplitude.
* Corresponding author. Tel.: +40-701-8048; fax: +40-701-9020.
E-mail address: idcoucea@hd1.vsnl.net.in (D.C. Reddy)
1350-4533/99/$ - see front matter. 1999 IPEM. Published by Elsevier Science Ltd. All rights reserved.
PII: S 1 3 5 0 - 4 5 3 3 ( 9 9 ) 0 0 0 4 0 - 5

168

N. Sivannarayana, D.C. Reddy / Medical Engineering and Physics 21 (1999) 167174

signals for analysis/recording. The weakest morphology is the P-wave and it is best seen in standard
lead II. Hence, lead II will be considered for parameters
extraction on a single lead data. Typical durations
respectively of a P-wave are 0.05 to 0.08 sec, QRS 0.04
to 0.1 sec [8] and a T-wave 0.12 to 0.24 sec. Variations
in amplitudes and or in durations of these waves from
the accepted standard are indications of abnormalities of
the heart. Since the frequency behaviour of these three
constituents of the ECG waveforms is different, frequency domain features have been proposed as an
adjunct or even an alternative to the time domain analysis. However, because of the lack of spectral feature
variability associated with pathological states of the cardiac system, it has rendered the approach of not much
significance. Also, the loss of clinically important features such as the duration, amplitude and relative positions of the three different waves, and transformation of
the waveform into the frequency domain, makes it less
attractive for acceptance by doctors.
Another shortcoming of the frequency domain processing of the ECG waveform is that it is a non-stationary signal, even when observed in a perfectly healthy
normal subject [7, pp. 3551]. These non-stationarities
are severe in case of abnormal subjects due to the association of transient phenomena. Mutually exclusive time
and frequency domain representations of these waveforms fail to reveal the non-stationarity behaviour accurately. Hence, the need for representation of ECG signals
in two dimensions with time and frequency as co-ordinates. Reference [7, pp. 3151] has suggested the use
of WignerVille time-frequency Distribution (WVD) for
detection and classification of ECG signals. However,
the main difficulty with this technique is the demand
for high computational power. A less computationally
intensive method for transient analysis of the ECG signals is presented in [3]. Here wavelet transforms with 4octave bandwidth characteristic scales are suggested and
local extrema used to determine the various morphologies. However, the accuracies obtainable based on
extrema are limited.
As an alternative, we propose the use of launch points
and extrema to obtain amplitude and duration parameters. This has its origin in conventional processing of
signals where signals are passed through different filters
to limit the effect of noise. If filtering is done, say at
one scale for the QRS component of the waveform, then
it alone gets enhanced at the expense of the P and T
waves. Therefore the need for different characteristic filters, one each for the P, QRS and T waves, becomes self
evident. This may he achieved through the use of dyadic
filters, which have the property of decomposing signals
over different scales [5]. Impulse response of these filters
constitutes the basis functions in wavelet decomposition.

2. Basis functions for ECG analysis


For estimation of the ECG parameters, it is important
that the proper choice of the basis functions be made.
In this regard, one has to ascertain the desirable properties of such functions. For ECG parameters estimation,
it is desirable that the basis functions (wavelets) be
symmetric/antisymmetric. A symmetric basis will enable
the detection of peak of wave as an extrema. In case of
antisymmetric basis, the peak of the wave is detected as
a zero crossing.
Also, it is desirable that the basis have a minimum
number of sign changes which will simplify the steps in
the parameters estimation algorithm.
Biorthogonal wavelets, suggested by [4] satisfy this
property. Hence they are used in this work. The filter
coefficients of both the symmetric low pass (LP) H and
the antisymmetric high pass (HP) filters G and K are
given in Table 1. Further their frequency response satisfies the equations:
|H(w)|2G(w)K(w)1
where
H(w)eiw/2(cos(w/2))p
G(w)4ieiw/2 sin(w/2)

K(w)

1|H(w)|2
and
G(w)

i=1 and p=3,5,7,. For compact support p should


be as small as possible. Hence, it was chosen to be equal
to 3. The filter coefficients corresponding to p=3 are
given in Table 1 [4].

3. Parameters estimation
The parameters of the ECG signal are obtained by the
wavelet decomposition dyadic tree. This tree decomposes the signal initially into the smooth (low pass) and
Table 1
Filter coefficients
n
3
2
1
0
1
2
3

0.125
0.375
0.375
0.125

2
2

K
0.0078125
0.054685
0.171875
0.171875
0.054685
0.0078125

N. Sivannarayana, D.C. Reddy / Medical Engineering and Physics 21 (1999) 167174

169

3.3. Step 3
Determine the location of R, nR, which occurs at the
zero crossing point between the most prominent extrema.
Note: Extrema are the dominant points where the slope
of a waveform changes. They are computed using the
extrema detection algorithm as given in [2, 9].
3.4. Step 4
Fig. 2. Wavelet decomposition of ECG signal. Decomposition performed over 4 scales.

detail (high pass) constituents. The lowpass component


is further decomposed into low pass and high pass. This
process is repeated over the desired number of scales.
When an ECG signal is passed through each of the
wavelet filters whose scales range from 21 to 24, as
shown in Fig. 2, the detailed d1,k, d2,k, d3,k d4,k and the
smooth s1,k, s2,k, s3,k, s4,k filtered outputs are obtained as
shown in Fig. 3. The following algorithm is suggested
for estimating the said ECG parameters.
3.1. Step 1
Select a wavelet-transformed ECG block data of duration 1.5 to 2 secs that contains at least one cycle of
the waveform.
3.2. Step 2
Choose scale 21 for the determination of both the
location of R, nR, and the duration of QRS. See Fig. 4.

Fig. 3.

Determine the launch points nl1 and nl2. Note: Points


from where a transformed signal emerges and
develops an extremum [6]. Using the equations of below
where launch points are defined as
nl1=supkn1{k:dj,kTh.dj,n1},dj,n10 or
nl1=supkn1{k:dj,kTh.dj,n1},dj,n10
nl2=infkn2{k:dj,kTh.dj,n2},dj,n20 or
nl2=infkn2{k:dj,kTh.dj,n2},dj,n20

(1)

(2)

where dj,ks are the filtered outputs at scale-2j; n1, and


n2 are the most prominent extrema points to the left and
right respectively of the location of R and Th stands
for a threshold set at 0.1. Note: Extensive simulation
results have shown that setting the threshold to 0.1 leads
to a reasonably accurate estimation of the QRS duration.
Simulation with different values of thresholds (0.05;
0.075, 0.1 and 0.15) yielded QRS duration that differed
at most by one sample which was thought to be in the
permissible limit of accuracy.

Wavelet transformed ECG at 4 scales, details (d1,k to d4,k), smooth (s1,k to s4,k).

170

N. Sivannarayana, D.C. Reddy / Medical Engineering and Physics 21 (1999) 167174

Fig. 4.

QRS analysis and launch points nl1, and nl2 (o). The location of R is indicated as *.

Segment duration, Nj, required for the calculation of


QRS duration is obtained from the equation:

3.7. Step 7

Nj nl2nl1

For the detection of the T-wave, a suitable region of


search is 120 samples to the right of nl2 of QRS as long
as it is less than the next RR interval. If not it is limited
to (RRt30) samples. The location of the T-wave, nT,
and its duration NT are determined in the same fashion
as that of the R-wave as given in Steps 3 to 5 except
that the scales used are 23 to 24. See Fig. 5.

(3)

3.5. Step 5
Obtain a consistent estimate of the QRS duration, NQ,
by solving the following set of equations (for justification see section Discussion that follows).

3.8. Step 8

N1NQNb1

(4)

Once the duration and location parameters are


obtained as indicated above, segment lengths, PR and
ST may be computed from the equations:

N2NQNb2NQ2Nb1

(5)

NQ
NP
PR nR
nP
2
2

when N1, N2 are segment durations respectively at scales


21 and 22, Nbj is a scale-dependent constant that takes
into account that convolution is performed at different
scales.

(6)

(7)

NT
NR
ST nT
nR
2
2

3.6. Step 6
For the detection of a P-wave, a suitable region of
search is 80 samples to the left of nl1 of QRS. The end
of the previous cycle T-wave is considered as an outer
limit, for analysis. The location of the P-wave, nP, and
its duration, NP, are determined in the same fashion as
that of the R-wave as given in Steps 3 to 5 except that
the scales used are 23 and 24.

3.9. Step 9
The amplitude of the R-wave, Ramp, is obtained at
scale-1 using the following equation:

s1(nl1)+s1(nl2)
Ramp(K1,NQ). s1(nR)
2

(8)

N. Sivannarayana, D.C. Reddy / Medical Engineering and Physics 21 (1999) 167174

Fig. 5.

171

P and T wave analysis and launch points nl1, and nl2 (o). The location of P and T are indicated as *.

where s1(k) are the smooth coefficients at scale j=1, nl1,


and nl2 are the launch points of QRS at scale j=1.
K1,NQ represents the QRS scale-cum-duration dependent
constant the justification of which is provided in the
second part of Discussion, that follows. Note: For ease
of writing s1,k is denoted as s1(k).

T4amp(K4,NT). s4(nT)

s4(nl1)+s4(nl2)
2

(14)

TampT3amp, if |T3amp||T4amp|

(15)

3.10. Step 10

TampT4amp, if |T3amp||T4amp|

(16)

The amplitudes of the P-wave may be determined


using the following equations:

where nl1 and nl2 corresponds to T-wave launch points


at respective scales. s3 and s4 are the smooth coefficients
at scales j=3 and 4.

s3(nl1)+s3(nl2)
P3amp(K3,NP). s3(nP)
2

(9)

s4(nl1)+s4(nl2)
P4amp(K4,NP). s4(nP)
2

(10)

PampP3amp, if |P3amp||P4amp|

(11)

3.12. Additional steps


It is possible that sometimes the P-wave and sometimes the T-wave may be missing. In both the cases,
no extrema are detected and the algorithm declares their
absence. Note: that the above algorithm is valid when it
is applied to the second and subsequent cycles of the
ECG waveforms.
3.13. T-wave detection in PVCs

PampP4amp, if |P3amp||P4amp|

(12)

where nl1 and nl2 are the launch points at their respective
scales. Kj,NP, represent the scale-cum-duration dependent constant.
3.11. Step 11
T-wave amplitude may be determined from the following equations:

s3(nl1)+s3(nl2)
T3amp(K3,NT). s3(nT)
2

(13)

In case of PVC, eventhough the ST segment is absent,


the algorithm is still effective because
the QRS width is already known from scales j=1 and
2 (d1,k and d2,k).
At scales-3 and 4, (d3,k and d4,k), the extrema of the
QRS and T merge in that the left and right most
extrema remain distinct while the in between extrema
merge giving rise to a duration which is the sum of
durations of QRS and T, i.e. (NQ+NT). This (NQ+NT)
duration may be determined at scales-3 and 4, from
which the T-wave duration can be determined. The
location of T-wave is given by:

172

N. Sivannarayana, D.C. Reddy / Medical Engineering and Physics 21 (1999) 167174

Table 2
ECG parameters estimation results
Parameter name

Actual value

Estimated
value

Estimated with
SNR=8 dB

P-duration
QRS-duration
T-duration
P-amplitude
QRS-amplitude
T-amplitude
PR-segment
ST-segment
RR-interval

30
15
65
0.13
0.75
0.32
15
35
266

30
14
66
0.122
0.82
0.343
16
35
266

29
15
64
0.127
0.82
0.336
15
35
266

nT nR

NQ NT

2 2

(17)

PVC (see Fig. 6) that is representative of the arrhythmia.


It is obvious from the table that the actual values and
those given by the proposed algorithm are in close agreement. Note: The actual values are obtained by zooming
the various segments of the waveform and determining
their amplitudes and durations.
The algorithm was then applied to representative sample of the sequence Normal-R on T-Normal (Fig. 7) and
Normal-Fusion-Fusion (Fig. 8) beats. The results of that
are given in Tables 4 and 5 respectively.
Observe once again that there is a close agreement
between the actual and estimated values of the parameters.
4. Discussion
4.1. Justification for Eqs. (4) and (5)

The above mentioned algorithm was used for the


determination of various ECG parameters on the aforesaid AHA data base. Table 2 gives a representative sample of the results obtained on waveforms belonging to
the No PVCs (Normal beat) class. Note: In Table 1, to
obtain correct, duration values in msecs, multiply the
tabulated values by four. Further the amplitudes are normalized by a constant of 1000.
To further test the efficacy of the method, it was proposed to use the algorithm on different classes of waveforms given in the AHA data base.
The classes are
1.
2.
3.
4.
5.
6.

Recall that coefficients sj,k, dj,k,,d1,k are the wavelet


transform coefficients that can be used to synthesize the
function f(t). They are related to the approximating
wavelet functions [1], fJ,k(t) and yj,k(t), by the following integrals:

sJ,k fJ,k(t)f(t) dt 2j/2f

dj,k yj,k(t)f(t) dt= 2j/2y

t2j k
f(t) dt
2j

(18)

t2j k
f(t) dt,
2j

(19)

j=1,2,,J

No PVCs or Normal (N)


PVC (V)
R on T (R)
Paced beats (P)
Fusion beats (F)
Questionable beat (Q)
Table 3 gives the parameters estimated of a typical

In the above integrals, note that f(t) is fixed, the length


of yj+1,k will be two times that of yj,k. Thus with the
QRS morphology remaining the same, the length of the
convolved sequence increases. This increase leads to an
increase in Nbj , in Eq. (5). Extensive simulations have
shown that this increase in Nbj is two times Nbj1 when
the scale increases from j=1 to 2. Hence, Nb2 is replaced
by 2Nb1, in Eq. (5).

Table 3
ECG parameters for PVCs
Parameter name

P-duration
QRS-duration
T-duration
P-amplitude
QRS-amplitude
T-amplitude
PR-segment
ST-segment
RR-interval

Normal

PVC

Actual

Est.

25
24
32
0.089
0.75
0.145
10
41
162

26
23
31
0.087
0.788
0.15
10
40
162

Actual
0
44
83
0
1.67
0.59
0
0
98

Normal
Est.
0
42
84
0
1.7
0.58
0
0
98

Actual

Est.

35
25
45
0.12
0.725
0.18
9
44
231

35
24
44
0.12
0.778
0.17
9
45
231

N. Sivannarayana, D.C. Reddy / Medical Engineering and Physics 21 (1999) 167174

Fig. 6.

Fig. 7.

173

ECG waveform N-PVC-N. The parameters estimated are given in Table 3.

ECG waveform N-R.on.T-N. The parameters estimated are given in Table 4.

Fig. 8.

ECG waveform N-F-F. The parameters estimated are given in Table 5.

Table 4
ECG parameters for R on T waveform
Parameter name

P-duration
QRS-duration
T-duration
P-amplitude
QRS-amplitude
T-amplitude
PR-segment
ST-segment
RR-interval

Normal

R.on.T

Normal

Actual

Est.

Actual

Est.

Actual

Est.

21
14
0
0.04
0.85
0
14
0
226

22
13
0
0.036
0.93
0
14
0
226

0
24
60
0
0.4
0.14
0
44
97

0
23
58
0
0.39
0.12
0
42
97

25
16
58
0.04
0.9
0.08
13
45
335

24
15
56
0.04
0.98
0.07
14
46
335

174

N. Sivannarayana, D.C. Reddy / Medical Engineering and Physics 21 (1999) 167174

Table 5
ECG parameters for Normal-Fusion-Fusion waveform
Parameter name

P-duration
QRS-duration
T-duration
P-amplitude
QRS-amplitude
T-amplitude
PR-segment
ST-segment
RR-interval

Normal

Fusion

Actual

Est.

Actual

Est.

Actual

Est.

30
15
50
0.08
0.6
0.1
18
40
186

32
15
51
0.075
0.6853
0.1
17
41
186

32
20
70
0.08
0.75
0.09
18
25
208

33
19
69
0.077
0.7887
0.1
17
24
208

32
22
63
0.075
0.69
0.09
17
30
209

31
21
66
0.08
0.7312
0.08
16
27
209

Eq. (8) is justified since baseline wander, if any, is


subtracted from the peak amplitude of R at nR.
4.2. Justification for Eq. (8)
Since the amplitude of various morphologies of ECG
waveforms are being determined in the transformed
domain, one needs to use a scale cum duration dependent
constant, referred to as the denormalization factor, to
account for the loss in peak amplitude. Note that such
constants are shape dependent. In case of ECG waveforms, the various morphologies may be roughly
approximated as triangular pulses. Extensive simulations
with triangular pulsed waveforms at different scales (21,
22, 23 and 24), have shown that the constant is given by
the equation:
Kj,Nm1

1.6 j
2
Nm

Fusion

(20)

where j is scale number 1,2,3,4 and Nm is the number


of samples of support of the pulse. Simulation studies
with AHA database have shown that for the R-wave,
Kj,NQ is close to unity.
This appears to be logical as the frequency spectra of
both QRS and s1,k are very close. Note that Eq. (20)
holds good for both P and T waves when the SNR is
high since P and T amplitudes may be determined from
s1,k itself instead of s3,k and s4,k. However, in case of
noisy ECGs, when the P and T waveforms can not be
distinguished clearly from the background, the above
procedure needs to be modified. The modification suggested is multiplication by constants Kj,Np and Kj,NT
respectively of the P and T waves. This is because of
the loss in the peak amplitude due to smoothing effect
at scales 23 and 24.

5. Conclusions
The present study is mainly aimed at using biorthogonal wavelets for the estimation of clinically significant
parameters of ECG waveforms. It has been shown that
these wavelets are ideally suited for the purpose since
they excite the various morphologies (of the ECGs) at
different scales. A powerful algorithm, based on the
multiscale analysis of the waveforms is developed that
yielded the various duration parameter estimates that lie
within one sample, (for short duration morphologies) of
the actual value. As a result the characteristics of even
the feeble P-wave, an arrhythmia descriptor, are very
accurately estimated. Further these estimates are shown
to be quite robust in the presence of noise as well as in
baseline wander situations. The waveforms used were
from the AHA database that comprise normal and abnormal (arrhythmias of ventricular origin) beats.
References
[1] Bruce A, Gao H-Y. Applied wavelet analysis with S-Plus.
Springer-Verlag, 1996.
[2] Cetin EA, Ansari R. Signal recovery from wavelet transform
maxima. IEEE Trans on SP 1994; Jan:1968.
[3] Li CW, Zheng CX, et al. Detection of ECG characteristic points
using the wavelet transforms. IEEE Trans. on BME 1995;
Jan:218.
[4] Mallat SG, Zhong S. Characterization of signals from multiscale
edges. IEEE Trans on PAMI 1992;14(7):71032.
[5] Meyer Y. Wavelets and applications. Springer-Verlag, 1992.
[6] Trahanias P, Skordalakis E. Syntactic pattern recognition of the
ECG, IEEE on PAMI 1990; July:64857.
[7] Abeysekera SS. Detection and classification of ECG signals in
the time frequency domain, Applied signal processing, vol. 1.
Springer Verlag, 1994.
[8] Schamroth L. An introduction to electrocardiography. Oxford
Press, 1986.
[9] Sivannarayana N. Characterization of transient-like signals using
wavelet transforms. PhD thesis, Dept. of ECE, Osmania University, Hyderabad, India, 1998.

Das könnte Ihnen auch gefallen