COMPUTERS

AND

BIOMBDICAL

RESEARCH

An Automated MATS-ERIK

1%

181-202

System NYGARDS

for ECG Monitoring* AND JOHAN HULTING

Department of Medical IrgCormatics, Linkiiping University, Linkiiping, Department of Environmental Medicine, Karolinska Institute& Stockholm and Medical Department I, Siidersjukhuset. Stockholm, Sweden Received April lo,1978 To relieve the staff in the coronary care unit of the tiresome but still relatively inaccurate visual arrhythmia observation, a computerized system for ECG monitoring has been developed. The classiication of QRST complexes is based on a scheme for feature extraction, approximating each waveform from a number of orthogonal basis signals. Ventricular and supraventricular ectopic beats are separated from normal complexes, using a set of linear discriminant functions. For recognition of ventricular fibrillation the power spectrum of the ECG is utilized. When an alarm condition has been recognized, the nurse is alerted through a wireless alarm-transmitting system, activated by the computer. Simultaneously, the cause of the alarm is displayed on video screens in the monitoring station and at the bedside. Since 1976 the system has been in continuous routine use in an eight-patient ward. A low rate of false alarms has contributed to the clinical acceptance of the system.

The value of continuous ECG monitoring in coronary care has been documented, e.g., by reductions in mortality rates. To face the high need for personnel as well as the relative inaccuracy of visual arrhythmia observation (1) devices for automated rhythm surveillance have been developed. During the last decade a number of systems utilizing digital computers have been presented, some of them are now commercially available (2-7). Despite the great interest in computerized arrhythmia monitoring, very few clinical long-term evaluations have been reported (8,9). To some extent this may be explained by the fact that many pattern recognition algorithms designed for this are rather vulnerable to artifacts. While performing excellently in taped materials of ECGs with low noise levels, the confrontation with signals of poor quality, which despite careful electrode application are prone to appear in the clinical situation, may result in an unacceptable amount of false alarms. The development of the present system has aimed at the following goals: (1) accurate recognition of relevant arrhythmias in ECGs with low or moderate noise levels; * Supported by the Swedish Board for Technical Development (74-3820). 0010.4809/79/020181-22$02.00/O 181

Copyright @ 1979 by Academic Press, Inc. All rights of reproduction in any form reserved. Printed in Great Britain

182

NYGARDS AND HULTING

(2) response to high artifact levels in the form of diagnostic messages to aid the nurse in improving the signal quality; (3) a reliable alarm system designed for minimum interference with routine nursing procedures; and (4) simplicity in operation by automating the setting of all thresholds, learning of reference patterns etc. In our first attempt to reach these goals, the development of a system based on the detection of premature ventricular beats (PVBs) by cross correlation with a single prototype PVB waveform was started in 1972 at the Coronary Care Unit (CCU) of Sodersjukhuset, Stockholm (IO). During 1974 the accuracy of PVB detection was evaluated (11). Although the performance was acceptable for most patients in this study, high figures for false positive PVBs were seen in some cases. Also, the number of missed detections was high in a few patients, due to discrepancies between the actual ventricular waveform and prototype PVB. This system, which could handle four patients, was never taken into routine use. Instead, a more flexible method for pattern recognition, based on the concept of feature extraction, was developed and implemented into a new version of the monitoring program (12). At the same time the capacity for simultaneous monitoring was increased to eight patients. A comparison between the two programs for PVB detection showed that the new algorithm was superior in several respects (13). After minor modifications, the new system which is described in this paper was gradually introduced to the personnel, and since July 1976 it has been in continuous routine use.

EQUIPMENT

