A new method for detection of P waves in electrocardiograms

A new method for detection of P waves in electrocardiograms

Signal Processing 1 (1979) 15-25. © North-Holland Publishing Company A NEW M E T H O D FOR DETECTION OF P W A V E S IN ELECTROCARDIOGRAMS* K. BRODDA,...

740KB Sizes 7 Downloads 123 Views

Signal Processing 1 (1979) 15-25. © North-Holland Publishing Company

A NEW M E T H O D FOR DETECTION OF P W A V E S IN ELECTROCARDIOGRAMS* K. BRODDA, U. WELLNER and W. MUTSCHLER Dept. of Biophysics, Institute of Physiology, University of Mainz, Saarstr. 21, D-6500 Mainz/FRG, W. Germany Received 31 May 1978 Revised 24 September 1978

Abstract. A new procedure for searching the P wave in the corrected orthogonal electrocardiogram (VCG) was developed on the basis of VCG representation in spherical coordinates. The time course of the angle azimuth shows a well defined configuration P,~ which is suitable for searching the P wave. At least normal VCGs regularly show the P,~ configuration even if P waves are not visible in any of the related amplitude curves. The validity of P,: for the P wave recognition is discussed by electropbysiological considerations, and it was tested by comparison of the time course of P,~ with that of well visible P waves in the magnitude curve of the very same VCG. Superposition with disturbance vectors yielded that P,~ is more stable against distortions than the P wave in the magnitude curve.

A digital algorithm was examined by comparison with data obtained by visual evaluation and with the output data of a common computer program for the very same VCGs. Additionally, the P wave duration and the azimuth of the atrial repolarization vector were compared with related data taken from literature. The results show that P wave recognition by using the Pc configuration is a valid and reliable method.

