Cover
Volume 2, Number 1, pp. 71-78, 2000.    


 


  Home  Current Issue  Table of Contents 

 

 

Novel Signal Processing Methods for Exercise ECG

Willi Kaiser and Martin Findeis

GE Marquette Hellige, Freiburg, Germany

Correspondence: Willi Kaiser, GE Marquette Hellige GmbH, Munzinger Strasse 3, D-79111 Freiburg, Germany.
E-mail: willi.kaiser@hellige.de, phone +49 761 4543 242, fax +49 761 4543 370


Abstract.. Artifacts caused by patient movement are superimposed on exercise electrocardiograms (ECGs). In the high exercise phase, the artifacts can disturb the ECG to such an extent that manual readers have great difficulties to assess the ECG. Algorithms can run into the problem of erroneous detection of QRS complexes, causing them to miscalculate the heart rate, for example. We focused on the artifact problem and worked on new topics: the Finite Impulse Response Residual Filtering (FRF) algorithm, the Intelligent Lead Switch algorithm, and the Detection of Cyclic Artifacts. The FRF algorithm reduces the baseline wander and muscle noise in the ECG stream, with much less distortion of the QRS complexes. It subtracts a continuously updated median beat from the current ECG, filters the residual signal, and adds the median beat to the filtered residual signal. The Intelligent Lead Switch algorithm continuously selects the best leads for QRS detection and thus improves the heart rate calculation, for example. Together with parameters like amplitude and noise level, a new parameter received by Detection of Cyclic Artifacts is used to invoke the switch function.

Keywords: Exercise Test, Artifact, Digital Filter, QRS Detection, Heart Rate


 

1. Introduction

We have been working on developing algorithms for signal processing of exercise electrocardiograms (ECGs) for many years, but artifacts, caused by the movement of the patients, are a recurring problem. During exercise testing, especially in the high exercise phase, artifacts can disturb the ECG to such an extent that manual readers have great difficulties to assess the ECG. Also algorithms can have difficulties. They can run into the problem of erroneous detection of the QRS complexes so that the resulting heart rate and ST measurement values are miscalculated; furthermore, they may detect false-positive arrhythmia events.

We focused on the artifact problem, and we took great efforts to improve our software for exercise signal processing. We developed three new methods: the Finite Impulse Response Residual Filtering (FRF) algorithm, the Intelligent Lead Switch algorithm, and the Detection of Cyclic Artifacts algorithm.
The FRF algorithm improves the ability of displaying clean ECG curves even during artifact sequences, which always occur during exercise testing. This helps the manual reader to better assess the exercise ECG curves. With artifacts, this is sometimes difficult for them.

The Intelligent Lead Switch algorithm takes into account the redundancy of a multi-lead system by selecting only the best leads for QRS complex detection. This improves, among others, heart rate calculation, ST segment evaluation, and arrhythmia analysis during exercise testing, even in phases with excessive artifacts. Together with parameters like QRS amplitudes and noise level a new parameter received by the Detection Of Cyclic Artifacts algorithm is used to invoke the switch function.

All algorithms run under real time conditions, the current ECG is being immediately processed.

2. Materials and Methods

2.1. Data

To assess the quality of the FRF algorithm and the Intelligent Lead Switch algorithm together with the Detection Of Cyclic Artifacts algorithm, we compiled a database of approximately 750 manually annotated ECGs. Most of the ECGs were collected from exercise tests, manually annotated, and thereafter verified by a physician. Annotated are the locations and the categories of the QRS complexes, eg. normals, premature ventricular complexes (PVCs), and premature supraventricular complexes (PSVCs). The annotated ECGs comprise of: 300 treadmill exercise ECGs with standard leads and a duration of approximately 20 min each; 200 bicycle exercise ECGs with standard leads and a duration of approx. 20 min each; 214 ECGs obtained from Massachusetts Institute of Technology (MIT), [Moody and Mark, 1990] American Heart Association (AHA), and European Society of Cardiology (ESC) (2 leads) [Taddei et al., 1981]; and 40 pacemaker ECGs with standard leads and a duration of approximately 10 min each.

2.2. The FRF Algorithm

The FRF algorithm reduces the artifacts in the ECG stream, but with much less distortion of the QRS complexes. The algorithm consists of a block that updates the median beat, a function that subtracts the median beat from the ECG and then outputs a residual signal. The residual signal is fed into a low pass filter, a high pass filter, and finally into a function that adds the median beat (Fig. 1).


Figure 1. Block diagram of the FRF algorithm.

The median beat is updated only if the current QRS complex correlates with the median beat. If the correlation is good, the median beat is updated with one sixteenth of the difference between the current QRS complex and the previous median beat. The chosen correlation limits guarantee continuous updating and the factor of one sixteenth ensures a good match of the median beat with the current normal QRS complexes.

