128
Short Communications
Preprocessing Program for
Real-Time ECG Rhythm Analysis
AZTEC,
(amplitude-zone-timie-epoch-coding).
description of the processing algorithm) sets initial conditions on tWo Iimits: Vmax=Vmin=VO. Samples obtained
at subsequent interrupts are compared to these limits.
If exceeded, a limit is replaced by the voltage just
samlpled. As long as the difference betweein the limiiits,
(V,m,ax - Viin), does not exceed an experimentally determined threshold, the fluctuating voltage is considered
to be adequately represented by a constant voltage, or
"line,'" midway between the limnits. When finally a sample would necessitate separating the limits by more than
the threshold, the preceding average of the two limits is
stored in the miiemory of the computer and called the
value of the line. The time since the limits were initialized is stored as the duration of the line. In order to
avoid long delays in the presentation of data to the
ECG analysis program, a long line is terminated after
126 nis. In our program, the duration of a line occupies
six bits of the first of a pair of twelve-bit wvords and its
value occupies the second word.
When the difference between the voltage limits exceeds the threshold and a pair of data words is recorded,
the process is restarted by setting Vrnax and Vmin equal to
the latest sample voltage. When a signal of higher frequency and amplitude such as the QRS begins, the
voltage samples will change rapidly, and lines of short
duration will be formed. A series of lines, each containing
four samples or less, is considered to be adequately represented by a constant rate of voltage change, or slope,
as long as the voltage difference between adjacent lines
does not change sign. The slope is terminated by a line
longer than four samples or a change in signs. The slope
duration and the voltage betweein the lines bounding
the slope are then stored as the next pair of data words.
In order that this pair may be recognized subsequently
as a slope, the duration wvord is marked by setting its
sign bit.
Fig. 1 illustrates an ECG signal and its resulting
AZTEC representation. The data reduction is from a rate
of 500 samples per second to an average of 25 word pairs
(50 words) per second, or about 10 to 1. The high frequency but low amplitude noise is interpreted simply as
a line as long as the peak-to-peak amplitude does not
exceed the threshold. The QRS consists of seven AZTEC
word pairs, four of which are slopes.
The AZTEC algorithm can be easily followed by additional digital processing, since the calculation time per
sample is considerably less than the time between sanmples for most digital nmachines. For example, we are cLrrently using it as input to a program that evaluates the
signal noise level and, where possible, detects QRS comi1plexes, measures their width, and codes their shape in
terms of their sloping segments. Our implementation of
this detection algorithm is quite fast and can identify
SHORT COMMUNICATIONS
129
fLi}7`
m-1
r(S) = E T(Li).
i=1
Fig. 1. ECG sampled at 500 samples per second (top) and resulting
AZTEC representation (bottom) as reproduced by a digital plotter.
The horizontal line at the upper left indicates 100 ms and the
vertical line indicates one eighth of full scale, in this case 400 ,V.
The AZTEC transformation may be described as follows. Let v, be the ith sample following an initial samiiple vO. Let Vriiax and v.in be the maximum and minimum
values, respectively, of the set vi } o' where i ranges from
0 to m. If Vin5ax-Vnin.K for the set
(v}il" and
is
Vmax-Vmin>K for the set v}i then the set
said to form an AZTEC "line" L. The line L is completely
specified by its value, v(L) -(Vn,+Vrnmin), and its duration, r(L) = n times the sampling interval. Let v,, now be
the new v0 and repeat the process. This much of the
transformation is called a zero-order linear interpolator
Manuscript received April 28, 1967; revised November 19, 1967.
with aperture K/2.4 It has the property that, if L conThis
work was supported in part by the National Institutes of Health
tains the sample vi, then v(L) -v| <.K/2.
under Grant NB-05143, and by the U. S. Air Force Office of Scientific
under Contract AF-49(638)-1386.
Let Li be the ith AZTEC line following a line Lo. The Research
I Transformers were chosen on the basis of weight, size,
operating
{v,}In