Zusammenfassung.Es wird fiber ein neues Verfahren zur P-Wellen-Suche im korrigierten orthogonalen Elektrokardiogramm (VKG) berichtet. Die Darstellung des VKG in riiumlichen Polarkoordinaten ergibt im Zeitverlauf der P-Welle eine wohldefinierte Konfiguration Pc, die sich zur P-Wellen-Suche eignet. Gew6hnlich zeigen auch solcbe VKG, die in der Magnitudenkurve oder in den X. Y, Z-Ableitungen keine deutlich sichtbare P-Welle besitzen, zumindest ffir normale VKGs eine deutlich ausgepriigte P,~-Konfiguration. Die ValiditS.t '.'on P,~ fiir die P-Wellen-Suche wird durch elektrophysiologische Betrachtun.gen abgesichert. Zusiitzlich wurde P,, mit Hilfe yon VKGs, die in der Magnitudenkurve eine deutlich sichtbare P-Welle besitzen, durch einen entsprechenden Vergleieh validiert: Superposition mit St6rvektoren ergab, dal] P,, gegenfiber St6rungen offenbar stabiler ist als die P-Welle in der Magnitudenkurve. Weiterhin wurde ein digitaler Algorithmus zur automatischen Suehe yon P,~ entwickelt. Die Reliabilitiit des Algorithmus wurde durch einen entsprechenden Vergleich mit Daten aus einer visuellen Auswertung und mit solchen, die yon einem herk6mmlichen Computerprogramm berechnet worden waren, geprfift. Zusiitzlich wurde die vom P,,-Algorithmus ermittelte P-Wellen-Dauer sowie der Azimuth des sogenannten atrialen Repolarisationsvektors mit den entrsprechenden Werten aus der einschl~igigen Literatur verglichen. Die Resultate zeigen, da[~ es sich bei der P-Wellen-Suche mit Hilfe der P~,-Konfiguration um eine valide und reliable Methode handelt, R6sum6. Nous d6crivons une nouvelle m~thode pour la detection de I'onde P dans un 6[ectrocardiogramme orthogonal, corrig6 (VCG). L'enregistrement de VCG dans les coordonn6es sph6riques produit dans l'6volution temporelle de l'angle azimuta[ une configuration P,: bien d~fin6e qui peut f~tre utilis6e pour la recherch6 de l'onde P. Gen6ralement les VCG normaux, qui n'ont pas une onde P bien visible dans les amplitudes X, Y, Z, presentent une configuration P,~ bien 6',idente. La validit6 de Pc pour la recherche de l'onde Pest discut6e b.l'aide des consid6rations ~lectrophysiologiques. De plus P,~ est test~ h l'aide de VCG, qui ont I'onde P bien visible dans la courbe d'amplitude, en comparant P,, avec l'amplitude du VCG. L'addition des vecteurs de bruit montrent que P,~ est plus stable vis ~ vis des perturbations que I'onde P dans la courbe d'amplitude. Un algorithme pour [a recherche automatique de I'onde Pest d6velop6. La fiabilit6 de l'algorithme est examin6e par une comparaison des r~sultats correspondante, d'une analyse visuelle avec une analyse calcul6e par un programme standard. De * In cooperation with project Me 274/2 supported by the Deutsche Forschungsgemeinschaft. 15

16

K. Brodda, U. WeUner. W Mutschler / Detection of P waces in ECGs

plus on a compar~ la durge de l'onde P calcuI~e par I'algorithme P,, et I'azimute des vecteurs r6polarisants avec des r&ultats correspondants de la litgrature. Les rgsultats que nous avons obtenus par comparaison montrent qu'il s'agit d'une mdthode valable et fiable pour reconnaitre l'onde P ~ I'aide de configuration Pc. Ke)~ords. P wave, electrocardiogram, pattern recognition.

The atrial part of the electrocardiogram (ECG) has been less extensively examined than the ventricular QRS complex, because of less clinical interest and also technical difficulties. The use of improved hardware, especially of high gain amplifiers with low noise now makes possible a closer study of the P wave. A n u m b e r of methods has been described to recognize the QRS complex in ECGs. As the computer evaluation of the complete E C G becomes more and more important the implementation of a reliable method for the detection of the P wave is necessary, too. The problem of P wave recognition arises from its small amplitude and its variable shape. The P wave frequently shows spontaneous variation even in healthy patients. The signal-to-noise ratio is small for the P wave. Artefacts introduced by displacements of the lead electrodes or by muscle movements strongly disturb the P wave. All kinds of baseline drifts influence the shape of the P wave, too. The frequency spectra of the P wave and of the other waves in the E C G substantially overlap one another. Therefore it seems that filtering alone is not a sufficient method to separate the waves. The procedure employed for P wave recognition by Duisterhout et al. [1] and by Swenne et al. [2] makes use of complex statistical criteria. Other methods developed by Taylor et al. [3] operate with digital comb filters and correlation statistics. These procedures demand for increased computer power and introduces a considerable time delay to the evaluation of the data. Methods based on intra-atrial leads which enlarge the P wave are not suitable for clinical routine procedures. Celler and Bason [4] developed a hardware detector for Signal Processing

finding the P wave. In this instance a proper interfacing to the lead equipment is necessary, and, furthermore, a preprocessing of the QRS complex is assumed. The device is only valid for a single lead. P wave recognition in multilead E C G s with non-synchroneous onsets of the P wave in the leads requires postprocessing. Most of the known detectors use software programs operating on digitized 3 leads ECGs. A special kind of E C G s - i.e. the corrected orthogonal vectorcardiograms (VCG) - is often used in this connection, because of the good validity and reliability of the underlying lead model. More precisely, the detectors act on certain P wave parameters. Simple parameters separately calculated for each lead are amplitude, slope, curvature and time integrals. Spatial parameters representing the heart vector such as magnitude or spatial velocity may be used, too. Klusmeier et al. [5] examined the parameters mentioned above with regard to their ability to detect on- and offset of P waves. They found that the variances of these parameters are not small enough to enable correct decisions for wave recognition by only one of them. The authors conclude P wave recognition can be done only by employing a proper combination of the parameters. E C G s were often averaged to diminish the effect of random disturbances. As the E C G s taken from the very same patient vary in their shape this method cancels out the intra-individual variances, and distorted P waves result. A simple procedure for searching the P wave which avoids the mentioned difficulties can be developed by transformation of the heart vector into spherical coordinates.

K. Brodda, U. Wellner, W. Mutschler / Detection of P waves in ECGs

Representation of the heart vector in spherical coordinates The corrected orthogonal lead systems are based on the assumption that the cyclic electrical depolarization and repolarization of the heart can be represented as a time-dependent dipol vector, i.e. the heart vector. Frank's V C G lead system as a special kind of the corrected orthogonal lead systems yields the cartesian components X, Y, Z of the heart vector. The anatomical orientation of the related coordinated system is shown in Fig. 1.

eX

v

×

Fig. 1. Anatomical orientation of the cartesian coordinate system for the Frank leads. Unit vectors are denoted by e. If we denote the unit vector of the axes by ex, ey, e~ we obtain for the heart vector the following timedependent function: H(t) =X(t)ex + Y(t)ey +Z(t)ez.

The time course of X, Y and Z for a normal V C G digitized at a sampling rate of 400 Hz within the region of the P wave is drawn in Fig. 2. We can see that the X, Y, and Z-amplitudes form a poor bases for searching the P wave. C o m m o n computer programs use slope criteria to find the earliest onset and the latest offset of the P wave in anyone of the three loads (e.g. [6]). The small slopes at the times of beginning and ending

17

of the P wave are difficult to recognize and are sensitive to short-time baseline drifts. A related problem concerns the represensation of digitized VCGs. The common sampling rate for V C G r e c o m m e n d e d by the American H e a r t Association is no higher than about 500 Hz because of limited m e m o r y space often available and of the high computation speed needed. As we get a pointwise function after digitization we have to employ a certain procedure to produce a continuous function. We do this by linear i.nterpolation between the points. Then most noise signals will be intensified by any differentiating procedure, and thus slope criteria are not valid for finding the P wave. Other authors approximate the sampled points by a smooth curve, e.g. by a polynomial fit. However, such a procedure may considerably shift onset and offset of the P wave. As the cartesian coordinates X , Y, Z of the heart vector do not give valid criteria for searching the P wave we refer here to a representation of V C G s in spherical coordinates (see Fig. 3). As usual the Z axis indicates the direction of the North Pole (anatomically posterior). The azimuth ~¢ running in the frontal plane is the angle between the projection F of the instantaneous heart vector H onto the X Y - p l a n e and the positive X axis. It runs from 0 ° to 180 ° clockwise and from 0 ° to - 1 8 0 ° counterclockwise. The elevation O is the angle between the positive Z axis and the instantaneous vector H. The heart vector is then described by the three time-dependent quantities magnitude M, i.e. the length of the heart vector, azimuth ~; and elevation O. To convert the data from the cartesian system common transformation equations are used, as shown in Fig. 3.

The P,~ configuration Fig. 4 illustrates the time course of magnitude, azimuth and elevation of a normal Frank V C G displaying typical patterns of all three variables. The specially marked time interval clearly Vol. l. No, 1. Januar~ 1979

K. Brodda, U. Wellner, W. Mutschler / Detection o,f P waves in ECGs

18

10. (mv) 05"

×

00-

/l

-05

05](mV)

-05

004 -0 5 j P-onset 50

100

P-offset 150

200

250

300

350

TIME {msec ] Fig. 2. Typical time tracings of a digitized Frank M E G within the region of the P wave. The marked time interval was found by the P wave detector operating on spherical coordinates.

1 5"

E

ABOVE

:i

r~,0 D

i

P-W:,, ---

r !

o

-

IW

0 5 -

,80.

"t,

j

\

:

w

i

t'!,, '

= ° IllFINltiltltg!lTJi -1E~O

M = ~ ¥ BELOW

~

Lp = o r c t g

5

0 = arctg

z

Fig. 3. Representation of the heart vector H by the magnitude (vector length) Air, and the angles ¢ and ,9. ~¢ is the angle between the projection F of H onto the frontal (2(, Y-) plane and the positive S axis. ,.9 is given by the heart vector H and the positive Z axis. Signal Processing

I, 60

0

.

,

200

-

,

t.O0 TIME (reset)



,

600

,

800

Fig. 4. Time courses of the spherical coordinates magnitude azimuth ~ (PHI) and elevation O (THETA). A normal Frank VCG is shown. The origin of the time scale was arbitrary choosen.

19

K. Brodda. U. WeUner. IV. Mutschler / Detection of P wares in ECGs

corresponds to the P wave. The course of the angle azimuth is there characterized by a rapid rise and fall, and in the middle part by a variable shape above the zero line (the heart vector shows to anatomically inferior). The azimuth irregularly oscillates before and immediately after this interval. We call the mentioned pattern P~ configuration. If P~ represents the P wave we can easily understand the behaviour of the azimuth in this region. The depolarization of the atria origins at the sinu-atrial node which is located superior to the right atrium. A detailed study accomplished by Spach et al. [7] shows that the activation fronts in the right atrium are directed mainly inferior and anterior. These results are confirmed by the work of Selvester and Pearson [8] who noted that the initial vectors of the atrial depolarization are directed inferior, anterior and slightly leftward. Before the activation of the right atrium begins the heart vector obtained by the lead systems is not the zero vector. The heart vector is then isotropically distributed over all directions if it only is influenced by noise and not by systematic disturbances. The azimuth irregularly oscillates in accordance with the heart vector being situated inferior or superior of the horizontal plane. With beginning of the atrial activation, however, the heart vector immediately attains a component pointing to inferior. Therefore, the onset of the P wave is marked by a sudden rise of the azimuth followed by a course of low alterations with values above 0 °. Terminal P vectors are always superior and leftward and usually posterior [8, 9]. Therefore, the end of the P wave is indicated by a (often more moderate) fall of the azimuth. The course of the azimuth after the onset of the P wave corresponds to the P - Q segment in which the repolarization of the atria proceeds. In this region the angle more moderately oscillates. The angle at the beginning of the P - Q segment belongs to the so-called repolarization or Ta vector. Its value is a criterion for the validity of the P offset searching.

Azimuth is defined by ~ = a r c t g ( Y / X ) . In consequence the azimuth lacks any information contained in the Z lead. To investigate, whether the Z lead information would alter the estimation of onset or off~et of the P wave the authors used an angle/3 = a r c t g ( Y / Z ) with the Z axis as 0 ° direction [10]. T h e / 3 pattern is quite similar to the P,~ configuration. There were no significant statistical differences between Pt3 and P,~ patterns for the determination of the P onset. But the Pt3 configurations slightly earlier end than P,~. So we should prefer ¢, to/3 for recognition of P waves in angle patterns at least for normal VCGs. Some of the V C G s do not show P waves in any amplitude curves (X, Y, Z leads or magnitude curves). These V C G s regularly show the P,~ pattern (as an example see Fig. 5).

P-WAVE I ,

/

', I I

I

/~ I

/

180

0

-8o

,60

2Go

3Go

TIME {msec ) Fig. 5. Example of an V C G with a P wave which is not well visible in the magnitude curve. The course of the corresponding azimuth shows a well defined P~, configuration.

In this figure the azimuth does not strongly oscillate before the onset of the P wave. The mean value of azimuth is less than zero. The reason for this behaviour of the azimuth arises from baseline adjustments being not quite correct. It seems that the behaviour of the angle azimuth in the region between T offset and P onset is a sensitive indicator of correct baseline adjustments. VoL 1, No. 1, January 1979

20

K. Brodda, U. Wellner, W. Mutschler / Detection of P waves in ECGs

To test further the usefulness of the PC configuration we examined the stability of the pattern against disturbances caused by noise. For this purpose random n u m b e r s equidistributed within the interval [0, 1] were transformed so that they satisfy the normal distribution N(0; 0"2). 02 is the double of the m e a n value of the amplitude variances for the X, Y, Z leads within the time interval between T offset and P onset. As the m e a n of the distribution is zero only the variances of the baseline amplitudes are altered whereas the level of the baseline remained unchanged. In each case a tripel of that normal distributed random n u m b e r s gave the cartesian coordinates of a random vector which was added to the heart vector just at hand. The covariance of the coordinates of the added disturbance vectors was equal to zero, i.e. the disturbances are independent of each other referring to the single leads.

The results can be demonstrated by Figs. 6 and 7. The magnitude curve (Fig. 6) is so strongly disturbed that a reliable onset and offset of the P wave cannot be found. In contrast the P~ configuration (Fig. 7) is less distorted, and P beginning and ending may be recognized. The P onset would be shifted only by 10 msec using an automatic detector. However, filtering of the distorted curve (and in this case of the original curve also) is needed if we use an automatic recognition procedure. As unfiltered curves are shown the P offset point of the disturbed curve does not lie in the related local minimum.

-

t

~ o2 / [s,--o,~3 ~_ 0~ ~ v '

-°2 t

Is.:00,s

250

P-onset

150

P-o~set

SO

TJNE t,il ORSrnox ( rnsec )

Fig. 6. The influence of disturbances on the magnitude curve. The lower magnitude curve is disturbed by superposition of the heart vector with disturbance vectors. The upper magnitude curve results. A defined beginning and end of the P wave is no more visible. The marked time interval was found by the P wave detector using the P,~ configuration, s denotes the standard deviation of the noise signals. 180

90 m

..J z <

-90

-180

An estimation of the error propagation of additive noise in X and Y onto the angle ¢ would require knowledge of the functional (or the statistical) interdependence of X and Y which is given by the projection of the P loop onto the frontal plane. As this interdependence is of empirical nature we will refrain from an analytical evaluation of the condition numbers of the transformation process. We will rather provide a comparison between the algorithm's performance on sets of the original and disturbed VCGs. The m e a n value of the differences for P onset a m o u n t s to 2.7 msec with a standard deviation of 8.35 msec. The respective figures for P offset are - 3 . 1 9 msec and 10.0 msec. In comparison to the sampling interval of 2.5 msec this differences cannot be considered significant.

Klusmeier et al. [5] examined among other parameters the azimuth for its validity to search the P wave. They calculated the mean values for a number of VCGs in the region 20 msec before to 20 msec after P onset and P offset, respectively. The authors naturally did not find any differences of the mean azimuths within and outside this Signal Processing

180

90

"o

(.9 Z

90

P-onset

150

P- offset

50

TIME till ORSrnox (msec)

Fig. 7. The influence of disturbanceson the P~ configuration. The course of the azimuth belonging to the very same V C G as the magnitude curve shown in Fig. 6 is illustrated on the lower part of the figure. Disturbance of the heart vector results in the upper curve. The P,~ configuration is substantially preserved. The onset of P,~ found by the P wave detector is shifted only by 10 msec. As the detector operates on filtered curves it found the very same offset time of P in both cases.

K. Brodda. U. Wellner, W. Mutschler / Detection of P waves in ECGs

region, because of the oscillations mentioned above. For detecting the P wave, therefore, we have to search for the P,~ pattern and not for the change of a single parameter.

An algorithm for searching the P. configuration As the P,o configuration seems to be valid for searching the P wave we have to develop an algorithm to find the P,, configuration.

Methods and materials Although the P , configurations are present in a typical sample of clinical VCGs too. the algorithm was first developed on a set of normal VCGs. Records of 492 Frank VCGs were taken from 97 healthy adult men and women of different ages; from each of the subjects 4-7 heart beats. The three orthogonal leads, X, Y, Z were digitized at a sampling rate of 400 per second) Resolution of the analog-to-digital conversion was 10 bits. The VCGs were selected, those with strongly disturbed baselines were rejected. Baseline correction were done by approximating the real baseline by a piecewise linear function [11]. The noise contained in the X, Y, Z leads and also in M, ,¢ and a9 were filtered as needed (the tracings shown in Figs. 4 and 5 are unfiltered). A moving average filter was used which attenuated frequencies above 40 per second by a factor of 10. Comparison of filtered and unfiltered VCGs show that the filter shifted the beginning and ending of the P~, configuration back or forward no more than 5 msec (2 digitalization points).

The operation of the algorithm The algorithm Ap for searching the P wave works in the following manner: (1) For recognition of P,~ onset search the time "/'ORSof QRS maximum in the magnitude curve. Search the time TE,ma,~of the absolute maximum in the time interval [ T o R s - 2 0 0 . T o R s i00] (in msec) of the magnitude curve. These operations may lead to false results if the heart rate is higher or if isolated P waves are present. However, the P , configuration can be found without these data but this will lead to a more complicated algorithm being developed at present. It is additionally examined whether the maximum P~,, found is significantly larger than the amplitude oscillations in that region. (2) Search the time T,~m,,,of the filtered azimuth curve in the time interval [ T o a s - 2 0 0 , / ' o R s - 1 0 0 ] .

t We wish to thank Dr. Scheidt of the Institute of medical Statistics. University of Mainz for the kind permission to use these data.

21

(3) Look for the rise of azimuth over a certain number of digitization points (distances between the points 2.5 msec) at a certain time interval before T.~ma,,. This time interval is as long as i00 msec. The interval in which the azimuth should rise is at first as long as 17.5 msec (i.e. 7 digitization points). If no point is found from which the azimuth rises over those 7 points the time interval is shortened. The minimum interval in which the azimut h should rise contains three digitization points. It was empirically determined that most disturbance amplitudes in the azimuth curve rise or fall over 2-3 points. (4) If the search was unsuccessful the time interval to be examined for continuous rising of the azimuth is shifted to a larger time distance away from T,omax. Then the searching procedure is repeated. (5) If a time interval was found within which the azimuth continuously rises the time TA at beginning of this interval is compared with Tp,-,,a,,. If TA ~> Tpma,, the P,~ onset found is rejected, then go to step 4. In the other case TA < Tp . . . . TA is the time of P,~ onset. The search procedure to find P,~ offset is quite similar.

The computer program which executed the algorithm contained counters the first of which counted the number of cases with a certain size of rise interval. The second counter was related to the number of use of the TPmax criterion included in step 5 (see Table 1). Table 1 On the operating of the algorithm Ap. Slope interval means the interval in which the azimuth monotonously rises (for P,-onset) of monotonously falls (for Pc-offset). The column "'T~,,~a~ criterion" contains the number of cases for which the search had to be repeated because the conditions TA (time for Pconset)< TPma,~ or TE (time for P,o-Offset)> Tpma,, were not fulfilled. 492 VCGs were examined. Item

Size of slope interval (msec) Tpma,: Not 17.5 15.0 12.5 10.0 7.5 criterion found

P,:onset P,:offset

339 422

56 24

58 30

24 14

7 -

28 13

8

The determination of P,, onset or P,, offset, respectively, was done by finding a monotonous rise or a monotonous fall of the azimuth over 15 msec at least in 395 or 446 cases, respectively, of 492 cases total. The maximum P vector immediately belongs to the time interval between P onset and P offset in all these cases. Therefore, the typical P,~ configuration occurs in the vast majority of the V C G s examined. Vol. 1, No. l, January 1979

22

K. Brodda. U. Wellner. W. Mutschler / Detection of P waves in E C G s

Studies on the reliability of the algorithm Ap The reliability of the algorithm Ap for searching the P~ configuration was proved by comparison with the data taken from visual evaluation of the verb' same VCGs. 78 V C G s of 16 subjects were examined. The results are shown in Table 2. Table 2 Comparison of different procedures to find P wave beginning TA and end TE by visual evaluation V, by a common computer program C [12] and by the algorithm Ap. A random sample of 78 VCGs was used. Times given are related to the time of QRS maximum. The variances are partly given by biological existing variances (intraindividual and interindividual variances). Compared procedures

Mean values Variances (msec) f,msec) 2

Covari- Correlaances tion tmsec/2 coefficient

TAAp-TAV TEAp-TEV

208.0 207.5 396.2 351.2 254.6 106.7 108.0 430.9 224.8 156.6

0.683 0.503

T,,xAp-TAC TEAp-TEC

208.0 205.6 396.2 160.4 138.0 106.7 71.0 430.9 370.5 -20.9

0.547 -0.052

There are no significant differences of the mean values resulting from visual evaluation or from the operation of the algorithm Ap for the times of P~ onset or P~, offset, respectively. The linear correlation coefficients are significant for this comparison but it seems that a simple linear relation does not exist between the operation of Ap and the visual evaluation procedure. The t-test for the differences of variances concerning the determining of TA yield t = 0 . 7 2 which is not significant at a level p = 0.01 (t-test for dependent samples). Evidently, the algorithm has more difficulty to search the P~ offset. For this case the covariance is smaller, and the variance is larger. The reason is that the fall of the azimuth is not so pronounced as the rise at the beginning of the P,~. The n o n - t y p i c a l P,~ offsets can often be well recognized by visual evaluation but the algorithm finds them only with a larger error. Altogether it seems that the algorithm Ap finds the P,, configuration in a reliable manner. We Signai Processing

additionally have to examine whether the data found by searching the P,~ configuration agree with the respective results obtained by procedures operating on the cartesian coordinates of the heart vector. For this, we compared the output data of a c o m m o n computer program [12] which searched the P wave in the X, Y, Z leads for the very same VCGs. The last two rows of Table 2 show the results. There is no significant difference between the mean values concerning the search of P wave beginning. We cannot decide whether the comparatively small variance for the output data of the computer program is a good value. The biologically given variances might impermissibly be reduced. The computer program found the end of the P wave much later than Ap for the same VCGs. The mean values for the times differ by 35.7 msec. The computer program calculated a mean P wave duration of 134.6msec which seems to be too large. The algorithm computed the P duration as 101.3 msec. This value is in a better agreement with the data taken from literature. The visual inspection of respective V C G s also resulted in that the computer program in fact recognized the end of the P wave later than the end clearly visible in the magnitude curve. To test further the reliability of our procedure for searching the P wave we examined the socalled atrial T(Ta) vector which represents the effect of atrial repolarization. The azimuth of this vector is taken as the angle at the end of the P,~ configuration. Fig. 8 shows the distribution of the azimuth of Ta. As the distribution is sufficiently small it significantly differs from a isotropical one. The diagram shown is a so-called circular histogram which is more suitable to represent angle distributions than a linear histogram could do [13]. As in the linear histogram the areas of the circle sectors are proportional to observed frequencies. As there is rare information on the spatial distribution of the Ta vector in literature a direct comparison is impossible. On the other hand a comparison of the mean azimuths can be done. Giles et al. [14] determined this mean as - 1 1 4 °.

K. Brodda. U. Wellner, W. Mutschler / Detection o[ P wat'es in ECGs

23

-90 -120

-60

-150

\

-180

~

...

;

!!! ,,

I

/ /

90 Fig. 8. Circular histogram of the azimuth angles for the atrial repolarization vector T~. The class interval sizes are 10°. Note the quadratic measure in the radial direction. The areas of the circle sectors are proportional to the class frequencies.

Copeland et al. [15] calculated the value as - 1 1 8 °. Our results for the azimuth of the T~ vector was - 1 0 9 . 5 ° . Therefore, the mean magnitudes agree well. Moreover, the principal axis of the correlation ellipsoids calculated for the T~ vectors found do well agree with those given by Brody et al. [16]. Finally, the good reliability of our P wave searching procedure is also demonstrated by comparison of the P wave durations listed in Table 3. The variances of the determined P duration are quite large. However, they contain not only the error variance of the recognition procedure but also the intra- and interindividual biological variances. A more quantitative discussion of the reliability of the underlying recognition procedure

would require the separation of these variances. This is not possible without using strongly restrictive assumptions. Note, that the procedure which produces the smallest variance of the output data could have reduced the biological variances in an impermissible manner. The authors reported elsewhere on the estimation of the error variance of pattern recognition procedures and on the determination of a related reliability coefficient [25].

Concluding

remarks

The pattern of the V C G signal has large intraindividual and inter-individual variations. The Vol. 1. No. 1. January 1979

24

K. Brodda, U. Wellner, I~( Mutschler / Detection of P waves in ECGs

Table 3 Comparison of P wave durations Author

Lead system

Evaluation method Mean

Caceres and Kelser [18] Hiss et al. [19] Gross [20] Brody et al. [21] Draper et al. [22] Copeland et al. [15]

standard standard standard standard Frank McFee

Pipberger et al. [23] Yokota et al. [24] Pipberger [12] a own data a

Frank Frank Frank Frank

levels leads leads leads

visual visual visual visual and computer program cartesian coordinates, computer program cartesian coordinates, computer program

101.0 110.0 95.0 99.4 102.0 94.0

cartesian coordinates, computer program cartesian coordinates, computer program cartesian coordinates, computer program spherical coordinates algorithm Ap

101.0 98.4 125.9 102.0

P wave duration (msec) Standard deviation m

=15 =12.5 =16 [75, 11S] confidence interval for p = 0.05 =12 --14.6 =22.5 -'-25.3

a The P wave data were calculated for the very same sample of 484 VCGs. The data are not comparable with that of Table 2 as there was taken a sample of 78 VCGs.

heart vector obtained by the lead equipment is disturbed by noise and systematic alterations. For these reasons an electrophysiological definition cannot be given for the beginning and end of the P wave in the VCG. A more pragmatic definition would state that a suitable P wave detector should recognize the P onset in the V C G as soon as possible after the beginning of the atrial depolarization. A similar definition is valid for detection of P offset. As the azimuth is a more sensitive p a r a m e t e r for the directional adjustment of the heart vector than the corresponding magnitude the algorithm Ap operating on ~¢ fulfils the definitions given above. Ap finds the P wave even in such V C G s which exhibit no visible P waves in an}' amplitude curve. Although using spherical-like coordinate systems was occasionally proposed (for example by Abildskov et al. [17]) a closer examination especially of the time courses of the related angles is still outstanding. It is to hope that diagnostic questions unsolved up to now can be answered by further studies of the time course of the heart vector represented in spherical coordinates. Signal Processing

References [1] J.S. Duisterhout, J.H. van Bemmel, S.J. Hengeveld and G. van Herpen, "'Signal processing and waveform analysis", Progress report 3. Inst. Med. Phys. T.N.O, Utrecht. Netherlands, 1972. [2] C. A. Swenne. J.H. van Bemmel, S.J. Hengeveld and M. Hermans, "'Pattern recognition of ECG-monitoring: an interactive method for the classification of ventricular complexes", Comput. Biomed. Res., Vol. 6, Apr. 1973, pp. 150-160. [3] T.P. Taylor and P.W. Macfarlane, "'Digital filtering of the e.c.g. - a comparison of low-pass digital filters on a small computer", Med. Biol. Eng., Vol. 21, 1974, pp. 493-500. [4] B.C. Celler and P.T. Bason, "Hardware detection of P-waves in the electrocardiogram". Med. Biol. Eng., Vol. 14, No. 5, Sept. 1976, pp. 501-508. [5] S. Klusmeier, H. Klinkers, P. Friedrichs and C. Zywietz. "Comparison of different algorithms for P-onset and Poffset recognition in ECG programs", Adv. Cardiol., Vol. 16, 1976, pp. 221-226. [6] R.E. Bonnet and H.D. Schwetman, "A computer program for ECG measurements", in: Computer diagnosis of electrocardiograms. IBM, Technical Report, Vol. 17. 1967, pp. 11.1-11.35. [7] M.S. Spach, T.D. King, R.C. Barr, D.E. Boaz, M.N. Morrow and S. Herman-Giddens, "Electrical potential distribution surrounding the atria during depolarization and repolarization in the dog", Circ. Res., Vol. 24, Jun. 1969. pp. 857-873.

K. Brodda, U. Wellner. W Mutschler / Detection of P waves in ECGs

[8] R.H. Selvester and R.B. Pearson. "'High-gain averaged atrial vector-cardiograms", Proc. Xlth Int. Vectorcardiography Symposium, New York, USA, May 15-17, 1970, pp. 689-696. [9] T. Chou and R.A. Helm. Clinical Vectorcardiography, Grune and Stratton, New York and London, 1970. pp. 50-52. [10] K. Brodda U. Wellner, W. Mutschler and H.-J. yon Mengden, "'On using angle patterns for wave recognition". Adv. Cardiol., Vol. 16, 1976, pp. 217-220. [11] U. Wellner and K. Brodda, "'Sensitivity of VCG parameters to baseline adjustment procedures". Adv. CardioL, Vol. 16. 1976, pp. 265-268. [12] H.V. Pipberger. "'Automated ecg analysis system". VA Research Center [or Cardiovascular Data Processing, Veterans Administration Hospital. Washington, 1971. [13] K. Brodda. "'Deskriptiv-statistische Methoden fiir richtungsabh~ingige Gr/513en", E D V in Medizin und Biologie, Vol. 6, No. 4, 1975. pp. 110-117. [14] T.D. Giles, A.C. Quiroz, G.E. Sanchez and G, Butch, "'The influence of recording technique on the normal atrial vectorcardiogram", Amer. J. Cardiol., Vol. 26, Aug. 1970. pp, 165-169. [151 G.D. Copeland. A.B, McEachran, H.W. Smith and D.A Brody. "'The McFee-Parungao (axiall vectorcardiogram in normal subjects", Amer. Heart J., Vol. 86, Jul.. 1973, pp. 42-50. [16] D.A. Brody, J. Cox, A.B. McEachran, H.H. Giles and V.J. Ruesta, "'Spatial parameters and shape factors of the normal atrial vectorcardiogram and its scalar components". Circulation, Vol. 39, Feb. 1969, pp. 229242. [17] J. Abildskov, W. Ingerson and B. Hisey, " A linear time scale for spatial vectorcardiographic data", Circulation, Vol. 14, No. 4. Part 1. 1956, pp. 556-567.

25

[18] C.A. Caceres and G.A. Kelser. "Duration of the normal p-wave", Amer. J. Cardiol., Vol. 3, No. 4, Apr. 1959. pp. 449--452. [19] R.G. Hiss, L.E. Lamb and M.F. Allen, "Electrocardiographic findings in 67,375 asymptomatic subjects. X. Normal values", Amer. J. Cardiol., Vol. 6. Jul. 1960, pp. 200-231. [20] D. Gross, "'Correlation between the shape of the P-wave and the length of the P-R interval in normal electrocardiograms", Amer. HeartJ., Vol. 62, Nov. 1961. pp. 606610. I21] D. Brody, R. Arzbaecher, M. Woolsey and T. Sato, "The normal atrial electrocardiogram: Morphologic-and quantitative variability in bipolar extremity leads", Amer. HeartJ., Vol. 74, July 1967, pp. 4-12. [22] H. Draper, C. Pfeffer, F. Stallmann, D. Littmann and H.V. Pipberger, "The corrected orthogonal electrocardiogram and vectorcardiogram in 510 normal men (Frank lead system)", Circulation, Vol. 30, Dec. 1964, pp. 853864. [23] H.V. Pipberger, M.J. Goldman, D. Littmann, G.P. Murphy, J. Cosma and J.R. Snyder, "'Correlations of the orthogonal electrocardiogram and vectorcardiogram with constitutional variables in 518 normal men", Circulation, Vol. 35, Mar. 1967, pp. 536-551. [24] M. Yokota, Y. lshibe, K. Yamauch, H. Tanimura, Y. Watanabe, I. Sotobata and S. Yasui. "'Sex and age differences of normal P loops in the Frank lead vectorcardiogram", Jpn. HeartJ., Vol. 18, No. 1. Jan. 1977, pp. 1-16. [25] U. Wellner and K. Brodda, "'On the reliability of pattern recognition algorithm for VCGs", Proc. X I X Int. Symposium on Vectorcardiography, Glasgow, Scotland, Sept, 5-8, 1978, in press.

Vol. I. No. l, January 1979