Adaptive fiducial point detector for ECG stress testing systems

Adaptive fiducial point detector for ECG stress testing systems

Inr J Biomrd Cornput. Elsevier Scientific ADAPTIVE SYSTEMS ZYGMUNT (Received (Accepted 28 (1991) Publishers 127-135 Ireland FIDUCIAL FRANKI...

445KB Sizes 1 Downloads 30 Views

Inr J Biomrd

Cornput.

Elsevier Scientific

ADAPTIVE SYSTEMS

ZYGMUNT

(Received (Accepted

28 (1991)

Publishers

127-135

Ireland

FIDUCIAL

FRANKIEWICZ

127

Ltd.

POINT DETECTOR

and JACEK

FOR ECG STRESS TESTING

LESKI

September 9th. 1990) March 6th. 1991)

The paper deals with the problem of fiducial point detection in noisy exercise ECG signals. Performance of the averaging process depends on the detector’s repeatability. The paper proposes an adaptive algorithm for optimization of the detector. The structure of the detector is well known and often used. Characteristics of the last lilter are matched to the current signal and bandpass filter impulse response. The new method was tested using real ECG signals. to almost one half. Key~~rd.s:

Fiducial

point detection:

Results

indicated

that the FP jittering

was reduced

ECG signals

Introduction The fiducial point FP accurately determines the time of occurrence of the QRS complex. Its significance is obvious when accurate RR-interval measurements are essential as in the case of heart rate variability analysis. It should be noticed that, generally speaking, FP is not located in a peak of the R wave. The second main field of the FP application is time averaging of the ECG signal. Time averaging for noise reduction is used, for example, in diagnostic, stress testing and micropotentials analyzing systems. The performance of the averaging process strongly depends on the repeatability of the FP detector. The smaller the FP jittering effect the higher the fidelity of the signal. The problem of FP-detection in stress testing systems is mainly due to the average noise level in the input signal which is often very high during exercise. [1] There are many simple FP-detectors known from the literature, such as zero crossing or maximum or minimum detection in the original signal or band-pass filtered signal. Nygards et al. [2] found out that these detectors, which do not use information from the entire waveform, suffer from discontinuities for certain QRS shapes. The overall performance of these detectors is degraded by a large scatter observed Correspondencr

Pstrowskiego

IO: Zygmunt Frankiewicz. 16, 44-100 Gliwice, Poland.

0020-7101/91/$03.50 0 1991 Elsevier Puhlirhed and Printed in lr~land

Institute

Scientific

of Electronics,

Publishers

Ireland

Technical

Ltd

University

of Silesia. ul.

Z. Frankiewic:,

128

Fig. 1. Block diagram

of a FP detector.

BPF. bandpass

J. Leski

filter; LPF, lowpass

filter.

for some waveforms. This can be seen clearly especially when the signal is corrupted with excessive noise. Nygards et al. [2] and other investigators (for example, Ref. 3) employed a structure of the detector as shown in Fig. 1. The structure responds with one positive, smooth wave to each QRS complex. This guarantees stability of the detector. The FP is located at the sample corresponding to the maximal value of the DF. For some applications like detection of micropotentials and conventional diagnostic systems, repeatability of that detector is insufficient. For systems that demand perfect FP detection and which operate on a signal that is rather corrupted with noise, a two-step FP detector seems to be a reasonable approach. Hamilton et al. [4] proposed an FP detector which uses a kind of DF for rough QRS location and a largest peak in the lOO-ms long time window in the bandpass filtered signal for FP detection. In spite of the short time window it is still possible that the bandpassed signal - for some QRS shapes - may have two or more almost equal peaks within the window. It leads to unstability which can be clearly seen for low SNRs. According to our investigation for SNR lower than 10 dB, a detector that locates the FP at maximum of the DF has the best performance [5]. Much has been written about the BPF (for example, Refs. 6 and 7). A matched filter is desired instead of the BPF but problems with templates and computational load occur in real time systems. We will show that for a structure of an FP detector shown in Fig. 1, an improvement in performance is possible when the LPFs length is individually adopted to the signal and to the BPF characteristic. The simplest filters are usually used as the LPF. We consider a moving average filter (MAF) as the LPF but any other filter can be used instead. A magnitude function is often used instead of the square as a non-linear operation. As a result we obtain an FP detector with rather small jittering effect which can operate even when the power of noise is comparable with the signal power. The FP Detector

We will now show why the width of the LPF is important. The preprocessing stage which is represented here by BPF decreases the SNR but some noise component is still present in DF. The main idea of our method is to shape peaks in the DF corresponding to QRS complexes using the width of the LPF as a parameter in such a way that the influence of noise is as little as possible.

Adaptive

Fig. 2. Two different

hypothetical

fiducial

DF peaks:

ECG stress testing

129

systems

noise free (a, c) and disturbed

with the noise (b. d)

Figure 2 shows two different hypothetical DF peaks, each represented as the noise-free signal and disturbed with noise. The noise level is the same in both cases. As was stated before, an FP is detected at the point of the maximal amplitude in the DF peak. It is intuitively obvious that the standard deviation (SD.) of the FP jittering will be less in the case (d) (Fig. 2) than in the case (b). The probability of a given error is lower for shapes that have steeper slopes in the vicinity of the maximum. We assume that BPF is ideal; only the QRS complex is represented in the output signal (there is no response to the P or T wave). We also arbitrarily assume, for our consideration, that the BPF output signal has a shape as in Fig. 3a. In fact, this shape depends on the preprocessing stage and actual QRS morphology, but in most cases it is similar to that which was assumed. When the length of the LPF (JC)is longer than the width of the BPF output, i.e. 105 ms in this case, the corresponding DF peak has a flat part in the middle (Figs. 3b and 3~). The probability that FP is detected at a given sample point is equal for each sample from the flat part of the peak. The S.D. of the FP jittering will be large in this case. When L is less than 85 ms, in this case, the corresponding DF peak has more than one maximum (Figs. 3g-31) and the FP detector is unstable. The FP is randomly detected at one of the maxima. Standard deviation of the detection is large. The optimal L should be sought between 85 and 105 ms. The DF peak for optimal

130

2. Frankiewic:, J. Lrski

a

\ II:‘:::

b

C

110

d

e

90

ms

i

1

Fig. 3. Synthetic BFP output signal (a) and corresponding

DF for different

L (b-l).

ms1

L (L,,,) has one maximum with the steepest slopes in vicinity of the maximum (Figs. 3e and 3f; Lop, determined using a method to be represented below was equal to 85 ms). In the real world the BPF is not ideal and the P and T wave have their representation in the BPF output signal, but this does not change our consideration because peaks in DF resulting from the QRS complex should be separated from those resulting from the P and T waves. Our goal is to optimize the shape of the QRS representation in DF in order to decrease the jittering effect of the FP detector. Our FP detector has the structure shown in Fig. 1. We employ a cascade of four simple FIR filters as the BPF. which has the central frequency of 17 Hz and the parameter Q = 4.8. The output signal from the BPF is squared and lowpass filtered with the MAF. The length of the MAF is determined at the beginning of every new test in the following way: an envelope of the BPF output is computed (using the Hilbert transformation): then the envelope is squared and smoothed; Lop, is determined as the distance between points where a derivative of the signal, obtained in that way, reaches its minimum and maximum. Thus we evaluate the length of the response of the BPF on a QRS complex. We state that this is the optimum length of the MAF. Figure 4 illustrates the method of determining the Lot,, for the synthetic BPF out-

a

I

b

I

C

A9 d

f

I

Fig. 4. Illustration of the method of dermining the LOP,: (a) synthetic BFP output signal. (b) squared Hilbert filter output, (c) after filtering with triangle impulse response filter, (d) after lirst order difference filtering: LOpc is determined as the distance between maximum and minimum point in this signal.

132

Z. Frankiewic.

J. Leski

put signal, the same as in Fig. 3a. The following Hilbert filter was employed: ___

[z(n + 2k + 1) - ,_(n - 2k - l)]

where K = 6. The squared envelope was smoothed with a low pass filter with a triangle impulse response. First order difference was used as the derivative Testing

We tested the noise immunity of the FP detector using 21 records from an available arrhythmia database, We chose one typical, normal and undisturbed beat from each record. The same lead was always used. We found Lop, and the FP for each of the 21 beats. The computer random numbers generator and the Box-Miiller formula were used to obtain synthetic white Gaussian noise for disturbing ECG beats. The test was carried out for both white and colored noise. The colored noise is appropriate in this case because in real systems there are always anti-alias filters that limits the noise spectrum. The colored noise was obtained from the white one using lowpass filtering (3 dB cut-off frequency was equal to 63 Hz). Results were identical because of the bandpass filter in the FP detector which was very close to zero for frequencies greater than 40 Hz. SNR was arbitrarily determined to 8 dB, which value is, according to our experience, often observed during real stress-testing. SNR = 20 log U./U,, where: us is rms of the signal measured for a P-QRS-T interval, U, is standard deviation of noise. The disturbing process was repeated 60 times with different realizations of the noise. The FP was found each time. Then the standard deviation of the jittering of the FP, (rFpk was computed for each beat (k = 1, 2, . . . 21). All this procedure was repeated for different lengths of the MAF: L = Lopt + TJ*/l (1 = -3, -2, -1, 0, 1, 2, 3; T,-sampling period equal to 4 ms). Then the average of the normalized aFpk was obtained as a function of I:

Results

Lopt value ranged from 44 ms up to 96 ms for different beats and a&L = Lopt) ranged from 0 to 6.2 ms (mean 1.9 ms, SD. 1.75 ms for SNR = 8 dB). The plot of the measure of repeatability of the FP detector against the deviation of L from Lopt (determined using our method) is shown in Fig. 5. Lopt guarantees

Adaprive fiducial

0.0’ -3

I

I

-2

-1 dewetion

Fig. 5. Mean SD. value.

of the FP detection

I

I

I

8

0

133

ECG stress tesling svsrems

2 3 1 of L tram opt. velue in samples as a function

of the length deviation

of MAF from the optimal

the smallest jitter effect. When L differs from the Lopt (zero on the horizontal axis) the FP detector’s repeatability deteriorates rapidly. When we assume the fixed value of the MAF’s length, as is commonly done, the average repeatability a (L) is at least 1.67 times worse than for L individually adapted (Fig. 6)

L-J---44

64

84

74

84

94

1

Fig. 6. Mean S.D. of the FP detection as a function of the length of MAF. The horizontal the mean value of S.D. for L individually adapted to the signal.

line denotes

Fig. 7. Scatter

plot for the 21 complexes

of width of optimal

lilter versus S.D. of the jittering.

The horizontal line in Fig. 6 represents the mean value of (Jrp (L = Lop,) for 21 complexes. Figure 7 shows a scatter plot for 21 complexes of width of optimal filter versus S.D. of the jittering. Lopt is, in some sense, related to the QRS width but we did not observe any relation between Lop, and SD. of the jittering. Conclusion

We have shown that when the FP detector had a structure as in Fig. 1, its performance was very good and the characteristic of the LPF was of great importance. The LPF cutoff frequency should be adapted to the current ECG signal and to the BPF’s impulse response. The method just presented enables us to accurately determine the MAF’s optimum length. It should be employed at the beginning of every new test since the optimum value varies significantly for different patients. Since our algorithm reduces the FP jittering significantly, about 2 times an equivalent 3 dB cutoff, the frequency of the averaging process increases from 35 Hz to 70 Hz assuming Gaussian distribution and SNR equal to 8 dB [S]. References 1

Pahlm 0 and Sknmo L: Software Eng Compur. 22 (1984) 288-287.

QRS Detection

in ambulatory

monitoring

-

a review, Med Bid

2

Nygards Bid

3 4

5 6 7

8

M and Siirnmo L: Delineation 21 ( 1983) 538-547.

of the QRS complex

using the envelope

of the E.C.G.,

Med

Eng Compur,

Chang W, Lin K. Lin T: A real-time feature extraction method for PVC detection in bedside monitor. Nin!h Annul Co$wncc~ of the En,ginwritlg in Mc~dicitw oncl Biology Socie?,~. 1987. Hamilton P and Tompkins W: Quantitative investigation of QRS detection rules using the MITIBIH arrhythmia database. fEEE Truns Biomrcl Eng. 12 (1986) 1157-l 165. Frankiewics Z: Mef/&s NJ’ECG Signal Ano/y.vis in Prr.vcww of Noise. PhD thesis. Technical University of Silesia, Poland. 1986. Thakor N. Webster J and Tompkins W: Estimation of QRS complex power spectra for design of a QRS filter, IEEE Truns Biomd EnR. I I (1984) 702-706. De Vel 0: R-Wave detection in the presence of muscle artifacts. IEEE 715-717. Craelius W. Restivo M. Assadi M and El-Sherif N: Criteria for optimal IEEE Trons Biomd Eng, IO ( 1986) 957-966.

Trcuw

Bicmwd Eng, I I (1984)

averaging

of cardiac

signals,