A knowledge-based technique for automated detection of ... - CiteSeerX

0 downloads 0 Views 181KB Size Report
First received 15 May 2000 and in ®nal form 22 August 2000. MBEC online number: 20003533. · IFMBE: 2000. Medical & Biological Engineering & Computing ...
PLEASE READ THIS DRAFT CAREFULLY AND INFORM ME IMMEDIATELY OF ANY CORRECTIONS

Techset Composition Ltd, Salisbury Doc: i:/Iee/Peregrin/Mbec/MBEC3533.3d Printed: 20/11/00 Page#: 8 page(s)

A knowledge-based technique for automated detection of ischaemic episodes in long duration electrocardiograms C. Papaloukas1

D. I. Fotiadis2

A. Likas2

A. P. Liavas2

L. K. Michalis3

1

Department of Medical Physics, Medical School, University of Ioannina, Greece 2 Department of Computer Science, University of Ioannina, Greece 3 Department of Cardiology, Medical School, University of Ioannina, Greece

AbstractÐA novel method for the detection of ischaemic episodes in long duration ECGs is proposed. It includes noise handling, feature extraction, rule-based beat classi®cation, sliding window classi®cation and ischaemic episode identi®cation, all integrated in a four-stage procedure. It can be executed in real time and is able to provide explanations for the diagnostic decisions obtained. The method was tested on the ESC ST-T database and high scores were obtained for both sensitivity and positive predictive accuracy (93.75% and 78.50% respectively using aggregate gross statistics, and 90.68% and 80.66% using aggregate average statistics). KeywordsÐIschaemic episodes detection, Knowledge-based method, ECG noise handling Med. Biol. Eng. Comput., 2000, 38, 000±000

1 Introduction ISCHAEMIA IS the most common cardiac disease and its early diagnosis is very important. Techniques that automate the detection and help in the diagnosis of ischaemic episodes in long duration electrocardiograms (ECGs) have been proposed during the last two decades. These techniques can be grouped depending on the computational paradigm on which they are based (rule-based expert systems, arti®cial neural networks, fuzzy expert systems, pattern recognition, signal processing, etc.). Rule-based methods exhibit certain advantages such as direct transformation of medical knowledge to rules, low computational load and explanation of the diagnostic decisions. However, their diagnostic value depends on the appropriate selection and combination of the rules and the method for the extraction of feature values used in the rules. Some rule-based techniques (LACHTERMAN et al., 1990a, b; VELDKAMP et al., 1994; ANSLEY et al., 1996; YANG, 1996) used the ST deviation from the isoelectric line, while others (WATANABE et al., 1980; WEISNER et al., 1982; HSIA et al., 1986) combined the ST deviation with ST segment slope and other parameters like the ST index, ST level and ST integral (or ST area). More speci®cally, if the slope is lower than a certain threshold and the ST deviation is higher than 0.1 mV then an ischaemic beat is detected. SILIPO et al. (1994) used such rules in ischaemic episode detection. Similar rules were adopted by AKSELROD et al. (1987), which could reach decisions for subclasses of Correspondence should be addressed to Dr D. I. Fotiadis; Department of Computer Science, University of Ioannina, Greece 451 10, PO Box 1186; e-mail: [email protected] First received 15 May 2000 and in ®nal form 22 August 2000

MBEC online number: 20003533

ß IFMBE: 2000 Medical & Biological Engineering & Computing 2000, Vol. 38

