Automatic Recognition of Electrocardiographic Waves by Digital Computer By FRIEDEMANN W. STALLMANN, SC.D., AND HUBERT V. PIPBERGER, M.D. A Downloaded from http://circres.ahajournals.org/ by guest on June 18, 2017 PPLICATIONS of electronic computers .in analysis of medical and biological data are of increasing interest. Large-scale computers offer the advantages of high speed of operation, relatively great accuracy, and extreme versatility. Great amounts of data can be processed in a relatively short time. Thus, extensive statistical studies, mass screening of the population, and data handling in large medical centers should be facilitated. The electrocardiogram was chosen for a pilot study in automatic processing of medical data because of its widespread use as a diagnostic aid. Since even the largest available digital computers are limited in memory capacity, a study in data reduction had to precede the data processing proper. It could be shown that corrected orthogonal three-lead electrocardiograms contain the same clinical information which is being used in conventional 12-lead analysis.1 Thus, data reduction by a factor of 4:1 could be accomplished without sacrificing clinical information. An automatic procedure for electroeardiographic data conversion from the original analog into digital form has been described previously.2 Commercially available digital computers can be used, once the electrocardiogram is converted into proper digital format. Since the electrocardiogram consists of several distinct wave forms with different electrophysiological significance, the prime objective of any automatic electrocardiographic analysis has to be the development of a computer program which allows automatic recognition of each electrocardiographic wave. Their beginning and end have to be determined accurately in order to obtain measurement^ of duration of the complexes and of the time intervals in between them. Although automatic screening of electrocardiograms for certain abnormalities is feasible when the time interval over a complete cardiac cycle is obtained, 3 a detailed analysis of the electrocardiogram is not possible without proper identification of each wave. An automatic procedure which allows accurate determination of beginning and end of P waves, QRS complexes, and end of T waves is described in the present report. The computer program was successfully tested in a series of 395 electrocardiograms. Methods Out of a total of 395 eleetroeardiographie records used for the present study, 173 were read as normal and the remainder as abnormal. The technically poorest records were selected from a taperecorded electrocardiogram library of approximately 2,500 cases. In most of these tracings, a large amount of interference, such as 60-eycle A.C. noise and/or muscle tremor, was present. It was felt that an automatic wave recognition program could be tested more rigidly with technically poor tracings. Frequently, small signals, such as P and Q waves, were hardly visible. Although the amount of noise in most records was much greater than that of average tracings in clinical electroeardiography, it is common experience that under unfavorable conditions such tracings may be encountered. Since the described procedure is proposed for routine use, such unfavorable conditions have to be taken into account. From the Veterans Administration Hospital, Mt. Alto, and the Department of Medicine, Georgetown University, School of Medicine, "Washington, D. C. Supported in part by a research grant of the American Heart Association and a Public Health Service research grant (H-4576) of the National Heart Institute. Work performed under contract with the Heart Disease Control Program, U. S. Public Health Service. Presented at the Fifth Annual Meeting of the Biophysical Society, February 16 to 18, 1961, St. Louis, Missouri. Received for publication May 11, 1961. 1138 Circulation Research, Volume IX, November 1961 ELECTROCARDIOGRAPHS "WAVES 1139 V/1 Downloaded from http://circres.ahajournals.org/ by guest on June 18, 2017 Figure 1 Frequency response function of the filtering procedure used for elimination of noise. The ordinate (F) indicates the ratio between filtered and unfiltered electrocardiographie signals for the frequencies shown on the abscissa. For details of the procedure, see Appendix. Sehmitt's SVEC III lead system4 was used in 130 records. The remainder were taken with Frank's lead system.5 For the purpose of wave recognition, the choice of a specific lead system is of no consequence. The three orthogonal leads were recorded simultaneously on magnetic analog tape, using FM channels as previously described.2 A special purpose analog-to-digital converter0 was used for digitizing the records. The sampling rate was 1,000 per second for each lead. A threelead record of one cardiac cycle, comprising P, QRS, and T, contains 1,800 digits on the average. For further numerical analysis, an IBM 704 digital computer was used. First, a filtering procedure was required hecause of the large amount of noise. The initial process consisted, therefore, in determination of the frequency spectrum of electrocardiographie signals and noise. It was found that the signal-tonoise ratio was high below and low above 60 c.p..s. An essential part of the noise consisted of 60 c.p.s. interference and its higher harmonics. Frequencies above the 60-c.p.s. level had to be eliminated, therefore. The frequency response function for the filtering of the records is shown in figure 1. Details of the computational process are given in the appendix to this report. Figure 2 shows a typical example of the performance of the filter. The noise superimposed on the electrocardiographie records was almost completely eliminated. However, the electrocardiographie signals, especially the time of beginning and end of each wave, •were not significantly affected. Computation of time intervals in filtered and unfiltered records, therefore, were identical. After determining the Circulation Research, Volume IX, November 19G1 Figure 2 The three electrocardiographie records on top represent three orthogonal leads (y, x, z from top to bottom). Underneath the tracings shown in heavy lines are enlarged plots of the P wave (middle) and QRS complex (beloiv) of the digitized lead x. The same wave forms are shown after the filtering procedure as thin lines. Note that the extraneous noise of the original records is almost completely eliminated, whereas the electrocardiographie signals are not noticeably affected. time limits of all waves, the points were transferred to the original unfiltered electrocardiogram. Thus, the higher frequency components which might have been suppressed in the filtering process were maintained for further analvsis. 1140 STALLMANN, PIPBERGER Table 1 Comparison Beticeen Computed and Visual Measurements of Electroccirdiographic Wave Durations and Time Intervals Obtained from 106 Records' Computed minus visual determinations of wave durations and time intervals P wave P-R interval 23 7 9 16 44 1 0 0 2 5 16 58 14 5 More than -f" 32 msec. Between -f- 32 and + 24 msec. Between -f- 24 and + 16 msec. Between -+- 16 and -f- 8 msec. Between + 8 and — 8 msec. Between — 8 and — 16 msec. More than — 16 msec. QRS duration Q-T interval 6 9 24 42 19 0 0 19 9 11 25 30 4 3 *For method of measurement, see text. Downloaded from http://circres.ahajournals.org/ by guest on June 18, 2017 Beginning and end of eleetrocardiographic waves can be defined through voltage changes of the orthogonal leads Ax, Ay, Az per unit time At. Ax = x(t + At) — x(t), etc. Since the three orthogonal leads are considered as scalar components of a vector loop in three-dimensional space, the three voltage changes can also be combined to a vector whose magnitude is called spatitil velocity V. V = A/AX 2 + Ay- + Az2 At This entity proved very useful for wave recognition. Spatial velocities exceeding 3 /xY per msec, were found only in P waves, QRS complexes, and T waves but not during T-P and P-R intervals or S-T segments. For a given cardiac cycle, the computer then proceeded as follows: 1. The point where the spatial velocity Y reached a maximum was determined. In cases where the same maximum, value was reached more than once, the first maximum was used. 2. Starting from the point determined first, V was determined in forward and backward direction until values below 3 /xY per msec, were found. These points were defined as beginning and end of QRS, respectively. 3. From the beginning of QRS, V was determined again in retrograde direction until a value exceeding 3 /xY per msec, was found. This point indicated the end of the P wave. If such a value for V was not found, it was assumed that no P wave was present. 4. In records with P waves, the computer started determinations of V from the beginning of the tracing until the same critical value for Y was exceeded. This point was defined as the beginning of the P wave. In cases where this point differed from the end of P by a few milliseconds only, it was assumed that the beginning of P had been missed. 5. Starting at the end of the record, V was determined in retrograde direction until the specified value for V was exceeded. This point indicated the end of the T wave. Since the beginning of T waves is poorly defined and not used in clinical electrocardiography, a search for this point was not included in the computer program. Computation time for the entire wave recognition program was, on the average, 15 seconds for each record. Results At first, the computer results were compared with the analog records iu order to determine whether all waves present iu the tracings had beeu properly identified. The findings were as follows: 1. In 22 cases, no P wave had been recognized by the computer. The analog records of these cases showed premature ventricular systoles without preceding P waves in 10 instances. In nine further cases, auricular fibrillation was present. The regular P waves had been replaced by irregular F waves of small amplitude. Three additional cases showed nodal rhythm with P waves hidden in the QRS complex. In all cases with normal sinus rhythm, the P waves had been properly identified. 2. In nine cases, the beginning of P waves had not been recognized by the computer. Six of these were premature ventricular systoles, and two records showed auricular fibrillation. F waves or other unidentified potential changes preceding QRS had apparently been strong enough to exceed the set limits of spatial velocity for a short period of time. A Circulation Research, Volume IX, Novrmber 1901 ELECTROCARDIOGRAPHS WAVES Downloaded from http://circres.ahajournals.org/ by guest on June 18, 2017 further ease showed a "wandering pacemaker." The beginning of P was missed by the computer because of a very gradual onset of this wave. The potential changes were only strong enough during the downstroke to exceed the limits of spatial velocity. 3. In five more cases, the analog records showed auricular fibrillation, but the computer had identified P waves of extremely long duration. 4. In four out of a total of 16 complexes representing premature ventricular systoles, the end of QES was not properly identified. The QRS complexes were followed immediately by T waves without S-T segments. In these cases, either the QRS-T was taken by the computer as one complex, or the peak of T was mistaken as end of QRS. 5. The end of QRS was falsely determined in one case with right ventricular conduction defect where the QRS contained a plateau without potential changes. This plateau was falsely recognized as end of QRS. Thus, not more than 24 points were falsely determined by the computer. This figure represents 1.3 per cent of a total of 1,911 points expected to be determined. In a further test, a random sample of 106 records out of the total series was selected for a more exact comparison between computed and visual measurements. The original three orthogonal leads were reproduced from magnetic analog tape, displayed on an oscilloscope screen, photographed on 35-mm. film, and enlarged five times for viewing. This display allowed consistent visual time measurements with a maximal accuracy down to 5 msec. Differences between visual measurements and computer results are listed in table 1. The following three major types of discrepancies were found: 1. QRS durations obtained from the computer were systematically longer. This discrepancy was due to the gradual ending of the complex which can hardly be pinpointed visually. 2. In about 20 per cent of the cases, the computed Q-T interval was eonsiderabty longer than that obtained visually. In all these cases, Circulation Research, Volume IX, November 1861 1141 Table 2 Ten Consecutive Cardiac Cycles of Three Randomly Selected Records Measured by Three Independent Readers* Tracing number 4-58 7-58 7-60 4-58 7-58 7-60 4-58 7-58 7-60 4-58 7-58 7-60 ECG time interval measured P P P PR PR PR QRS QRS QRS Q-T Q-T Q-T Maximum discrepancies between 10 consecutive cardiac cycles [1 reader] (msec.) 25 11 14 29 10 17 10 14 11 28 22 18 Maximum discrepancies between measurements of 3 independent readers [10 cardiac cycles] (msec.) 25 21 24 32 10 21 14 14 14 35 29 32 *If consistency in measurements is assumed for each reader, the second column from the right indicates variability in duration from one heart beat to the next. Results in the last column indicate discrepancies between the three readers for the same records. small potential changes followed the T waves which had not been recognized visually. Whether or not these potential changes belonged to the T waves or represented small U waves could not be determined. 3. In about 20 per cent of the records, the computed P duration was also considerably longer than that determined visually. This difference was due to small potential changes during the P-R segment. In a third test, the discrepancies between visual and computed measurements were compared with the beat-to-beat variability of wave durations and with the consistency of visual time measurements for different observers. The results of this comparison are given in table 2. Ten consecutive cardiac cycles in each of three randomly selected records were measured by three independent readers. Differences in time measurements of a sequence of cardiac cycles were largest for Q-T intervals, P-R intervals, the P durations, in decreasing order. Even for QRS complexes, with their more abrupt onset, differences of up to 14 1142 msec, were found in 10 consecutive heart beats. Discrepancies between different observers were also largest for Q-T intervals and smallest for QRS complexes. Downloaded from http://circres.ahajournals.org/ by guest on June 18, 2017 Discussion With the described method for automatic electrocardiographic wave recognition by digital computer, the durations of P waves, P-R intervals, P-R segments, QRS complexes, and Q-T intervals are obtained. These data are the basic parameters of any ECG analysis. In addition, the separation of the different waves provides the basis for a more detailed analysis of each of them. Since in the described procedure the computer determined the beginning and end of electrocardiographic waves by the use of only one measurement, the spatial velocity, a failure rate of 1.3 per cent appears very small. Except for one case with right ventricular conduction defect, failures of the method were encountered only in cardiac arrhythmias. Automatic analysis of irregularities in cardiac rhythm will require a new set of computer instructions which is being prepared at present. The described procedure can serve as the basis for such a program. Even in its present form, with a failure rate of 1.3 per cent, the described procedure can be recommended for large-scale statistical and epidemiological studies where such a failure rate cannot be considered excessive. The beginning and end of electrocardiographic waAres were not noticeably changed through the relatively strong filtering procedure. Since it is known, however, that electrocardiograms may contain higher frequency components7 which are affected by the filter, it is necessarjr to transfer the computed endpoints of each wave to the original unfiltered record. Thus, higher frequency information content is maintained for further analysis, and the filtering procedure is used as an intermediary step only. The systematic discrepancies between computed and visual determinations of the end of P, QRS, and T appeared to be due to true potential variations. These variations were too STALLMANN, PIPBBEGER small to be recognized visually when enlargements of analog records, as described above, were used. These enlargements, however, were considerably greater in size than conventional tracings used in clinical electrocardiography. It remains an open question whether, in these cases, the computed or visual measurements represent " t r u e " wave durations. It is fairly simple, however, to modify the described computer program in order to simulate visual measurements. This will require only an increase in the critical value for spatial velocity for wave recognition. When the limits of visual accuracy and beat-to-beat variations in wave duration were taken into account, the computed results indicated a satisfactory agreement with visual measurements. The discrepancies between visual readings of different observers emphasize the importance of consistency. In this respect, the performance of the computer is superior to that of the electrocardiographer because a constant mathematical term is used for delineation of electrocardiographie waves. Summary A digital computer program for automatic recognition of electrocardiographic waves has been described. First, a filtering procedure was applied in order to eliminate extraneous noise. Consequently, the spatial velocity derived from three orthogonal electrocardiographic leads was determined for an entire cardiac cycle. It was found that a critical value of 3 /xV per msec, was never exceeded during T-P intervals, P-R segments, and S-T segments. This limit for the spatial velocity could be used to indicate the beginning and end of electrocardiographic waves. The method was tested in a series of 395 records. The computer failed in 1.3 per cent of all expected measurements. With one exception, failures were encountered only in eases with cardiac arrhythmias but not with regular sinus rhythm. Comparison between computed and visual time measurements showed close agreement, especially when limits of visual accuracy and beat-to-beat variations in wave duration were taken into account. The described Circulation Research, Volume IX, November 1961 ELECTROCARDIOGRAPHIC WAVES procedure can serve as the basis for a complete electroeardiographic analysis by digital computer. Appendix A filter is mathematically a transformation of time series. Let x(t) be a function of time given for the points t = 0, ± 1 , ± 2 , . . . . , which represents a signal disturbed by noise. By choosing a suitable computational process, the function x(t) can then be transformed into another function of the same type x*(t), which is assumed to be a better representation of the original signal. If we restrict ourselves to linear and finite filters, since the computer can perform only finite operations, the filter procedure can be written explicitly as 1143 This gives = 32- ( 1 + ~ COS I 6 r ) ' T _ _ 1 = 16 . ~ "64' The frequency response function is then F(a.) = — sin 16 cotg — 2 sin COS u) - COS 7T as shown in figure 1. Downloaded from http://circres.ahajournals.org/ by guest on June 18, 2017 +N References 1. PIPBERGER, H . V., BlALEK, S. M., PERLOPT, J . K., AND SCHNAPER, H. W.: Correlation of clinical T = -N This is a moving average type of operation with a weight function g(r). If x(t) is a pure harmonic function i <o t x(t) = C e then x*(t) is also pure harmonic x«(t) = 0( u ) - C e ' " with 0(M) z= r((,)) e information in the standard 12-lead ECG and in a corrected orthogonal 3-lead ECG. Am. Heart J. 61: 34, 1961. 2. PlPBERGER, H . V., FREIS, E . D., TABACK, L., AND MASON, H. L.: Preparation of eleetro- cardiographic data for analysis by digital electronic computer. Circulation 21: 413, 1960. 3. PIPBERGER, H. V., ARMS, R. J., AND STALLMANN, = _^> g (T) e T = -N Here F(<o) indicates the frequency response function and 8 (<i)) the phase shift introduced by the filter. The phase shift is zero if, and only if, the weight function g ( r ) is symmetric g(-r) = g(r) • Only such filters will be considered here. The weight function g(r) can be chosen so that F (to) has given values onN + 1 points &> = k— , k = 0, 1, 2 , . . . . N. In our case, the main part of the noise was close to — (sampling rate 1,000/s : 16 16 ~ 60 c.p.s.) and its higher harmonics. Therefoi'e, we have chosen N = 16 and - .. _ 1 for k = 0, 1 16 ; 0 for k = 2, 3,....16 . Circulation Research, Volume IX, November 1961 F. W.: Automatic screening of normal and abnormal electrocardiograms by means of digital electronic computer. Proc. Soc. Exper. Biol. & Med. 106: 130, 1961. 4. SCHMITT, O. H., AND SIMONSON, E.: Present status of veetorcardiography. A.M.A. Arch. Int. Med. 96: 574, 1955. 5. FRANK, E.: Accurate, clinically practical system for spatial veetorcardiography. Circulation 13: 737, 1956. 6. TABACK, L., MARDEN, E., MASON, H. L., AND PIPBERGER, H. V.: Digital recording of electrocardiographie data for anatysis by digital computer. IRE Transactions on Medical Electronics ME-6: 167, 1959. 7. LANGNER, P . H., JR., AND GESELOWITZ, D. B.: Characteristics of the frequency spectrum in the normal electrocardiogram and in subjects following myocardial infarction. Circulation Research 8: 577, 1960. Automatic Recognition of Electrocardiographic Waves by Digital Computer FRIEDEMANN W. STALLMANN and HUBERT V. PIPBERGER Downloaded from http://circres.ahajournals.org/ by guest on June 18, 2017 Circ Res. 1961;9:1138-1143 doi: 10.1161/01.RES.9.6.1138 Circulation Research is published by the American Heart Association, 7272 Greenville Avenue, Dallas, TX 75231 Copyright © 1961 American Heart Association, Inc. All rights reserved. Print ISSN: 0009-7330. Online ISSN: 1524-4571 The online version of this article, along with updated information and services, is located on the World Wide Web at: http://circres.ahajournals.org/content/9/6/1138 Permissions: Requests for permissions to reproduce figures, tables, or portions of articles originally published in Circulation Research can be obtained via RightsLink, a service of the Copyright Clearance Center, not the Editorial Office. Once the online version of the published article for which permission is being requested is located, click Request Permissions in the middle column of the Web page under Services. Further information about this process is available in the Permissions and Rights Question and Answer document. Reprints: Information about reprints can be found online at: http://www.lww.com/reprints Subscriptions: Information about subscribing to Circulation Research is online at: http://circres.ahajournals.org//subscriptions/
© Copyright 2026 Paperzz