1 Introduction

THE USE of the coherent averaging technique for the improvement of the signal-to-noise ratio of specific signals present in a high-amplification electrocardiogram implies the location of a fiducial point as a synchronisation reference. The noise superimposed on the useful signal inevitably causes a jitter that affects the proper location of this point, by producing a smoothing effect on the signal. Therefore, it is of great importance to have an algorithm characterised by a low jitter value with respect to the highest spectral component period of the signal to be detected. Various authors have studied the problem, proposing algorithms based on different principles, implemented in software and/or hardware modes, and generally designed to obtain the fiducial point according to each QRS complex. Some authors have presented algorithms based on the analysis of the ECG signal derivative (BARBARO et al., 1983; BRANDON and BRODY, 1970; WAJSZCZUK et al., 1978; CRAELIUSet al., 1986). Others have utilised a filter capable of giving symmetry to the QRS, and then selected the central point with a specific threshold detector (UIJEN et al., 1979). Yet others have used the contour-limiting First received 9th February 1989 and in final form 9th April 1990

9 IFMBE: 1991 Medical & Biological Engineering & Computing

technique (MOHAMMAD-DJAFARIet al., 1981; GOOVAERTSet al., 1976), that yields good results when the signal-to-noise ratio value is high. Conversely, the cross-difference technique is more adequate in the presence of particularly noisy electrocardiographic signals (LINDECRANTZ and LILJA, 1988). Other algorithms use the cross-correlation technique (ABBOUDand SADEH,1982; DENNISSet al., 1986), and still others, the ECG signal envelope maximum (NYG~,RDS and SORNMO, 1983). An algorithm that uses a new time-delay estimation, capable of aligning even P and T-waves, has recently been presented (JESUSand RIx 1988). The algorithms described so far have focused on the improvement of specificity; whereas, for the measurement of the R-R interval, algorithms improving sensitivity have been developed (AMAZEEN et al., 1972; MURTHY and RANGARAJ, 1979; OKADA, 1979; FRADEN and NEUMAN, 1980; HANNA, 1980; AHLSTROM and TOMPKINS, 1983; CAHILL and MCCLURE, 1983; DE VEL, 1984; PANDE et al., 1985; PAN and TOMPKINS, 1985). By applying the averaging technique, recordings of the His bundle electrical activity and of late ventricular potentials with a noninvasive method were made (BARBAROet al., 1983; 1985; 1986). This has allowed the authors to set up magnetic files of the electrocardiographic traces of approximately 150 patients affected by different pathologies. The data gathered have clearly evidenced the prob-

March 1991

129

lems that arise when having to design a general algorithm capable of correctly identifying fiducial points on the ECG tracings of different patients. Patients' ECGs often present different morphologies and timings, and so algorithms which may be satisfactory in some cases may be unsatisfactory in others; the same patient may also present abnormal signals (for example ventricular extrasystoles) which may strongly affect the location of the fiducial point. The above factors plus the need to have an algorithm capable of running on a personal computer, operable in real time, insensitive to the mains and to ECG-baseline fluctuations, with a low jitter value and the capacity to trigger waveforms other than the QRS complex, motivated the present study.

[--I I I I

I I I

L_~

template window

window A

,

7~ 2

x

2 Method

2.1 Description The algorithm is based on a template comparing method. It requires a known ECG complex on which three characterising parameters are computed. These parameters are compared to the corresponding ones computed on the ECG signal. The fiducial point is located at the template position which minimises the difference between parameters. The reference ECG complex is chosen by the user by means of a two-window template (Fig. 1), The width and the reciprocal position of the windows produce two intervals on the waveform with different mean slopes (in absolute value and/or sign). The following characterising parameters are computed:

nl n2 n3 n4=n L. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

b Fig. 2 Running step. (a) ECG signal with framed wave located by template position n; (b) magnified framed wave evidencing the two intervals captured by the template * template displacement direction on the signal

d l r = difference between the signal values located at the

extremes of window 1 d2r = difference between the signal values located at the

extremes of window 2 avdr = difference between the mean values of the samples

within window 2 and those within window 1. On the ECG signal, the same parameters dl(n), d2(n) and avd(n) are computed (Fig. 2). To compare these param-

I

I

I

I

L_J

2.2 Pre-running step Two reference intervals of the ECG signal are defined on the complex of interest by means of four cursors. The signals within these intervals must have different mean slopes (see Fig. 1). The following characterising parameters are calculated on the selected reference intervals:

template window 1

window

eters, two functions are used: the enable function en(n) and the alignment error function eft(n), en(n) is a binary function which assumes the zero value only when the ratio [ d l ( n ) - d l r ] / d l r and [ d 2 ( n ) - d2r]/d2r are lower than a pre-established value. The second function is the normalised difference between avd(n) and avdr. The 'optimal position' of the template is determined by finding the lowest value of the alignment error function within each interval where the enable function is zero, provided that this minimum is lower than a threshold. This position locates the fiducial point on the ECG. Thus, the algorithm consists of two steps: a pre-running step and a running step.

2

,,

d l r = s(n2r) - s(nlr) d2r = s(n4r) - s(n3r) n4r

avdr = (1/5n34)

~

s(k)

k=n3r+ l n2r

nlr

n 2 r n3r

-- (1/5n12)

n4r b

Fig. 1 Pre-running step. (a) ECG sional with the framed synchronising waveform selected by the user; (b) magnified framed waveform and example of a two-window template construction by means of four vertical cursors 130

Z

s(k)

k=nlr+ 1

where finl2 = n 2 r - nlr 5n34 = n4r - n3r s(k) = kth sample of the signal nlr, n2r, n3r, n4r = the abscissas of the four cursors

Medical & Biological Engineering & Computing

March 1991

1.6

1"2

1-2

0-8

1-2 I

0-4

0

3:

e f e r e nr c e

u~

' i

I i

I

i

'

i

i

'

i

0.8

>

i

t

0 wave

> O

0.8

- -

c

0"4 ~

~

0

~

i

i

i

i

i

1.6

O'8 >~

0"4 reference'

oA

o

i

i

(fiducial point)

o

al_point)

~D

-O'4

test wave

I

I

--0

8

i

i

I I I

I

nl

I

--0"4

-0.8

n4- optimal position

I

'

'' nl

n2n3

40

(2

4O

0

i

i

I r

n2 n3

wave

-0-4

J

n4=optimal a

-0.4

position

',

]

J

c 0

"6

I

30

en(n)

10

en(n)

g % c

~,

20

20

a~

E E c

=

d~ 0 c aJ

10

d i

100

200

300

100

400

n (sample)

(a) The reference wave is temporarily superimposed on the ECG signal (test wave). By moving both the reference wave and the template locked on it (in the position established in the pre-running step), and making cursor 4 coincide with the "optimal position" obtained through the algorithm, a perfect synchronisation between the two waveforms can be observed. (b) Corresponding alignment error function erf (n) and enable function en(n) of the test wave. Sampling frequency 2 kHz

Moreover, a normalisation factor (norm) is calculated to be used during the running step when defining the alignment error function. norm=abs

f

(1/~n34)

n4r

~

Fig. 4

On the basis of these values, the following functions are calculated: en(n):

if abs{rdl(n) - dlr]/dlr}

New algorithm for the detection of the ECG fiducial point in the averaging technique.

The use of the coherent averaging technique applied to the electrocardiographic signal implies the location of a fiducial point as a synchronisation r...
1MB Sizes 0 Downloads 0 Views