ischaemic beats, and by SHOOK et al. (1989), but with feature values averaged on a 30-s window. CAIRNS et al. (1991) and LAKS et al. (1989) introduced a relation which has as input parameters age, sex, chest or left arm pain, Q wave amplitude, ST elevation and depression and T inversion, and as output the ischaemia probability. BADILINI et al. (1992), used ST segment frequency characteristics for ischaemic episodes detection. Another class of techniques for ischaemia detection is based on arti®cial neural networks (ANN). BAXT (1991) proposed a four-layer ANN trained by back-propagation for ischaemic patient identi®cation considering features from patient history, physical examination and ECG characteristics. STAMKOPOULOS et al. (1992) used a three-layer ANN trained by back-propagation using as input the raw signal corresponding to the ST segment. In other work (STAMKOPOULOS et al., 1998), they used non-linear principal component analysis for ischaemic beat classi®cation. SILIPO et al. (1994) adopted a three-layer ANN trained by back-propagation using as input the ST amplitude and slope. OUYANG et al. (1997) also developed a three-layer feed forward ANN trained by back-propagation, but for ischaemic patient identi®cation. As input layer they used 40 nodes, ®ve ECG characteristic values (Q, R, S and T waves amplitudes and ST deviation) for each one of the eight leads (I, II and V1±6). SILIPO and MARCHESI (1998) compare various approaches for ischaemia detection based on ANNs: static ANNs, static ANNs combined with principal component analysis, recurrent ANNs and knowledgelearning networks. There are also ischaemia detection techniques based upon different heuristic algorithms. OATES et al. (1989) used decision tree methods on three quasi-orthogonal leads. JAGER et al. (1992) used the Karhunen±LoeÁve transform. TADDEI et al. (1995) developed a geometric method, while VILA et al. (1997) developed a monitoring system for coronary care units based on fuzzy logic. 1

A knowledge-based approach is prepared to detect ischaemic episodes in long duration ECGs. The method is based on a fourstage schema. The ®rst is used for noise handling, artefact characterisation and extraction of ECG features. The second stage is beat classi®cation (ischaemic or not) using medical knowledge in the form of rules based on the features obtained in the ®rst stage. The third stage is window classi®cation (ischaemic or not). The fourth stage identi®es and merges the sequences of ischaemic windows detecting the ischaemic episodes. The proposed method is novel in several aspects; the whole detection process is structurally divided into four distinct stages. This division is made to naturally emulate the diagnostic steps followed by cardiologists and signi®cantly facilitates the speci®cation, adjustment and tuning of the overall method. Another important aspect of the approach is that it explicitly deals with noise problems. A noise handling procedure is proposed (applied in the pre-processing stage) that enables ef®cient treatment of most types of noise appearing in ECG recordings. Moreover, for ischaemic beat classi®cation, medical knowledge is used in the form of three rules, one of which (T wave inversion or ¯attening) (ROWLANDS, 1982; GOLDMAN, 1982) is used for the ®rst time for automated diagnosis. Also introduced is the notion of ischaemic window, which is a time window containing mostly (to allow tolerance in the decision) ischaemic beats. Also the method exhibits ¯exibility in the de®nition of an ischaemic episode as a sequence of ischaemic windows by allowing small intermediate intervals containing normal beats. These tolerance characteristics of the method allow on the one hand for the ef®cient treatment of artefacts, and on the other hand for dealing with problems related to the fact that strict rules (with certain threshold values) are used for beat classi®cation. Finally, it is worth mentioning that the technique is real-time and exhibits the highly desirable characteristic that it is capable of providing explanations for each decision made at every stage of the method. Experimental results using the ESC ST-T database indicate that the proposed diagnostic procedure is effective and performs well both in terms of sensitivity and positive predictive accuracy.

2 Method A four-stage procedure was developed for ischaemic episodes detection as shown in Fig. 1. The four stages correspond to noise handling and ECG feature extraction, beat classi®cation, window classi®cation and identi®cation of ischaemic episodes duration. In the ®rst stage, pre-processing of the ECG recording is performed to achieve noise removal and extraction of the signal features to be used for beat characterisation. In the second stage each beat is classi®ed as normal, abnormal (ischaemic) or artefact. This information is used in the third stage (the window characterisation stage) where each 30-s ECG window is classi®ed as ischaemic or not. In the fourth stage the identi®cation of start and end points of each ischaemic episode is performed

ECG feature extraction and noise handling beat classification window classification ischaemic episode identification

Fig. 1 The four-stage technique 2

based on the concatenation of consecutive ischaemic windows. It is noted that the whole procedure described above is applied in each lead separately. At the last stage, a merging procedure is followed to identify the overall ischaemic episodes from the episodes detected in each available lead.