The physical configuration of the system is illustrated in Fig. 1. The central processing equipment includes a 16-bit general purpose minicomputer (Datasaab D5/30) with 28K words of core memory and an interface unit for analog and digital signals. Amplified single-lead ECGs are obtained from a conventional monitoring system (Elema-Schiinander) and fed into the computer through eight analog input channels. To the existing bedside units, monitoring on/off and alarm reset controls have been added. Monitoring status and alarms are displayed on a video terminal (Infoton Vistar) in the monitoring station with slave monitors at bedside and in the physician’s office. A remote-controlled ECG recorder (Siemens EM34T) in the monitoring station is used to document the ECG event causing an alarm. To allow the nurse to move more freely within the unit, a wireless alarm transmitting system (Philips RPlO, modified), controlled by the computer, has been implemented. Interactive communication with the monitoring system is performed via the alphanumeric keyboard of the video terminal or handheld numeric keyboards at bedside. At system start-up the programs are loaded from a cassette tape unit in the computer room. Normally, however, the contents of the core memory remain intact

AUTOMATEDECG PATIENT

ROOM

PHYSICIRN’S

---.

I

I ,

183

MONITORING OFFICE

----1

hClE1 ALRRN RECEIVER .-__-

I

I

I

._--_--_-__-__l

__--_

RNALlYC

0 I , I

RLflRM TRRNSNITTER

:--_--_--_----------------~

CENTRCIL

STRTIDN

COMPUTER

ROOM

FIG. 1. System configuration.

even at a power failure, and when the power returns, all programs are automatically restarted. The paper tape devices and the typewriter shown in Fig. 1 are merely used for developmental purposes. METHODS

The aim of the arrhythmia monitoring is to recognize critical changes in the ECG such as ventricular fibrillation (VF) or asystole and also to direct attention to those arrhythmias, which may be precursors to such serious events. In the block diagram of Fig. 2 the various steps of the analysis procedure, from digitalization of the ECG to presentation of alarms or monitoring status, are shown. In the following, each step will be described in some detail. A-D Conversion, Artifact Recognition, and Digital Filtering Before digitalization, the ECG signal passes an analog low-pass filter. A bandwidth of 50 Hz has been chosen to reduce the effects of high-frequency noise and spectrum -aliasing without too hard smoothing, which would make spike artifacts impossible to distinguish from true QRS complexes. After sampling and A-D conversion at a rate of 100 Hz, the ECG signal is analyzed with respect to spikes,

184

NYGARDS AND HULTING

ECG -

---+

R-0 CONVERSION -

&TIFRC? RECOGNIllOW AND TAL FlLTERfNt

DIGI-__+

R HRVE AECOGNIlION

QRST CLRSSIFICATION

TEST OF RLRRM

L

CONDITIONS

-----+

PRESENTIWION OF RLRRH AND fiONlTOAING STRTUS

PONER SPECTRUn RNRLYSIS

FIG.

2. Block diagram of arrhythmia analysis.

base line shifts, and power line interference. If the artifact level is too high, the subsequent waveform analysis is blocked for a short period of time (4 set). Next, each pair of adjacent samples are averaged to cancel the 50-Hz component and further reduce the influence of muscle artifacts which have not been detected as spikes or base line shifts. After this filtering, which reduces the bandwidth to approximately 25 Hz, the first difference of the signal is computed and stored in a circular byte buffer, from which the last 5.12 set of the ECG may be retrieved for further waveform analysis. R-Wave Recognition Each time a new ECG sample has been read, the procedure for R-wave recognition is entered. If two first differences with opposite sign and absolute values exceeding an adaptive threshold (s) are recorded within a 0.25-set interval, the corresponding ECG event is regarded as a possible R wave. The threshold is computed from a running average (Mu) of the maximum first difference of the patient’s normal QRS according to the formula 6= 0.25m, + c,