The subtraction function subtracts the median beat only if there is a reasonable accordance between the median beat and the current beat. If the current beat is a PVC, for example, no subtraction occurs. The median beat is subtracted from the QRS onset to the T end. The P wave is not subtracted. In cases of PSVCs, atrial fibrillation, atrial flutter, atrioventricular (AV) block II (Wenckebach, Mobitz), and AV Block III, for example, a subtraction of the P wave of the median beat would be erroneous.

The result of the subtraction function is the residual signal. This signal is filtered by a low-pass filter to reduce muscle noise, and a high-pass filter to reduce baseline wander. The cutoff frequencies of the filters are set to values that avoid unacceptable distortion of the remaining P waves and PVCs in the residual signal. Both filters are finite impulse response filters with the advantage that the delay of the filtered residual signal is constant and signal independent.

Because of the constant delay the addition function is able to add the median beat to the filtered residual signal at the exact position, i.e. the position where it was subtracted before. The addition function does not add the P waves (Fig. 2). If a median beat is not available, the filters are switched off.

The most important part which is responsible for the quality of the FRF is the subtraction function. To be able to assess and improve this function, we developed a method for measuring the quality (see Fig. 3.)

Figure 2. Signal processing by the FRF algorithm. Channel 1 (top): original ECG, channel 2: residual signal after subtraction of the median beat, channel 3: filtered residual signal, and channel 4 (bottom): FRF-ECG after addition of the median beat.

There are 5 counters. The first counter, "N1" is incremented when the reference in our database is a normal beat and the FRF algorithm makes the subtraction. This is a correct operation. The second counter, "No" is incremented when the reference is a normal beat but the algorithm does not make a subtraction. This is a false-negative operation. The third counter, "V1" is incremented when there is a ventricular ectopic beat, e.g. a PVC, and the FRF algorithm subtracts the median beat. This is a false-positive operation. The fourth counter, "Vo" is incremented when the reference annotation is a ventricular ectopic beat and the algorithm does not make a subtraction. This is a correct operation. The fifth counter, "O1" is incremented when no reference is present but the algorithm subtracts the median beat. This is a false-positive operation and occurs with artifacts, for instance. Fusion beats are not counted. When all beats have been assigned to their respective counters, the sensitivity and the positive predictivity are calculated (see Fig. 3.).

Ref 1 0
N N1 No
V V1 Vo
0 01 --
      

FRF
1 = subtraction
0 = no subtraction

Reference:
N = normal. PSVC
V = Verticular ectopic beat, e.g. PVC
0 = No complex

Sensitivity: = N1 / (N1 + No)
Pos.predictivity = N1 / (N1 +V1 + 01)
Fusion beats are excluded

Figure 3. Decision matrix for assessing the quality of the subtraction function.

2.3. The Intelligent Lead Switch Algorithm

Nowadays, the use of multi-lead systems in exercise testing is very common. The most commonly used system is the standard 12-lead system, but other systems with more or less leads are also used. For QRS complex detection, heart rate calculation, and arrhythmia analysis it is not necessary to use all leads. One can take advantage of the redundancy of the multi-lead systems and select only leads with good ECG quality. In our previous systems, we combined all relevant leads to one signal for QRS complex detection. A possible method is to filter each relevant lead by a band-pass filter and then transform the results to absolute values. These values are added together to obtain one signal for QRS complex detection. The method fails if the quality of one or several used leads is insufficient (see Fig. 4).


Figure 4. Exercise ECG with artifacts in different leads and at different times. Combining all leads definitely decreases the QRS complex detection quality.

It is obvious that by selecting good leads during exercise testing, the QRS complex detection quality can be improved. Therefore we developed the Intelligent Lead Switch algorithm. It consists of

  • 2 or more independent and equivalent units for QRS detection, event classification, and ECG quality level evaluation
  • logical unit for selecting the results of the best channel, correcting the event classification of the best channel, and correcting the trigger points (times where the QRS complexes are located) of the best channel (see Fig. 5)


Figure 5. Block diagram of the Intelligent Lead Switch algorithm.

The ECG quality level is calculated on the basis of the QRS complex amplitudes, the levels of middle and high frequency noise, the electrode status (e.g. connected or disconnected electrodes), and the new parameter received from the Detection Of Cyclic Artifacts algorithm (see below).

Examples for classified events are Pauses, PSVCs, and PVCs. If a Pause is detected in the best channel, and the algorithm finds a PVC in other channels, it will correct the event classification and the trigger points of the best channel.

The advantage of the algorithm is a more reliable QRS detection, even in the high exercise phases. The algorithm requires a lot of computer power, especially when processing up to 15 leads. However, with the powerful computers we have nowadays this is not be a big issue any more.

2.4. The Detection Of Cyclic Artifacts Algorithm

During an exercise test the patient normally walks or runs on a treadmill or rides a bicycle. In both cases the patient produces cyclic artifacts. With increasing exercise, also the artifacts increase as well.