2.1 ECG feature extraction and noise handling 2.1.1 ECG feature extraction: At this stage the beginning of the ST segment (J point) and the peak of the T wave are detected. We start with the detection of a point in the QRS complex (QRS point) for each beat using the HAMILTON and TOMPKINS (1986) algorithm. To make this algorithm faster some modi®cations have been made: speci®cally, after the detection of a QRS complex we ignore the next 300 ms. This means that the modi®ed QRS detector will become 30% faster but it also means that in cases of tachycardia (with a heart rate higher than 200 beats min ÿ1) the QRS detection will fail. Nevertheless, these cases are rare and deserve special treatment by the cardiologist. The QRS detection continues as follows: ®rst, the main wave of the QRS complex (not the R wave) is identi®ed in the window [QRS ÿ 280 ms, QRS ‡ 120 ms] by locating the point with maximum absolute signal value. The next step is an initial estimation of the isoelectric line, which is de®ned as the mean value of the signal in the window [QRS ÿ 100 ms, QRS ÿ 80 ms], and is used for the location of the point in the QRS complex with maximum absolute deviation from that estimated isoelectric line. This point is the peak of the main wave in the QRS complex. It is used of as a reference point (RP) to continue the search for the ®nal identi®cation of the isoelectric line and the location of the start point (J point) of the ST segment. The algorithm developed by DASKALOV et al. (1998) is applied to the window [RP ÿ 100 ms, RP ÿ 40 ms] and searches for an interval of 20 ms with signal slope (Cs ) less than or equal to 2.5 mV ms ÿ 1. This interval is used for the de®nition of the isoelectric line. The original algorithm (DASKALOV et al., 1998) uses a slope criterion of Cs  5 mV ms ÿ 1, but better results were obtained by using a stricter threshold of 2.5 mV ms ÿ1. The same algorithm is applied to the window [RP ‡ 20 ms, RP ‡ 120 ms] to locate the J point. If all the above stages have been completed successfully, the algorithm continues to locate the peak of the T wave. Where no isoelectric line or J point has been detected, the current beat is classi®ed as an artefact and the procedure starts again with the next beat. We locate the point Tonset at J80 ‡ 0.0375* R-R, where J80 ˆ J ‡ 80 ms and R-R is the time interval between the current RP and the previous one. We search for the peak of the T wave in the window [Tonset, Tonset ‡ 200 ms], which is de®ned as the point with maximum difference in amplitude with respect to the J80 point. 2.1.2 Noise handling: The procedure described above produces very good results only when the ECG recording has a high signal-to-noise ratio (SNR). If we attempt to de®ne the isoelectric line and detect the J point in a noisy signal using the method described several problems will occur (middle row in Fig. 2). The presence of noise (top row in Fig. 2), such as power line interference (A=C), the electromyographic contamination (EMG) and the baseline wandering (BW), may lead the algorithm to ambiguous results. To overcome this problem we developed a technique that manages to remove BW and to accurately detect the isoelectric line and the J point in cases where the ECG is contaminated with A=C and=or EMG noise (bottom row in Fig. 2). Medical & Biological Engineering & Computing 2000, Vol. 38

A/C interference

isoelectric line ST segment

isoelectric line

ST segment

baseline wandering

EMG contamination

isoelectric line

ST segment

isoelectric line

isoelectric line

ST segment

isoelectric line

ST segment

ST segment

Fig. 2 Detection of ECG characteristics in three types of noisy signals (top row), when the noise handling method is applied (bottom row) or not (middle row)

The noise handling procedure starts by treating ®rst the problem of baseline wandering. It is well known (BROCKWELL et al., 1991) that slow noise can be modelled successfully by low-order polynomials. This is the approach followed. Considering a small time interval in the ECG signal, for example one cardiac cycle, then the baseline shift can be modelled by a ®rst-order polynomial (straight line). As a consequence, subtraction of the polynomial from the recorded signal reproduces the original ECG. For each cardiac cycle, we consider the window [RP ÿ [R-R=2.5] ÿ 60 ms, RP ‡ [R-R* 0.6] ÿ 60 ms], where [] denotes the round-off operator. This window de®nes a time interval that starts approximately 60 ms before the P wave and ends approximately 60 ms after the T wave. Let x…t†; t ˆ 1; 2; . . . ; N be the recorded ECG signal. Using a ^…t† least squares procedure we can estimate the polynomial x that best ®ts x…t†: ^0 ; ^…t† ˆ x ^1 t ‡ x x

for t ˆ 1; 2; . . . ; N

…1†

The corrected ECG signal, y…t† (without the baseline drift) is given by ^t; y…t† ˆ x…t† ÿ x

for t ˆ 1; 2; . . . ; N

…2†