[ll

where c is a constant corresponding to 6 mV/sec. This threshold level was chosen as a compromise between the risk for overlooking low-amplitude beats and the risk for false R-wave detections, e.g. due to T waves. Classa@kation of QRST Complexes A waveform recognized as a possible R wave is analyzed further and classified into one of the following categories: normal beat, supraventricular ectopic beat (SVB), premature ventricular beat (PVB), undefined beat, or artifact. This procedure, which has been briefly described in previous papers (22,13), involves four

AUTOMATED

ECG MONITORING

185

steps: feature extraction, waveform grouping, preliminary waveform typing, and final diagnosis. Feuture Extraction. The QRST complex is represented as a weighted sum of four approximately orthonormal basis signals (Fig. 3). With I being the sampling interval, u(H)

= $ b,#,(kT-

i=l

tJ + e(W),

121

where u&T) denotes the original QRST complex at the kth sample point, b, are t,he amplitude coefficients of the basis signals d,, and e(kT) represents the approximation error. Both the QRS (0, and 4,) and the ST basis signals (#3 and #J are mathematically defined by the Gaussian function exp(-t2/202) and its derivative with u being a width parameter. The reference positions I, assume the same value within each pair of signals (tI = f, = toas and t, = t, = fsJ. The width and the reference point of the ST segment are predicted from heart rate (HR). Consequently five parameters in addition to the QRS reference point are estimated for each complex: the QRS width and the amplitudes of the four basis signals.

t QRS FIG.

t ST

3. Basis signals used for QRST representation. The reference points of the QRS and ST intervals are denoted with tQRsand fST,respectively.

186

NYGARDS AND HULTING

The crucial point of the procedure is the determination of the QRS width and reference point. If only one distinct peak is recognized in the complex, these parameters are determined from the slopes at half height of the peak, utilizing the properties of the Gaussian model. In case of more than one peak, the determination is based on the location and height of the two most dominant peaks of the complex. In either case the QRS width and reference point are interpoiated to yield a I-msec resolution compared to the IO-msec sampling interval. Now, due to the orthogonal&y of the basis signals the amplitude parameters, which minimize the mean square error (MSE) of the representation, are computed from the correlation between the original waveform and each of the basis signals bi = ; u(kT)fqkT-

tJ,

i = 1,2,3,4,

131

k=l

where M is the number of sample points used to represent the QRST complex. With reference to Eq. 121the MSE is defined as e2 = b

g e*(kT). k

1

If the MSE is less than 5% of the squared peak amplitude, the waveform is accepted as a QRST complex. If the error exceeds 10% the waveform is rejected as being an artifact. For mean square errors between 5 and 10% a fifth basis signal (Fig. 4) is added to the original set. If this procedure, introduced to improve the representation of a possible complex with a split R wave, yields a MSE below 5%, the waveform is regarded as a QRST complex. However, the amplitude coefficient of the fifth basis signal is not used in the further classification of the complex. The amplitude and shape of the QRS or ST interval can be geometrically represented by a point with the rectangular coordinates (xi, y,) given by the

FIG. 4. Basis signal for improved representation of split waveforms (fQRs = reference point oi QRS interval).

AUTOMATED

ECG

MONITORING

187

FIG. 5. Representation of amplitude and shape by polar coordinates. Outer circle illustrates shape transitions for @varying between 0 and 2n.

amplitudes of the monophasic and the biphasic basis signals, as shown in Fig. 5. Alternatively, this point could be described by its polar coordinates: a representing the amplitude and 8 reflecting the shape of the waveform. In Fig. 5 the shape transitions for varying 8 are illustrated. This representation, which has an intuitive meaning, also reduces the correlation between the parameters since amplitude variations will influence only one parameter. Therefore, the amplitude coefficients (b,-b,) are transformed in the following manner: aQRs= (b,* + b,*)“*, daRs = shape (b,, b2),

[51

ST= (b,* + b,*Y’*/aoRS, is, = shape(b3,b,),

where shape (x, JJ) is a function similar to the inverse tangent function. It has been computed so that a small change in the shape parameter 8 will correspond to a waveform change-measured as a mean square difference-which is the same for all values of 6. Also an estimate of the true QRS width is computed on the basis of the width parameter of the Gaussian model and the QRS shape. Hence, QRS width, amplitude, and shape, relative ST amplitude and ST shape constitute the final set of waveform features, in the following denoted by ur, u2, . . ., u5, respectively. Waveform Grouping. Complexes with a similar morphology, as described by the waveform features, are brought together. Each waveform group is characterized by

188

NYGiiRDS

AND HULTING

the means and the standard deviations of the five features. The first group, named the reference group, comprises the waveform that dominated at the onset of monitoring. The grouping of subsequent complexes is based on a weighted distance measure (6) in the five-dimensional feature space given by the formula d2 = i (vi - mi)2/si2, i=l

[61

where v, represents the features of the complex and m, and si are the corresponding means and standard deviations of a waveform group. A new group is created when QAST

FERTURES

TO NEAREST

CRLlUP

PUT COMPLEX INTO NEAREST GROUP

REf ERENCE YRVEFOAM

&NORMAL

CREATE R NEW GfWUP

WRVEFORMS

FIG. 6. Waveform grouping.

the distance to the existing groups exceeds a preset limit (Fig. 6). However, the new group is regarded as tentative until the number of complexes (N) has reached a certain threshold (N = 2 or 3 depending on the noise level). The parameters of a group are updated whenever a new complex is incorporated m,(j + 1) = m,(j) + t [vi - m&)1, 1 n-l S[‘o’ + 1) = s,‘(j) + - n[ n

Cvi - m,CjN2 - t+‘(j)

171

1 ,

where mr(j) and s,(j) are the mean and standard deviation of the ith feature when j complexes have been included into the group. To make m, and sI adaptive, the constant n is defined as n = j + 1 with an upper limit of 20. A maximum of eight

AUTOMATED

ECG MONITORING

189

groups is allowed for each patient. Adjacent groups are merged at regular time intervals and a group without new complexes for a certain period is deleted. To cope with sudden changes in the shape of the reference complex, e.g., when the patient turns from one side to another, the presently most dominant group is substituted for the reference group if no new complexes have been assigned to the latter group for about 2 min. If the new reference waveform ditTers too much from the previous one, a message is displayed on the screen (see below). Preliminary Waveform Typing. The shape of a waveform assigned to the reference group is automatically regarded normal. Utilizing two discriminant functions, D, and D,, other waveforms are preliminary typed as either probable PVB, possible PVB, abnormal non-PVB, or essentially normal (Fig. 7). Each discriminant function has the following general form:

k=O

&NORMAL WRVEFORHS

ESSENTIALLY NORHRL FIG. 7. Preliminary typing of abnormal waveforms, utilizing two linear discriminant functions (0, and 03. The constant L is used to separate candidate PVBs into two groups on the basis of the uncertainty of the classification.

190

NYGiiRDS

AND

HULTING

where w0 = 1 and w,, . . ., wK are the deviations between the parameters of the current waveform and the features of the reference group expressed in standard deviations. If the basic rhythm is regular, one term representing the difference between the R-R interval preceding the complex and the normal interval is also included. The coefficients ctkwere determined to minimize the probability of misdiagnosis in a large number of different waveforms, recorded from CCU patients and manually classified by two physicians. Final Diagnosis. In this step additional information such as data from R-R interval tests is used to confirm or modify the preliminary typing. A waveform belonging to the reference group or labeled essentially normal is diagnosed as a normal beat or, if premature, as a supraventricular premature beat (SVB) with normal shape. The final diagnosis of an abnormal waveform is postponed until the subsequent beat has been recognized. This permits, e.g., the presence of a compensatory pause or the appearance of a second abnormal waveform with same shape to be considered in the diagnostic procedure. The compensatory pause test as well as tests for prematurity and interpolation between normal beats is performed on a statistical basis utilizing the running average (m& and covariance (C,,) of R-R intervals between normal complexes. As an example, a beat is considered premature with compensatory pause if the following relation holds: I101 hltl - r,)(r2 - mRR) + C,,(l) 2 k&, where ti and r2 are the R-R intervals to the preceding and following beats, C,,(l) is the running covariance between adjacent normal R-R intervals and s&s = C,,(O) is the running variance of the normal interval. The constant k is set to 1 for a weak test and 9 for a strong test. Since it is unlikely that two or more artifacts will result in similar features and give rise to an established waveform group (group size above threshold), the PVB diagnosis of a complex belonging to an established waveform group follows rather weak criteria (Table I). A probable PVB is rejected only if the MSE of the basis signals representation is greater than 3% and the waveform is interpolated between normal beats. If the basic rhythm is irregular the same criterion is used also for a possible PVB; in regular rhythm a weak test for prematurity and compensatory pause must be passed to yield a final PVB diagnosis. For a complex allocated to a waveform group still regarded as tentative (group size below threshold), somewhat more strict criteria are applied to bothbrobable and possible PVBs (Table I). If the preliminary PVB diagnosis is not confirmed, the beat is labeled “undefined” unless the MSE falls below 0.6%, in which case the beat is treated as an abnormal non-PVB. To prevent distorted normal beats or artifacts from being classified as SVBs, an abnormal non-PVB is included in the SVB category only if the following three criteria hold: (1) The MSE falls below 3%, (2) the beat is not interpolated, and (3)

AUTOMATED

191

ECG MONITORING TABLE

I

CRITERIA FORFINAL PREMATUREVENTRICULAR BEAT (PVB) DIAGNOSIS Classify beat as PVB if Gfoup size Preliminary type

XP probable PVB

Basic rhythm Mean square error of.QRST representation Beat interpolated Beat premature with compensatory pause

xv possible PVB regular

(3%

3-596

(5%

0.06

and 50.12 Regular SO.06

192

lWG;iRDS

AND HULTING

waveform groups. Therefore the noise index is incremented at the failure of feature extraction and each time a new waveform group is created. Also, an excessive baseline shift between adjaoent QRST waveforms will add to the noise index, whereas the recognition of undistorted normal complexes will gradually return the index to zero. When a certain threshold is exceeded, the classification of abnormal beats is blocked.

Power SpectrumAnalysis A special procedure for the recognition of serious arrhythmias has been developed. At the detection of an abnormal ECG pattern lasting for at least 5 set in a TABLE

III

ARRHYTHMIA ALARMS Reset time (mid

Message

*** ASYSTOLE *** VENTR FIBRILLATION l **

VENTR TACHYCARDIA

2on 200

(. . ./MIN)

20”

** RUN OF MORE THAN 3 PVB’S ** IDIOVENTR RHYTHM (. . ./MIN)

4 4

** BRADYCARDIA

(.. ./MIN)

4

** TACHYCARDIA

(.../MIN)

A

** RUN OF 2-3 PVB’S ** R-ON-T PVB’S ** 1;.

VENTR BIGEMINY SV TACHYCARDIA

4 4

(. ../MIN)

4 4

* MORE THAN .. . PVB’S/MIN * MULTIFORM PVB’S * MISSING QRS

4 4 4

* MORE THAN 5 SVB’S/MIN * BRADYCARDIA (. , ./MIN)

4 4

* TACHYCARDIA

4

(.. ./MIN)

Explanation No R waves for 5 set and power below threshold Abnormal pattern for 5 sec.and peak in power spectrum (see text) More than 3 consecutive PVBs with rate > 120 or narrow peak in power spectrum (see text) More than 3 consecutive PVBs with rate 5120 More than 3 consecutive PVBs with rate 140 or QRS width >0.14 set and HR 140 HR more than 15 beats/mm below bradycardia limit HR more than 30 beats/min above tachycardia limit 2-3 consecutive PVBs 2 PVBs of same shape within 15 min with preceding R-R intervals

An automated system for ECG monitoring.

COMPUTERS AND BIOMBDICAL RESEARCH An Automated MATS-ERIK 1% 181-202 System NYGARDS for ECG Monitoring* AND JOHAN HULTING Department of Medica...
1MB Sizes 0 Downloads 0 Views