ELECTROCARDIOGRAM ANALYSIS
BY THE
BECKMAN INTEGRATED COMPUTING SYSTEM
COMPUTER OPERATIONS
CONTENTS
I. Summary-1
II. Introduction-2
IIL. Brief description of the heart and the
Electrocardiogram Analysis-4
IV. Program Analysis-7
V. Appendix 1-9
A. The Peak Follower Circuit
B. Use of Analog Comparators in the
Analysis of Waves
VI. Appendix 2, Hybrid Fortran II Sequence-12
VII. Appendix 3, References-23-
I. SUMMARY
The electrocardiogram is a valuable tool in assisting the doctor
in his diagnosis of coronary disease. Current procedures require the
doctor to be skilled in reading and interpreting these electrocardiograms,
with analysis primarily based on visual examination and comparison with
previous and/or "normal” ECGs.
To free the doctor from much of the time-consuming visual analysis
and at the same time provide a more thorough examination at less expense
to the patient, analysis of the electrocardiogram by an integrated analog-
digital computer is proposed. Each part of the integrated computer would be
used to accomplish the task for which it is best suited--the analog section
to process and analyze the data and the digital section to diagnose the results.
For a purely digital machine to perform this same task in a comparable length
of time would require a considerably more expensive installation. With a
hybrid computer available at a central laboratory the family doctor could
analyze electrocardiograms as routinely and inexpensively as he now takes
blood samples.
- 1 -
II. INTRODUCTION
The amount of information about the heart that can be gleaned
from the electrocardiogram is impressive. Use of this tool could be
extended and its expense reduced if the doctor did not have the time-
consuming task of visually examining each cardiogram. This factor is
particularly important when large numbers of such graphs are to be
analyzed for statistical studies.
In the past digital computers have been used to analyze ECGs.
This offers the obvious advantage of having the input data as a readily
referenced, statically stored time series. The programmer can then, in
affect, retrace the data and refer to it numerous times during a decision
process. The data can be pre-edited and different decision criteria can be
applied a second time to account for all possible variations in the data.
However, the all-digital program is slow and expensive because the nature
of the input data is not the type desired.
Consider such a program being demonstrated on the hybrid com¬
puter--the computation of the variability of the electrocardiogram. The
original data is a multi-channel electrocardiogram which can be recorded
on an instrumentation-type tape recorder or fed directly into the analog
subsystem of the computer. The desired input data for the diagnostic
program is a digital listing of the amplitudes and durations of the component
waves of each beat of the cardiogram. A comparison of the information
content of the input data with that desired will give an indication of the mass
of data being handled unnecessarily in a pure digital machine. The input
data is an analog signal with a frequency range of 0. 1 to 100 cps and a
desired resolution of 0. 1 percent. Using these specifications, one minute
of single-channel cardiogram would represent about 600, 000 bits of informa¬
tion. Since the desired information consists of 15 data values per beat or
approximately 20, 000 bits, only about 5 percent of the input data is actually
needed. If 95 percent of the input data to the digital machine can be elimi¬
nated, there are the obvious advantages of a simplified digital program and
a speedup in the processing time.
r
- 2 -
The analog computer is a dynamic device with limited storage
capabilities and is therefore essentially a one-pass data processor. However,
it is ideally suited for processing large quantities of time-variant data such
as the electrocardiogram which is really an analog signal. Thus it is logical
( 3 )
to program the electrocardiogram analysis on a hybrid computing machine.' '
The desired data is extracted by the analog section of the hybrid computer and
sent to the digital section for storage and analysis. The problem can then be
solved in the most efficient manner using each section of the hybrid machine
to accomplish those tasks for which it is best suited.
- 3 -
III. A BRIEF DESCRIPTION OF THE HEART
AND THE ELECTROCARDIOGRAM ANALYSIS
( 1 , 2 )
The heart is a muscular pump of marvelous efficiency. Even
during sleep the heart pumps some two ounces of blood with each beat,
nearly five quarts per minute or 75 gallons per hour. When an individual
is moderately active the heart doubles its output, and during strenuous
exercise the heart’s output may reach 14 barrels per hour. The heart
is really a double pump, each side of which consists of an antechamber,
called the atrium, and a ventricle. The right heart pumps used blood
from the veins to the lungs via the pulmonary artery. There the blood
discharges some carbon dioxide and absorbs oxygen. Then, traveling
through the pulmonary veins to the left heart, the blood is pumped out
through the aorta to all parts of the body. The ventricles fill up with blood
from the atria which act mainly as reservoirs. The muscular walls of the
ventricles cause most of the pumping action.
The pacemaker that causes the heart muscle to maintain its
rhythmic beat is located in the heart itself. Just before each heart contrac¬
tion a low intensity electrical impulse is initiated in a small knot of tissue
on the rear wall of the right atrium called the sino-atrial or S-A node.
This impulse travels over the atria exciting the muscle fibers to produce
contraction of the atria. It also reaches another tissue knot called the
atrio-ventricular or A-V node where the impulse is delayed about seven
hundredths of a second before traveling through the ventricles and causing
them to contract. Electrical currents generated by these impulses spread
from the heart into surrounding tissue and then to the surface of the body.
An electrocardiogram is a recording of these electrical potentials generated
by the heart and is obtained by placing electrodes on the body on opposite
sides of the heart. For the standard electrocardiogram, there are three
electrical connections--to the two arms and the left leg. Changes in the heart
can cause abnormal electric currents and thus alter the shape of the electro¬
cardiogram. Thus the ECG becomes an important tool in detecting abnor¬
malities of the heart.
- 4 -
Examination of the normal electrocardiogram shows that there
are five waves (P, Q, R, S, T) associated with each heart beat (Fig, 1).
The spacing between these waves and between heart beats is a function of
heart rate. Normal heart rates vary from 40 to 120 per minute and the
P, Q, R, S, and T waves are from 0. 600 to 0. 300 seconds in total duration
followed by an iselectric or baseline period of inactivity. The P wave is
caused by electrical currents generated as the atria depolarize prior to
contraction. The three waves known as the QRS complex are caused by
currents generated when the ventricles depolarize before contraction. The
T wave is caused by currents generated as the ventricles recover from the
states of depolarization and is known as a repolarization wave.
In disease conditions the P wave can be irregularly, regularly, or
randomly associated with the Q, R, S, and T waves; the P wave may even
overlap with the other waves. Q, R, S, and T waves are always closely
associated though they can be distorted. Irregular rhythms and unusual
variance of wave shapes must be detected as abnormal by the computer, but
it is not necessary that they be identified by diagnostic category. The five
waves described may thus vary in amplitude and duration and a series of
waves may vary in frequency. These parameters --amplitudes, duration,
and frequency--form the essential basis for the electrocardiographic know¬
ledge about the position and state of the heart. In the particular program
being demonstrated, the following parameters are measured for each cardio¬
gram lead; Amplitudes of P, Q, R, S, T, and average of ST; durations of
PR, Q, QRS, QT andRR.
It should be pointed out that the electrical impulse to be measured
on the cardiogram is in reality a vector and the three standard cardiograms
taken are measurements of two components of the vector. In a normal heart
the average direction of the heart vector during spread of the depolarization
wave (mean electrical axis of the ventricles) is approximately 59 degrees
(measured clockwise in the frontal plane with the zero vector taken as
horizontal and directed toward the individuals left side). The problem of
determining the average direction and amplitude of this vector is complicated
by the fact that the heart position varies in different individuals and is some¬
what dependent upon their build. It can be as low as 20 degrees or as high as
90 degrees and still indicate a normal heart. On the other hand, many patho¬
logic conditions of the heart can shift the axis much more than this amount.
-5-
MILLIVOLTS
1 sec.
Figure 1. The Normal Electrocardiogram.
- 6 -
IV. PROGRAM ANALYSIS
The program for carrying out the electrocardiogram analysis
on the hybrid computer can be broken down into three main sections:
(1) Extraction of the required information from the input data by the analog
section and transmission to the digital section of the hybrid machine;
(2) the diagnostic analysis of these measurements by the digital section; and
(3) the upgrading of the diagnostic parameters throiagh analysis of the char-
actertistics of the normal ECGs examined.
As mentioned in the previous discussion, eleven different wave
amplitudes and durations for each cardiogram lead are to be measured by
the analog and transmitted to the digital section in this demonstration program.
The block diagram for this part of the program is given in Figure 2. The
input data from the three electrocardiogram leads is fed into the analog
section to a signal combination and resolution circuit. There the voltages
are resolved into a total wave along the major axis of the heart. Use of
this total wave assures that the signal used to locate the wave peaks is
essentially free of variation caused by heart orientation.
By means of appropriate switches, information can be taken from
any of the three leads or from the total wave. For demonstration and infor¬
mation purposes, these various waves can also be displayed on the polar
scope.
The total wave and its approximate derivatives are used to synchro¬
nize and gate the analog measurement of wave durations and peaks. The
basic logic signals for this analysis are obtained from comparators. The patch
logic gates are used to combine these basic logic signals for the purpose of
controlling the analog computing channels by means of electronic switches
and relay drivers. Some of the logic level changes are used to interrupt the
digital section and cause entry into data transfer subroutines. Logic levels
are communicated to these subroutines by the test lines which may be patched
on the logic board. Logic level changes are made on the basis of signals
from the digital computer section. Hybrid FORTRAN II recognizes the
statements CALL SIGNAL (n) and TEST (n). The statement CALL SIGNAL
(n) causes a pulse on signal line n. The statement I - TEST (n) makes the
FORTRAN integer argument I equal to 0 or 1, depending upon whether the
logic level patched into test line n is false or true, respectively.
-7-
ANALOG SECTION “i DIGITAL SECTION
)Vdy3J
M
- 8 -
Figure
Vo APPENDIX 1
A. THE PEAK FOLLOWER CIRCUIT
The peak follower circuit is an important circuit in the extraction
of data from the ECG leads. It is essentially a storage and comparison
circuit whose input is controlled by an electronic gate. When this gate is
open the circuit compares the input voltage with that already stored and
continuously stores the larger of the two values. Thus the output of the
peak follower is the highest input voltage applied while the gate is open
(Fig. 3). The peak follower gate is controlled by logic signals from the
digital section. The read cycles are triggered by interrupts from the ana¬
log comparators. The derivative changes sign and indicates a local peak.
The output of the peak follower is read into the digital section through an
analog-to-digital link (ADL).
Since it takes some time to clear the peak follower circuit after
its information has been read, these circuits are used in pairs--one reading
while the other clears. In the ECG analysis two pairs of peak followers are
used, one pair to record positive peaks of the P, R, and T waves and the
other pair to record the negative peaks of the Q and S waves.
Before the information from the peak follower can be read into the
digital section, it is necessary to determine which pair is reading. This
is accomplished by a digital subroutine started by a logic signal from one
of the comparators. This subroutine first tests the peak follower to see
which one is following; then reads the ADL from the one that is following
and stores the information in the proper location in the digital memory. Next,
the peak follower pair is toggled to clear one and start the other following.
The final step is to increase the memory location index for storage of the
next peak value.
B. USE OF ANALOG COMPARATORS IN THE ANALYSIS OF WAVES
The comparator is an electronic circuit designed to provide outputs--
one of two fixed voltages corresponding to the logic states true and false.
- 9 -
PEAK
FOL LOWER
AD L 6
CLEAR IF TRUE
S I G 6
T S T 6
£
PEAK
FOLLOWER
A D L 7
Figure 3. Peak Follower Circuit.
Two voltages are fed into the comparators--one a reference voltage and
the other which is to be measured or compared. As long as the variable
signal is less than the reference, the comparator indicates the logic state
false; and when the signal is greater than the reference, the output is true.
A number of these comparators are used on the main wave and its
derivatives to generate the control signals. Since the R wave is the largest
and easiest to detect it is used as the trigger signal. One comparator is
set high enough to give a true signal only during an R wave. Two other
comparators on the main wave are set as low as possible (± threshold) with¬
out being triggered by noise, and the reference voltage on the fourth is set
at zero. In addition, two comparators are triggered by the approximate
derivative, one by the absolute value of the derivative, and another by the
analog clock. These logic levels are used to drive the control logic. When
the first comparator is triggered by the R wave, its true signal generates
an interrupt that starts the computation. The durations of time between
events in the cardiac cycle are measured by switching analog integrators from
hole to compute on the basis of logic signals. Between the T wave and the
P wave the measurements are stored in the digital section through the ADL.
The integrators are then cleared in the initial condition mode and the zero
reference is defined.
The data in the digital section can be either a running average of
the input data or a set of the beat parameters may be stored. The averages
and variances (either running or for the set) are compared with nominal
parameters obtained from normal wave forms. The results of this compar¬
ison provide information about the heart performance. The data obtained
from these measurements can also be used to accumulate actuarial tables,
provided the computer is supplied with the proper heart classification. In
the demonstration program sample diagnostic type outs are provided to indicate
the system capability.
- 11 -
VI. APPENDIX 2
HYBRID FORTRAN II SEQUENCE
#
1
JU
HYBRID CARDIAC ANALYSIS
#
2
C
THE MAIN PROGRAM IS A MONITOR FOR THE VARIOUS SUBROUTINES.
#
3
*
#
4
DIMENSION DATAC14,0/10],TP[8^ 0/10]
#
5
DIMENSION NEXC0/3]
#
6
DIMENSION CG[11^0/4],CL[11^0/4]
#
7
DIMENSION AVGD[14]^VARD[14]
#
8
COMMON N^NP^M^NLEAD^A^ 1 XFR^ N EX^ TP^ DATA, AVGD^ VARD^ CG^ CL
#
9
c
SENSE SWITCH ONE IS USED TO INDICATE THAT NO
#
10
c
CHANGE IN DIAGNOSTIC PARAMETERS IS REQUIRED.
#
11
IIFESENSE SWITCH 1] 500,30
#
12
30
CONTINUE
#
13
DO 20, l#0,3
#
14
READ 8, [CG[J,I ], J#l,ll]
#
15
READ 8, [CL[J,I], J# 1,11]
#
16
20
CONTINUE
#
17
c
SUBROUTINE SET UP INITIALIZES THE COMPUTER BY
#
18
c
SETTING ANALOG POTENTIOMETERS AND DIGITAL INDEXES.
#
19
500
CALL SET UP
#
20
c
THE SUBROUTINES PEAK,RWAVE,AND READ DATA
#
21
c
ARE ENTERED WHEN AN INTERRUPT IS RECEIVED FROM
#
22
c
THE ANALOG SECTION. THE STATEMENTS CALL PEAK[5,F1 NT[1]] AND
#
23
c
CALL PEAK[6,FINT[2]] ATTACH THE SUBROUTINE PEAK TO
#
24
c
INTERRUPTS ONE AND TWO. THE PARAMETERC5 OR 6] INDICATES
#
25
c
WHICH INTERRUPT IS BEING SERVICED.
#
26
CALL RWAVECFINT[0]]
#
27
CALL PEAK[5,FINTCl]]
#
28
CALL PEAK[6,FINTL2]]
#
29
CALL READ DATACF1NT[4]]
#
30
CALL TYPE IN
#
31
CALL COMPUTE
#
32
c
PUTS ANALOG SECTION IN THE COMPUTE MODE.
#
33
2
II[TEST[14]] 2,2,3
#
34
3
CALL INT ENABLE
#
35
c
CHOICE OF RUNNING AVERAGE OR SET OF INDIVIDUAL MEASUREMENTS
#
36
1F[NLEAD]201,201,200
#
37
200
CONTINUE
#
38
4
IILSENSE LIGHT 1] 5,4
#
39
5
CALL DATA REDUCTION
#
40
GO TO 402
#
41
DO 333 1 # 1,14
-12-
# 42 333 VARD[|] # 0
# 43 201 CALL RUN AVERAGE
# 44 402 CALL TYPE OUT
# 45 CALL CARDIAC COMPARISON
# 46 C CARDIAC DIAGNOSTIC ROUTINE COMPARES MEASURED
# 47 C PARAMETERS TO THE VALUES DESIRED BY THE
# 48 C CARDIOLOGIST. THE AUTOMATIC MEASUREMENTS
# 49 C CAN ALSO BE USED TO DEVELOP ACTUARIAL
# 50 C INFORMATION. IN THE DEMONSTRATION
# 51 C THE STANDARD PARAMETERS ARE APPROXIMATE
# 52 C AND THE DIAGNOSTIC COMMENTS FRIVOLOUS. HERE
# 53 C THEIR PURPOSE IS TO DEMONSTRATE THE MACHINE
# 54 C CAPABILITY.
# 55 GO TO 500
56
57
FORMATL6E13.5]
END
COMMON ALLOCATION
77777 N
77772 A
77021 DATA
76375 CL
77776 NP
77771 IXFR
76765 AVGD
77775 M
77765 NEX
76731 VARD
77774 NLEAD
77505 TP
76553 CG
PROGRAM ALLOCATION
00021 I 00022 J
SUBPROGRAMS REQUIRED
SETUP
COMPUTE
CARD I ACC
RWAVE FI NT PEAK READDATA TYPE IN
TEST INTENABL DATAREDU RUNAVERA TYPEOUT
THE END
-13-
#
1 *
SET UP
#
2
SUBROUTINE SET UP
#
3
DIMENSION AVGD[14]^VARDC14]
#
4
DIMENSION DATA[14^0/10],TP[8^0/10]
#
5
DIMENSION NEXC0/3]
#
6
DIMENSION CG[11,0/4],CL[11,0/4]
#
7
DIMENSION POT[0/49]
#
8
COMMON N^NP^M^NLEAD^A^ 1 XFR, NEX^TP^ DATA. AVGD. VARD
#
9
A#-0.6
#
10
NP#1
#
11
N#0
#
12
1XFR#3
#
13
DO 7,1 #0^3
#
14
7
NEX[l]#0
#
15
IFCSENSE SWITCH 1] 5,6
#
16
6
CONTINUE
#
17
CALL SET POT[4,.5,l.,.5,l.]
#
18
CALL ADL[14,B2,57.3,BV,57.3]
#
19
DO2,K#0,3
#
20
2
CALL SET POTCK,.05,1.]
#
21
POT[12]#.90
#
22
POT[30]#COS[B2]/SIN[B2]
#
23
POT[31]#1.0/[2.0*SIN[B2]]
#
24
POT[14]#COS[BV]
#
25
POT[15]#SIN[BV]
#
26
POT[24]#.5
#
27
POT[36]#.3
#
28
POT[37] #.01
#
29
POT[38]#.01
#
30
POT[39]#.01
#
31
POT[40]#.01
#
32
POT[41]#.2
#
33
POT[13]#.4
#
34
DO 3, K#12,15
#
35
3
CALL SET POT[K,POT[K],li]
#
36
CALL SET POT[30,POT[30],0.1, POTC31], .1]
#
37
CALL SET POT [24,POT[24],li]
#
38
D04,K#36,41
#
39
4
CALL SET POTCK, POT[K],l. J
#
40
5
CONTINUE
#
41
CALL CLEAR
#
42
CALL STAND BY
#
43
RETURN
#
44
END
COMMON ALLOCATION
77777 N
77772 A
77021 DATA
76375 CL
77776
77771
76765
NP
IXFR
AVGD
77775 M
77765 NEX
76731 VARD
77774
77505
76553
NLEAD
TP
CG
PROGRAM ALLOCATION
-14-
00010 POT
00160 B2
00154 1
00162 BV
00155 K
00156 SETUP
SUBPROGRAMS
REQUIRED
SET POT
ADL COS
SIN CLEAR
STANDBY
THE END
#
1
SUBROUTINE TYPE IN
#
2
COMMON N^NP^M^NLEAD^A^ 1 XFR, NEX^TP^ DATA^ AVGD, VARD
#
3
5
FORMAT[//$NUMBER OF BEATS$]
#
4
TYPE 5
#
5
15
FORMATE 12]
#
6
ACCEPT 15^M
#
7
25
FORMAT[//$LEAD 1 DENT 1F1 CAT 1ON$]
#
8
TYPE 25
#
9
ACCEPT 15,NLEAD
#
10
TYPE 35
#
11
35
FORMAT[/$THANK YOU$///]
#
12
RETURN
#
13
END
COMMON ALLOCATION
77777
77772
77764
77754
N
A
DATA
CL
77776
77771
77762
NP
1 XFR
AVGD
77775
77770
77760
M
NEX
VARD
77774
77766
77756
NLEAD
TP
CG
PROGRAM
ALLOCATI
ION
00000
TYPEIN
THE END
-15-
#
1 *
READ DATA
#
2
SUBROUTINE READ DATA
#
3
DIMENSION DATAE14.0/10]
#
4
DIMENSION AVGD[14].VARD
#
5
DIMENSION CG[11^0/4].CL
#
6
DIMENSION NEXL0/3]
#
7
COMMON N^NP^M.NLEAD^A. 1
#
8
DO 2.l#2.6
#
9
CALL ADL [I^DATACI.N]^
#
10
2
CONTINUE
#
11
IF [TEST[7]]3^3^7
#
12
3
SENSE LIGHT 7
#
13
7
CONTINUE
#
14
IFCNP-6]5,4,6
#
15
6
NEX[NP-6]#NEX[NP-6]&1
#
16
GO TO 4
#
17
5
NEX[0]#NEX[0]&1
#
18
4
NP#1
#
19
SENSELIGHT 5
#
20
N#N&1
#
21
IXFR#3
#
22
IFCM-N] 8^31,31
#
23
31
RETURN
#
24
8
CALL POTSET
#
25
SENSE LIGHT 1
#
26
RETURN
#
27
END
TP[8,0/10]
14]
11.0/4]
A. I XFR^NEX.TP.DATA.AVGD, VARD^CG^CL
]. 50.]
COMMON ALLOCATION
77777
N
77776
NP
77775
M
77774
NLEAD
77772
A
77771
IXFR
77765
NEX
77505
TP
77021
DATA
76765
AVGD
76731
VARD
76553
CG
76375
CL
PROGRAM
ALLOCATION
00007
1
00010
READDATA
SUBPROGRAMS REQUI
RED
ADL
TEST
POTSET
THE END
-16-
# 1 * TYPE IN
# 2 SUBROUTINE TYPE OUT
# 3 DIMENSION DATAL14/0/103/TP[8,0/10]
# 4 DIMENSION CG[11/0/4]/CL[11/0/4]
# 5 DIMENSION AVGD[14]/VARD[14]
# 6 DIMENSION NEXL0/3] -p P,
# 7 COMMON N/NP/M/NLEAD/A/IXFR/NEX/TP/DATA/AVGD/VARD/CG/CL
# 8 TYPE 43
# 9 43 FORMATC10X/$MEAN VALUES OF DURATIONS$]
# 11 44 FORMAT[//4X/$R TO R$/7X/$P TO R$/7X/$Q VJAVE$/9X/$QRS$/9X
# 12 l$QTO T$/]
# 13 TYPE 46/[AVGD[I]/l#l/5]
# 14 46 FORMATL5E13.5/]
I 15 47 FORMAT[/10X/$VARIANCE OF DURATIONS$/]
# 16 TYPE 47
# 17 TYPE46/[VARD[I]/I#1/5]
# 18 48 FORMATE10X/$MEAN VALUES OF MAGNITUDES$//]
I n 49 JoRMAn4X,$AVG ST*,7X,$PEAK P$,7X.$PEAK C)$,7X,$PEAK R$,7X,$PEAK S
# 21 1$/7X/$PEAK T$/]
# 22 type 49
# 23 50 FORMATL6E13.5/]
# 24 TYPE 50/[AVGDCI]/I#6/11]
# 25 52 FORMAT[/$VARIANCES OF MAGNITUDES$/]
# 26 type 52
# 27 TYPE 50/[VARDLI]/I#6/11]
# 28 54 FORMAT[//$MISSING PEAKS$/I5/]
# 29 type 54/NEXL0]
# 30 56 FORMAT[$EXTRA PEAK DISTRI BUT ION$/]
# 31 57 FORMAT[$ONE$/15]
# 32 TYPE 56
# 33 58 FORMAT[$TWO$/15]
# 34 59 FORMAT[$THREE$/I 5]
# 35 type 57/NEXLl]
# 36 TYPE 58/NEXE2]
# 37 TYPE59/ NEXC3]
# 38 60 CONTINUE
# 39 IFESENSE SWITCH 4] 70/60
# 40 70 IF [SENSE SWITCH 3] 75/76
# 41 75 TYPE 80
# 42 80 FORMATE//$lNDIVIDUAL DURATIONS$//]
# 43 TYPE 44
# 44 DO 77 K#l/M
# 45 77 TYPE 46/EDATAEI/K]/I#1/5]
# 46 81 FORMAT[//$INDIVIDUAL MAGNITUDES$/]
-17-
47 TYPE 81
48 TYPE 49
49 DO 78 K#1^M
50 78 TYPE 50^ [DATA[I^K]^1 # 6,11]
# 51 76 RETURN
# 52 END
COMMON ALLOCATION
77777
77772
77021
76575
N
A
DATA
CL
77776
77771
76765
NP
1 XFR
AVGD
77775 M
77765 NEX
76731 YARD
77774
77505
76553
NLEAD
TP
CG
PROGRAM
ALLOCATI
ION
00002
1
00003
K
00004 TYPEOUT
THE END
-18-
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
1 * DATA REDUCTION
2 C SUBROUTINE FOR FINDING THE MEANS AND VARIANCES OF CARDIAC DATA
3 SUBROUTINE DATA REDUCTION
4 DIMENSION DATA[14^0/10],TP[8^0/10]
5 DIMENSION CGCll^0/4]^CL [11/0/4]
6 DIMENSION AVGD[14]/VARD[14]
7 DIMENSION NEXC0/3]
8 DIMENSION X[14]
9 COMMON N/NP/M/NLEAD/A/IXFR/NEX/TP/DATA/AVGD/VARD/CG/CL
10 DO 10/l#l/14
11 AVGD[|]#0
12 VAR) [l]#0
13 10 X[l]#0
14 DO 21/ J#l/M
15 DO 20 l#l/14
16 AVGD[I]#AVGD[I]&DATA[I/J]
17 20 X[I]#X[I]&DATA[I/J]**2
18 21 CONTINUE
19 DO 30 l#l/14
20 AVGD[|]#AVGD[I]/M
21 X[I]#X[I]/M
22 30 VARDCI] # X[l] - AVGD[I]**2
23 TYPE 42/M
24 42 FORMATE/I3/$ BEATS$/]
25 RETURN
26 END
COMMON ALLOCATION
77777 N
77776 NP
77775 M
77774 NLEAD
77772 A
77771 IXFR
77765 NEX
77505 TP
77021 DATA
76 765 AVGD
76731 VARD
76553 CG
76375 CL
PROGRAM ALLOCATION
00002 X
00036 1
00037 J
00040 DATAREDU
THE END
-19-
#
1
*
RUN AVERAGE
#
2
SUBROUTINE RUNAVERAGE
#
3
DIMENSION DATAL14,0/10]
,TP[8,0/10]
#
4
DIMENSION AVGD[14],VARD[14]
#
5
DIMENSION CG[ll,0/4],CL[ll,0/4]
#
6
DIMENSION NEX[0/3]
#
7
COMMON N,NP,M,NLEAD,A,1
XFR,NEX,TP,DATA, AVGD, VARD,CG,CL
#
8
10
IF[SENSE LIGHT 5]20,10
#
9
20
DO 30 1 # 1,14
#
10
IF [1-N] 24,22, 22
#
11
22
AVGD[I] # DATA[I,1]
#
12
GO TO 30
#
13
24
AVGD[I] # [[M-1]*AVGD[I
] & DATA[I,1]]/M
#
14
30
VARD[I] # [[M-1]*VAR) [I
] & [DATA[1,1] - AVGD[|]]**2]/M
#
15
N # 1
#
16
IF [SENSE SWITCH 3] 40,10
#
17
40
RETURN
#
18
END
COMMON ALLOCATION
77777 N
77772 A
77021 DATA
76375 CL
77776 NP
77771 IXFR
76765 AVGD
77775 M
77765 NEX
76731 VARD
77774 NLEAD
77505 TP
76553 CG
PROGRAM ALLOCATION
00010 I 00011 RUNAVERA
THE END
i
-20-
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
1
2
3
r,
5
6
7
8
9
10
11
12
13
14
15
RVmVE
SUBROUTINE RV/AVE
DIMENSION DATA 14,0/10],TP 8,0/11
DIMENSION CG 11,0/4],CL[11,0/4J
DIMENSION AVGDC14],VARDC14
DIMENSION NEXE0/3
COMMON N,NP,M,NLEAD,A,IX"R,NEX,TP,DATA,AVGD,VARD,CG,CL
CALL ACL [1,XXX, 50. ]
CALL DAL[1,XXX*A, 50 i]
IF [N] 3,2,1
1 DATA[1,N]# XXX''2
RETURN
2 N#N^j1
3 RETURN
END
COMMON ALLOCATION
77777 N
77772 A
77021 DATA
76375 CL
77776 NP
77771 IXFR
76765 AVGD
77775 M
77765 NEX
75731 VARD
77774 NLEAD
77505 TP
76553 CG
PROGRAM ALLOCATION
00004 RWAVE 00006 XXX
SUBPROGRAMS REQUIRED
ADL DAL
THE END
-21-
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
1 *
2 C
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
PEAK
PEAK READING SUBROUTINE FOR CARDIAC ANALYSIS
SUBROUTINE PEAKELINEJ
DIMENSION DATA[14# 0/10]^TP[8,0/10]
DIMENSION AVGDL14] # VAR) [14]
DIMENSION CG[11# 0/4]#CL[11# 0/4]
DIMENSION NEX[0/3]
COMMON M#NP#M#NLEAD#A#IXFR#NEX#TP#DATA#AVGD#VARD#CG#CL
GO TO[l#l#3]# IXFR
3 CALL ADL[2-''LINE-3&ITEST[LINE] #DATA[6aNP#N]# .2E5]
CALL SIGNAL[LINE]
CALL ADL[liaiTEST[8]#TP[NP#N]#50.]
NP#NPai
IF[NP-8] 1#1#2
1 RETURN
2 IXFR#1
RETURN
END
COMMON ALLOCATION
77774 NLEAD
77S05 TP
76553 CO
76375 CL
PROGRAM ALLOCATION
DUMMY LINE 00015 PEAK
SUBPROGRAMS REQUIRED
ADL I TEST SIGNAL
THE END
77777 N
77772 A
77021 DATA
77776 NP
77771 IXFR
76765 AVGD
77775 M
77765 NEX
76731 VARD
-22-
VII.
APPENDIX 3, REFERENCES
Wiggers, Carl J.: The Heart; Scientific American, May, 1957;
pp. 74-88
Guyton, Arthur C. , M.D, ; Textbook of Medical Physiology;
W. B. Saunders Co., Philadelphia and London, 1961; Part V.
Zeitlin, Richard A. ; Cady, Lee D. ; Tich, Leo J. ; Woodbury,
Max A. ; Combined Analog-Digital Processing of Cardiograms;
New York University Medical Center and College of Engineering,
Research Division, New York University, New York, N. Y.
-23-