We have observed that the existence of the QRS complex slightly shifts the polynomial towards its main QRS polarity: if the QRS has a large R wave then the polynomial shifts upwards and the opposite happens when Q or S waves are large. Thus, a modi®ed two-stage procedure has been adopted. In the ®rst stage, we estimate the polynomial corresponding to x…t†: ^0 ^…t† ˆ x ^1 t ‡ x x

…3†

Medical & Biological Engineering & Computing 2000, Vol. 38

As mentioned above, x…t† may have a slightly diverted slope due to, for example, a large R wave. Let us assume that the QRS complex consists of the samples x…t† for t ˆ t1 ; . . . ; t2 . In order to decrease the in¯uence of the QRS complex on the estimated polynomial, in the second stage, we replace the QRS complex ^…t†. with the corresponding values of the polynomial x Thus we get a new signal, denoted u…t†, as follows: N

^…t1 †; . . . ; x ^…t2 †; fu…t†gtˆ1 ˆ fx…1†; . . . ; x…t1 ÿ 1†; x x…t2 ‡ 1†; . . . ; x…N†g

…4†

Then, we compute the ®tting polynomial ^u…t† ˆ ^u1 t ‡ ^u0

…5†

and we obtain the ®nal ECG signal, f …t†, as f …t† ˆ x…t† ÿ ^u…t†

…6†

which is without BW noise and also translated around the zero voltage level. It must be noted that in cases where no baseline wandering exists the in¯uence of the above procedure on the original signal is very small; this becomes apparent from the high scores achieved by the proposed procedure. After the baseline correction, we proceed with the isoelectric line and the J point identi®cation. The isoelectric line is de®ned as the mean value of the signal f …t† in the window [RP ÿ 80 ms, RP ÿ 60 ms]. We use a moving averaging window of 20 ms in the interval [RP ‡ 20 ms, RP ‡ 120 ms] to obtain the signal g…t†. The J point is detected using the DASKALOV et al. (1998) algorithm on the signal g…t†. This averaging technique does not remove the AC or the EMG noise from the ECG signal but is used as a rule of thumb for the de®nition of the isoelectric line and the J point. 3

Fig. 2 clearly illustrates the improvement of the proposed method in the detection of the isoelectric line and the J point. The top row shows the three types of noise distortion, the middle row displays the detected characteristics without use of our method and the bottom row the detected characteristics when our method is applied.

Detection of ischaemic beats

2.2 Beat classi®cation In the everyday medical practice when a cardiologist uses a long-term ECG to diagnose ischaemia, two features are examined in every available lead, the ST segment and the T wave. Our beat classi®cation method is based on rules that take into account the above features. More speci®cally we consider three rules (ROWLANDS, 1982; GOLDMAN, 1982): the ®rst one (top row in Fig. 3) classi®es the beat as ischaemic when the ST deviation is more than 0.8 mm (0.08 mV) below the isoelectric line and has a slope (angle) larger than 65 measured from the vertical line. The ST deviation is measured at the point J80 (J ‡ 80 ms) when the cardiac rhythm is less than 120 beats min ÿ 1 or at the point J60 (J ‡ 60 ms) when the heart rate is higher than the previous threshold. The ST slope is measured considering the line segment from J to J80 (or J60). The second rule (middle row in Fig. 3) refers to positive ST segment deviations: when the point J80 (or J60) is more than 0.8 mm above the isoelectric line then this beat is characterised as ischaemic. The third rule (bottom row in Fig. 3) refers to the T wave inversion or ¯attening: if, at the initial beats of the ECG recording, the T wave has positive (negative) voltage (we use the ®rst 30 s to extract the polarity) then all beats with negative (positive) T wave voltage are classi®ed as ischaemicÐalso, beats with T waves of very low voltage, compared to the T waves voltage of initial beats, are classi®ed as ischaemic. It must be noted that this method of beat classi®cation is unreliable when the SNR is very low. In such cases it is risky to perform beat classi®cation due to the lack of reliable de®nition of

R

R T

P

R P

T

P

S abnormal T

P

R T

P

S abnormal R

the isoelectric line and the J point. In noisy cases, even an expert doctor cannot decide safely if a beat is ischaemic or not. When our algorithm encounters artefacts (as an output of the ®rst stage) it ignores them and behaves as if these artefacts had never been met. The beat classi®cation method is summarised below:

S o normal(angle