The origin of the artifacts are muscle activities or slight changes in electrode position, caused by the movement of the patient. Slight electrode position changes produce artifacts whose frequency content is very often similar to the QRS complexes. These artifacts are therefore very difficult to detect. Furthermore, they are dangerous because they disturb the detection of QRS complexes. This can lead to incorrect heart rate values, false arrhythmia results, and to a poor assessment of the exercise test.

We assumed that the ECG and the cyclic artifacts are two independent rhythms. During exercise the RR intervals and the intervals of the cyclic artifacts do not vary very much over a short time range (e.g.10s). To identify and separate the two independent rhythms the following algorithm is used.

Algorithm:

  1. Triggering the current QRS or artifact complex
  2. Building a chain of intervals with low variance backwards starting with the last triggered complex (e.g. using 10 intervals)
  3. Comparing the current chain with the previous chain
  4. Detecting two independent rhythms if
    • current chain of intervals with low variance exists
    • a chain of intervals with low variance of a predecessor complex exists
    • the distance between current complex and predecessor complex is shorter than the chain intervals
    • the average intervals of both chains are different (are not formed from T or P waves)
  5. Repeating from beginning
    Once a cycle artifact rhythm is detected the information is used for switching to other ECG channels with reduced artifact levels, for example, to ECGI and ECGV6 in Fig. 6.


Figure 6. ECG with cyclic artifacts, in leads ECGV2...V5 both rhythms are visible, in leads ECGI and ECGV6 only the ECG rhythm is visible, in lead ECGV1 only the cyclic artifacts are visible.

3. Results

3.1. Subtraction Function of the FRF Algorithm

For the quality of the subtraction function of the FRF algorithm we achieved a sensitivity of 99.8% and a positive predictivity of 99.9% [Kaiser and Findeis,1999].

3.2. QRS Detection Quality

We measured the QRS complex detection quality of the current implementation of the Intelligent Lead Switch algorithm by calculating the sensitivity and the positive predictivity, using our annotated database with approx. 750 exercise ECGs. Each time the algorithm detected a QRS complex, a "TP" counter was incremented if a QRS complex was annotated in the database in the same place, and an "FP" counter was incremented if no QRS complex was annotated in the database in that place. An "FN" counter was incremented when the algorithm failed to detect a QRS complex that was annotated in the database.

  Sensitivity (%) Positive Predictivity (%)
Treadmill exercise ECGs 99.88 99.89
Bicycle exercise ECGs 99,91 99.97
MIT 99.76 99.78
AHA 99.71 99.84
Pacemaker ECGs 99.15 99.25
The sensitivity is S = 100*TP/(TP + FN) and the positive predictivity is P = 100*TP/(TP + FP). MIT, Massachusetts Institute of Technology; AHA, American Heart Association


The results of the bicycle exercise ECGs are slightly better than the results of the treadmill exercise ECGs. This is no surprise since treadmill tests produce more artifacts than bicycle tests. The results of MIT- and AHA- ECGs are slightly worse than the results of the exercise ECGs. This is due to the fact that the MIT and AHA databases have only two channels and the advantage of selecting channels is reduced. Pacemaker ECGs are more difficult to process than other ECGs. Some of these difficulties are wide QRS complexes with less frequency content, QRS complexes which vary in amplitude and width, high T waves, over-/undershoots of pacemaker pulses and pacemaker pulses inside the QRS complexes.

4. Discussion

Algorithms cannot solve all problems. If the input signal is of inferior quality, they will fail. Even a good algorithm cannot always compensate for poor electrode application. Nevertheless, we made good progress in processing and displaying exercise ECGs with the algorithms FRF and Intelligent Lead Switch together with the Detection OF Cyclic Artifacts. But this is not the end. Extraction of the ECG in an environment with numerous artifacts will remain a challenge.
Since the algorithms are required to run under real time conditions, i.e. a QRS complex has to be processed when it comes in and processing must be completed when the next QRS complex appears, high computer performance is needed during exercise testing. In the past this was often a restriction in the development of an algorithm. However, with increasing computer power and memory capacity, the future will open up new possibilities to find better algorithms for further improvements.

References

Kaiser W, Findeis M. Artifact Processing During Exercise Testing. Journal of Electrocardiology, Vol 32 Supplement: 212-219,1999.

Moody GB, Mark RG. The MIT-BIH arrhythmia database on CD-ROM and software for use with it. Computers in Cardiology, 17: 185-188, 1990.

Taddei A, Biagini A, Distante G, Marchesi C, Mazzei MG, Pisani P, Roggero N, Zeelenberg. An annotated database aimed at performance evaluation of algorithms for ST-T change analysis. Computers in Cardiology, 16:117-120,1989.


table of contents



Official journal of the International Society for Bioelectromagnetism