CARNEGIE-MELLON UNIVERSITY IMPROVED PRIMITIVE EXTRACTION FOR SYNTACTIC ANALYSIS OF LONG-TERM AMBULATORY ELECTROCARDIOGRAMS

Similar documents
ISSN: ISO 9001:2008 Certified International Journal of Engineering and Innovative Technology (IJEIT) Volume 2, Issue 10, April 2013

Assessment of Reliability of Hamilton-Tompkins Algorithm to ECG Parameter Detection

USING CORRELATION COEFFICIENT IN ECG WAVEFORM FOR ARRHYTHMIA DETECTION

Wavelet Decomposition for Detection and Classification of Critical ECG Arrhythmias

HST-582J/6.555J/16.456J-Biomedical Signal and Image Processing-Spring Laboratory Project 1 The Electrocardiogram

ECG QRS Detection. Valtino X. Afonso

Biomedical. Measurement and Design ELEC4623. Lectures 15 and 16 Statistical Algorithms for Automated Signal Detection and Analysis

A Novel Application of Wavelets to Real-Time Detection of R-waves

Removal of Baseline Wander from Ecg Signals Using Cosine Window Based Fir Digital Filter

CHAPTER 5 WAVELET BASED DETECTION OF VENTRICULAR ARRHYTHMIAS WITH NEURAL NETWORK CLASSIFIER

CHAPTER IV PREPROCESSING & FEATURE EXTRACTION IN ECG SIGNALS

ECG Beat Recognition using Principal Components Analysis and Artificial Neural Network

Vital Responder: Real-time Health Monitoring of First- Responders

Delineation of QRS-complex, P and T-wave in 12-lead ECG

PERFORMANCE CALCULATION OF WAVELET TRANSFORMS FOR REMOVAL OF BASELINE WANDER FROM ECG

DETECTION OF EVENTS AND WAVES 183

Ventricular Parasystole

Interpreting Electrocardiograms (ECG) Physiology Name: Per:

Analysis of Electrocardiograms

LABVIEW based expert system for Detection of heart abnormalities

DETECTION OF HEART ABNORMALITIES USING LABVIEW

AUTOMATIC ANALYSIS AND VISUALIZATION OF MULTILEAD LONG-TERM ECG RECORDINGS

Genetic Algorithm based Feature Extraction for ECG Signal Classification using Neural Network

Assessment of the Performance of the Adaptive Thresholding Algorithm for QRS Detection with the Use of AHA Database

DIFFERENCE-BASED PARAMETER SET FOR LOCAL HEARTBEAT CLASSIFICATION: RANKING OF THE PARAMETERS

Signal Processing of Stress Test ECG Using MATLAB

Simulation Based R-peak and QRS complex detection in ECG Signal

Quick detection of QRS complexes and R-waves using a wavelet transform and K-means clustering

An ECG Beat Classification Using Adaptive Neuro- Fuzzy Inference System

ECG Rhythm Analysis by Using Neuro-Genetic Algorithms

REVIEW ON ARRHYTHMIA DETECTION USING SIGNAL PROCESSING

Extraction of Unwanted Noise in Electrocardiogram (ECG) Signals Using Discrete Wavelet Transformation

PCA Enhanced Kalman Filter for ECG Denoising

Testing the Accuracy of ECG Captured by Cronovo through Comparison of ECG Recording to a Standard 12-Lead ECG Recording Device

Real-time Heart Monitoring and ECG Signal Processing

ECG Signal Analysis for Abnormality Detection in the Heart beat

Developing Electrocardiogram Mathematical Model for Cardiovascular Pathological Conditions and Cardiac Arrhythmia

MORPHOLOGICAL CHARACTERIZATION OF ECG SIGNAL ABNORMALITIES: A NEW APPROACH

An electrocardiogram (ECG) is a recording of the electricity of the heart. Analysis of ECG

Powerline Interference Reduction in ECG Using Combination of MA Method and IIR Notch

Comparison of Different ECG Signals on MATLAB

Keywords: Adaptive Neuro-Fuzzy Interface System (ANFIS), Electrocardiogram (ECG), Fuzzy logic, MIT-BHI database.

Electrocardiography Biomedical Engineering Kaj-Åge Henneberg

UNDERSTANDING YOUR ECG: A REVIEW

CASE 10. What would the ST segment of this ECG look like? On which leads would you see this ST segment change? What does the T wave represent?

Design of the HRV Analysis System Based on AD8232

Outline. Electrical Activity of the Human Heart. What is the Heart? The Heart as a Pump. Anatomy of the Heart. The Hard Work

Electrocardiography for Healthcare Professionals

8/20/2012. Learning Outcomes (Cont d)

On QRS detection methodologies: A revisit for mobile phone applications, wireless ECG monitoring and large ECG databases analysis

POWER EFFICIENT PROCESSOR FOR PREDICTING VENTRICULAR ARRHYTHMIA BASED ON ECG

Panorama. Arrhythmia Analysis Frequently Asked Questions

A Review on Arrhythmia Detection Using ECG Signal

A Novel Approach for Different Morphological Characterization of ECG Signal

GE Healthcare. The GE EK-Pro Arrhythmia Detection Algorithm for Patient Monitoring

SPECTRAL ANALYSIS OF LIFE-THREATENING CARDIAC ARRHYTHMIAS

Classification of electrocardiographic ST-T segments human expert vs artificial neural network

BTL CardioPoint Relief & Waterfall. Relief & Waterfall. Abnormalities at first sight

DEVELOPMENT OF A SIMPLE SOFTWARE TOOL TO DETECT THE QRS COMPLEX FROM THE ECG SIGNAL

Building an Electrocardiogram (ECG) Diagnostic System. Collection Editor: Christine Moran

This presentation will deal with the basics of ECG description as well as the physiological basics of

INVESTIGATION OF ROUNDOFF NOISE IN IIR DIGITAL FILTERS USING MATLAB

Heart Rate Calculation by Detection of R Peak

MULTILEAD SIGNAL PREPROCESSING BY LINEAR TRANSFORMATION

ECG DE-NOISING TECHNIQUES FOR DETECTION OF ARRHYTHMIA

PROCESSING THE ABDOMINAL FETAL ECG USING A NEW METHOD. Zentralinstitut fur Biomedizinische Technik der Universitat Erlangen-Nurnberg, FRG

A MATHEMATICAL ALGORITHM FOR ECG SIGNAL DENOISING USING WINDOW ANALYSIS

Removal of Baseline wander and detection of QRS complex using wavelets

: Biomedical Signal Processing

Lab #3: Electrocardiogram (ECG / EKG)

HST.582J / 6.555J / J Biomedical Signal and Image Processing Spring 2007

Continuous Wavelet Transform in ECG Analysis. A Concept or Clinical Uses

Electrocardiography for Healthcare Professionals

Biomedical Signal Processing

Automated Diagnosis of Cardiac Health

Combination Method for Powerline Interference Reduction in ECG

Lecture outline. Electrical properties of the heart. Automaticity. Excitability. Refractoriness. The ABCs of ECGs Back to Basics Part I

BASIC CONCEPT OF ECG

PART I. Disorders of the Heart Rhythm: Basic Principles

Cardiovascular Physiology

11/18/13 ECG SIGNAL ACQUISITION HARDWARE DESIGN. Origin of Bioelectric Signals

Robust Detection of Atrial Fibrillation for a Long Term Telemonitoring System

The Function of an ECG in Diagnosing Heart Conditions. A useful guide to the function of the heart s electrical system for patients receiving an ECG

Design of Software for an Electrocardiogram Analyzer

Premature Ventricular Contraction Arrhythmia Detection Using Wavelet Coefficients

MARS Ambulatory ECG Analysis The power to assess and predict

Automatic Detection of Abnormalities in ECG Signals : A MATLAB Study

Temporal Analysis and Remote Monitoring of ECG Signal

2017/8/23 1. SE-2003&SE-2012 Holter Analysis System

Analyzing the Heart with EKG

Chapter 2 Quality Assessment for the Electrocardiogram (ECG)

Chapter 3 Biological measurement 3.1 Nerve conduction

Automatic Identification of Implantable Cardioverter-Defibrillator Lead Problems Using Intracardiac Electrograms

Robust system for patient specific classification of ECG signal using PCA and Neural Network

Ecg Ebook PDF ecg What Is An Electrocardiogram (ekg Or Ecg) Test: Purpose... Electrocardiogram (ecg Or Ekg) American Heart Association

Artificial Neural Networks in Cardiology - ECG Wave Analysis and Diagnosis Using Backpropagation Neural Networks

Final Report. Implementation of algorithms for QRS detection from ECG signals using TMS320C6713 processor platform

IJRIM Volume 1, Issue 2 (June, 2011) (ISSN ) ECG FEATURE EXTRACTION FOR CLASSIFICATION OF ARRHYTHMIA. Abstract

Step by step approach to EKG rhythm interpretation:

Chapter 1. Introduction

Transcription:

CARNEGIE-MELLON UNIVERSITY IMPROVED PRIMITIVE EXTRACTION FOR SYNTACTIC ANALYSIS OF LONG-TERM AMBULATORY ELECTROCARDIOGRAMS A DISSERTATION SUBMITTED TO THE GRADUATE SCHOOL IN PARTIAL FULFILLMENT OF THE REQUIREMENTS for the degree MASTER OF SCIENCE in ELECTRICAL ENGINEERING by Douglas A. Coast Pittsburgh, Pennsylvania March 30, 1984 This research was funded in part by NIH GRANT No. 1 RO 1 HL 2606-01 and ASRC GRANT No. A-03-83/84.

ABSTRACT Abstract A system developed for arrhythmia analysis of Holter ECGs employs a syntactic pattern recognition approach. This system consists of two independent stages: 1) primitive extraction- digitized ECG data is reduced to sequence of predefined subpattern shapes or "primitives", and 2) syntactical analysis- the primitive sequence is analyzed in accordance with syntactic principles to detect and classify arrhythmic beats. Further evaluation of this system using data with commonly encountered clinical artifact (muscle noise, baseline variation) resulted in numerous detection and classification errors. Considering each stage separately, the performance deficiencies were identified as errors in the primitive extraction stage. In particular, the extraction algorithm did not accurately detect QRS complexes or accurately determine the onset and offset of those which were detected. This research proposes improvements in the primitive extraction stage. Specifically, the primitive shape set was modified to more accurately represent the structure of the ECG waveform components, especially the QRS complex. In addition, a new primitive extraction algorithm was developed which segments the ECG waveform on the bagis of frequency content. This technique allows the QRS complex to be accurately and consistently delineated with respect to onset and offset despite clinical levels of artifact. Subsequent extraction of "V"-shaped primitives then provides a detailed structural representation of the QRS complex which is easily recognizable as a primitive sequence.

ACKNOWLEDGEMENT Acknowledgement I would like to thank my advisor, Dr. S. A. Briller for his guidance and suggestions, and for the opportunity to conduct this research. I would would also like to thank Dr. A.T. Bahill and Dr. D. Cassasent for agreeing to participate as committee members, and for their valuable suggestions and criticisms. I would especially like to thank Dr. G. Cano for carefully reading and critiquing this manuscript and for the many useful suggestions offered throughout the course of this research.

TABLE OF CONTENTS Table of Contents 1. INTRODUCTION 1.1. Holter Monitoring 1.2. Computer Analysis 1.3, Syntactic Approach 1.3.1. System Implementation 1.3.1.1. Primitive Extractor 1.3.1.2. Arrhythmia Detection 1.3.1.3. Arrhythmia Classification 1.3.2. Initial Results 2. PROBLEM STATEMENT 2.1. Design Deficiencies 2.2. Performance Deficiencies 2.3. Research Objectives 3. PRIMITIVE SET SELECTION 3,1. Previous Primitive Sets 3.2. Constraints 3.3. Selection of the Primitive Set 4. PRIMITIVE EXTRACTION 4.1. Previous Algorithm 4.2. ECG Signal Filtering 4.3. QRS Detection/Delineation 4.3.1. HP ECG Analysis Program 4.3.2. High Frequency Signal Energy Technique 4.4. "V"-Primitive Extraction 4.5. Primitive Extraction Summary 5. EXPERIMENTAL PROCEDURE 5.1. Evaluation Of QRS Detection Algorithms 5.1.1. Threshold Determination 5.1.2. Performance Measures 5.2. Database Selection 5.3. "V"-Primitive Extraction 6. RESULTS AND ANALYSIS 6.1. QRS Detection/Delineation Algorithm 6.1.1. Threshold Selection 6.1.2. Detection Performance 6.1.3. Delineation Performance 6.1.4. Algorithm Selection 6.2. Previous Algorithm 6.3. "V"-Primitive Extraction 1 1 2 3 4 4 5 7 7 8 8 9 10 12 12 13 15 18 18 19 23 24 27 30 32 34 34 35 35 38 42 43 43 43 46 46 51 51 53

TABLE OF CONTENTS 7. DISCUSSION AND CONCLUSIONS 7.1. Problem Summary 7.2. Summary Of Improvements 7.3. Advantages of New Algorithm 7.4. Recommendations For Future Improvement 67 67 67 68 69

LIST OF FIGURES III List of Figures Figure 1-1: Figure 1-2: Figure 2-1: Figure 3-1: Figure 4-1: Figure 4-2: Figure 4-3: Figure 4-4: Figure 4-5: Figure 4-6: Figure 4-7: Figure 4-8: Figure 5-1: Figure 5-2: Figure 5-3: Figure 6-1: Figure 6-2: Figure 6-3: Figure 6-4: Figure 6-5: Figure 6-6: Figure 6-7: Figure 6-8: Figure 6-9: Figure 6-10: Figure 6-11: Figure 6-12: Figure 6-13: Figure 6-14: Figure 6-15: Figure 6-16: Figure 6-17: Figure 6-18: Figure 6-19: Figure 6-20: Primitive Representation Finite State Automaton Primitive extraction errors. QRS Complex Nomenclature, Frequency response of low-pass running-average filters. Frequency response of high-pass running-average filters. Frequency response of derivative estimator. WBI Example. RA-HP/N=4 filter response. Signal Energy Example, Detection Pulses For Different Time Windows. Primitive Extraction Overview. Performance Matrix Standard ECG Data File. Standard ECG Combined With Noise. Sensitivity. False Positive Rate. Mean Error in Detected Onset. Standard Deviation of Error in Detected Onset. Mean Error in Detected Duration. Standard Deviation of Error in Detected Duration. Sensitivity. False Positive Rate. Mean Error in Detected Onset. Standard Deviation of Error in Detected Onset. Mean Error in Detected Duration. Standard Deviation of Error in Detected Duration. "V"-Primitive Re 3resentations. "V"-Primitive "V"-Primitive "V"-Primitive "V"-Primitive "V"-Primitive "V"-Primitive "V"-Primitive Re 3resentat=ons. Re 3resentations. Re 3resentations, Re ~resentations. Re 3resentations. Re 3resentations. Re 3resentations. 6 6 11 17 22 22 26 26 29 29 31 33 36 41 41 48 48 49 49 5O 5O 54 54 55 55 56 56 59 6O 61 62 63 64 65 66

LIST OF TABLES IV List of Tables Table 3-1: Table 3-2: Table 4-1: Table 4-2: Table 5-1: Table 5-2: Table 6-1: Table 6-2: Table 6-3: Ollapally s Primitive Set New Primitive Set Cut-Off Frequencies For RA Filters. Effective Time Windows. Performance Measure Notation. Noise Levels. Algorithm #1 Results Algorithm #2 Results Previous Algorithm Results 14 17 23 31 39 40 44 45 52

INTRODUCTION 1 Chapter 1 INTRODUCTION 1.1. Holter Monitoring In the normal heart, the sinus node generates an electrical impulse that is conducted over the right atrium to the A-V node; from here a specialized conduction network transmits the electrical excitation over the interior of the ventricles. Any abnormality involving the origin of the electrical impulse can cause an abnormal rhythm or arrhythmia. Arrhythmias are grouped into several different categories, depending upon the cause and location of the disturbance. The two major subdivisions are ventricular and supra-ventricular arrhythmias. In general, ventricular arrhythmias are considered to be much more life-threatening than supra-ventricular arrhythmias [13]. The electrocardiogram or ECG, a record of electrical potentials generated by the heart, is commonly used for diagnosing cardiac arrhythmias and other cardiac disorders. The standard resting ECG is obtained by connecting a number of electrodes to well-defined locations on the body, and then recording a few seconds from each of 12 electrode combinations. A physician or cardiologist then examines a report consisting of these 12 strips and an additional rhythm strip of 8 seconds duration to make a diagnosis. The standard ECG can aid detection of most persistent cardiac disorders and arrhythmias. However, if an arrhythmia is intermittent or occurs only under certain conditions, there is little chance that the problem will be discovered by a routine ECG. These paroxysmal episodes of cardiac arrhythmia are often very serious and in some cases potentially lifethreatening. Some method for diagnosis and management of this condition was required [20].

INTRODUCTION 2 The standard ECG is inadequate for monitoring treatment of arrhythmic conditions. Evaluation of drug therapy requires a long-term record of the number and type of arrhythmias. The solution is long-term ambulatory ECG monitoring [13]. Ambulatory or Holter ECG monitoring, named after Norman J. Holter, D.SCo, the first to implement the technique (in 1949), is an extended recording of cardiographic activity (usually 24 hours) as the patient goes about his normal daily routine. The most common method uses a miniature tape recorder to record 2 channels of analog data from electrodes attached to the patient s chest. The continuous record of approximately 100,000 cardiac cycles thus obtained is played back on a scanner monitored by a technician to determine the number and type of each arrhythmia occurring [13]. Scanning devices enable playback of Holter tapes at speeds of 60 to 120 times the recording speed. These analog devices also provide some capability to detect and count both premature ventricular and supra-ventricular beats with limited accuracy. The technician must determine the accuracy of the counts and document various arrhythmia types with stripchart records showing abnormality. The technician then uses this information to generate a report for a cardiologist to interpret. Manual scanning of Holter records is visually fatiguing and boring. Attention wanders increasing the inaccuracy of the method. At best, the scanning process provides only a rough estimate of the number and types of arrhythmias present. 1.2. Computer Analysis Although the information from conventional scanning is adequate for usual clinical needs, more demanding research studies require significantly more quantitative information. The length of Holter ECG records (24-48 hours of ECG data) has provided incentive for the utilization of digital computers to increase the speed and accuracy of analysis. Computer techniques under development for automated rhythm monitoring in Coronary Care units were adapted for high-speed analysis of ambulatory ECGs in the early 1970 s [23]. These attempts spurred much research involving computer analysis systems. Many researchers have since reported analysis systems using pattern recognition techniques to detect and classify cardiac arrhythmias [6],[ 10],[ 16],[23].

INTRODUCTION 3 Initially, automated analysis systems used algorithms based on techniques employed by cardiologists to analyze time-domain representations of the ECG. The two most popular techniques used a computer either to evaluate features extracted from the time-domain signal or to compare that signal with a set of stored patterns or templates in order to group beats of similar morphologies. These two techniques, feature extraction and crosscorrelation, are essentially "classical" techniques since the concepts involved in each have long been used in pattern recognition and communication theory. Later analysis efforts have utilized a frequency-domain representation of the ECG as the basis for feature extraction, but this method introduces additional problems that are difficult to solve [16],[23]. There are a variety of computerized Holter analysis systems under development. Two commercially available systems detect ventricular premature beats and require extensive operator interaction to maintain accurate results [10]. Their design prohibits modification for classification of other types of arrhythmias. 1.3. Syntactic Approach Research by Ollapally [17] at Allegheny General Hospital, Pittsbuurgh, PA used syntactic pattern recognition techniques to detect arrhythmias in Holter monitor data. The syntactic approach possesses pattern handling capacity lacked by other methods [12]. This method utilizes information derived from both the shape and rhythm of the ECG waveform by preserving individual waveshapes within the context of occurrence. The basic strategy is to first reduce the input ECG cycle data to a string of elemental waveshapes or "primitives". Secondly, the syntax of the primitive string is analyzed to determine if the ECG cycle corresponds to a normal or arrhythmic beat. The goal of this syntactic analysis research was to implement a system which could perform a complete Holter ECG analysis with no operator intervention. Practicality limits the recognition capacity of an initial system to a small subset of arrhythmias; the design should permit the easy addition of new arrhythmia classes without necessitating a complete redesign of the system. Ollapally concluded [17] that a method based on syntactic pattern

INTRODUCTION 4 recognition would best satisfy the project goals. A syntactic approach provides a modular system which allows efficient upgrading of performance in independent steps. This modularity results from the two inherent analysis stages involved; the first requires derivation of a symbolic representation for each ECG cycle in terms of "primitive" shapes, and the second requires subsequent analysis of the symbolic representation using syntactic principles. Thus if the primitive extraction stage is adequately designed, the classification stage can be independently designed and upgraded to accommodate additional arrhythmia classes. 1.3.1. System Implementation Oilapally implemented a syntactic arrhythmia analysis system in an attempt to satisfy the specified goals [17]. One channel of analog Holter ECG data was low-pass filtered (to avoid aliasing) with a two-pole analog filter having a 3 db cut-off frequency of 50 HZ, then digitized at the rate of 125 samples per second and stored in a disk file by a DEC 11/60 minicomputer. Subsequent processing of the digitized data was done by the minicomputer using three separate FORTRAN programs called the Primitive Extractor, the Arrhythmia Detector, and the Arrhythmia Classifier. 1.3.1.1. Primitive Extractor Syntactic pattern recognition requires that each beat first be represented as a string of primitives, predefined symbols that represent the important structural features present in the ECG. The primitive extraction stage was designed to use primitives representative of actual waveform shapes. For arrhythmia analysis, important diagnostic information is also contained in waveform timing. As each primitive was selected, it was characterized further with a second variable, primitive duration. By this strategy, both timing information and structural information were retained. Ollapally selected a set of 12 primitive symbols to represent various basic waveform shapes and subdivisions of these shapes. Table 3-1 on page 14 illustrates these 12 symbols and the corresponding waveform shapes they are intended to represent. Size (small, medium, large) refers to the amplitude of the primitive. These amplitudes were quantized and the quantization thresholds set adaptively. Thus if the amplitude of the ECG complex were to

INTRODUCTION 5 slowly increase or decrease in size with time, thresholds would be modified appropriately. The primitive extraction algorithm computed the current average ECG amplitude and examined points ahead for significant deviations. On detection of a deviation, the algorithm measured instantaneous peaks, slopes and magnitudes of the ECG, assigning primitives on the basis of these measurements. Primitive duration was set equal to the span of the corresponding ECG element. Figure 1-1 shows a typical segment of Holter ECG data and the corresponding graphical primitive representation below it. Each primitive is represented by a shape having proportional amplitude and duration, with the QRS primitive depicted as a rectangular pulse having the same width as the detected QRS complex. 1.3.1.2. Arrhythmia Detection The sequence of primitive symbols produced by the primitive extraction stage provides the input for the arrhythmia detection stage. The syntax of the each cycle representation is evaluated to determine if it is a grammatically correct representation for a normal cycle. If not, then the cycle is cl assified as abnormal and passed to the final arrhythmia classification stage. The algorithm used to detect the syntax of a primitive string was a finite state automaton. This algorithm defines a structure consisting of one node for each possible step in evaluating the primitive string, and also nodes to indicate states corresponding to the starting state, and the final recognized and un-recognized states. The transition from the starting state to the next state, and then to the next state, and so on is contingent on the type of primitive next encountered in the string representation, and also on the value of the primitive attribute(s). The automaton is capable of recognizing a finite number of possible primitive sequences. Each new cycle representation is processed by the automaton: if the the primitive sequence corresponds to a possible normal sequence, the final state indicates recognition; otherwise, the final state indicates that the cycle was arrhythmic [17].

INTRODUCTION 6 1161,141112,7611611121168611121161161112 Figure 1-1: Primitive Representation 7orl else lorll else else starting state any else 4or6 final state -normal trap ~ ~ state -abnormal 12 else ii Figure 1-2.: Finite State Automaton

INTRODUCTION 7 Figure 1-2 illustrates an automaton capable of recognizing the normal ECG cycles of Figure 1-1. The automaton used by Ollapally actually consisted of 10 individual sub-automaton, each capable of recognizing one specific variation of a normal ECG cycle [17]. The automaton is initialized for each new set of ECG data by grammatical inference i"12] during a learning phase, and then constantly updated over time to adapt to changes in the normal ECG cycle. 1.3.1.3. Arrhythmia Classification Ollapally used syntactic pattern recognition only to detect arrhythmic beats; the subsequent classification stage uses a tree-like decision process. If a cycle is not recognized by the automaton, then the primitive sequence is passed to the arrhythmia classification stage. This stage then extracts several characteristics from the primitive sequence and applies an expert-generated knowledge base to determine the classification for the arrhythmic ECG cycle. 1.3.2. Initial Results This syntactic arrhythmia analysis system, as implemented by Ollapally, was capable of detecting and classifying premature ventricular contractions, supraventricular contractions, and coupled beats. The system has undergone initial clinical testing to evaluate performance. In all, 16000 beats from 22 different subjects were manually analyzed and then analyzed by Ollapally s system. Of these beats, 653 were premature ventricular beats and 1227 were premature supraventricular beats. Some records were exclusively premature ventricular beats, some exclusively premature supraventricular beats, and some contained a mix. Of the 1880 arrhythmic beats present in this low-noise, low-artifact data, 88% were correctly detected and classified by this system [17]. Noise and artifact handling capabilities were not incorporated at this stage of development. Holter data with moderate to small T-waves, no baseline variation, and little or no muscle noise were used.

PROBLEM STATEMENT 8 Chapter 2 PROBLEM STATEMENT The syntactic arrhythmia analysis mentioned in the previous chapter is fully described in Ollapally s Ph.D. thesis, "A Cardiac Arrhythmia Detector and Classifier" [17]. Although this system served to demonstrate the potential of a syntactic pattern recognition approach, the emphasis in its development was on completing the entire system rather than careful design of each component part. Consequently, little effort was made to ensure accurate system performance in the presence of common clinical levels of artifact. This chapter summarizes deficiencies in design and performance which inhibit the easy expansion of recognition capacity and adversly affect system performance. 2.1. Design Deficiencies The selection of the previous primitive set was based upon choosing primitives directly representative of the elemental wave shapes occurring in an ECG. Two problem areas were encountered: 1) obtaining consistent primitive representations of QRS complexes and 2) recognition of a QRS complex from its component primitive shapes. Consequently, Ollapally added an additional primitive: the entire QRS complex. Experimentation was not performed to determine an improved primitive set that would be more effective in representing the salient features of QRS complexes. In designing his primitive set, Ollapally used a limited training set to determine the threshold levels used for quantizing primitive shapes into different size categories. Additionally, the number of subdivisions for each shape category were arbitrarily determined. This sub-division of primitive shapes by size should be more carefully determined, if performed at all. Primitive shapes characterized by two parameters, duration and amplitude, might enable more accurate representation.

PROBLEM STATEMENT 9 Another design feature incorporated by Ollapally is his use of syntactic pattern recognition only to detect arrhythmic beats, and not to also classify them. This approach seems to detract from the possible benefits of using a syntactic analysis structure. 2.2. Performance Deficiencies A more rigorous evaluation was undertaken to determine necessary areas of improvement in system performance. An additional 20 Holter ECG data segments of 5 minutes duration were digitized from sources having various commonly encountered characteristics [9]. The following are examples of these characteristics: Large amplitude T-waves. Pronounced baseline variation. Muscle noise. Performance of the arrhythmia detection and classification system was very poor in processing the new Holter ECG samples. Severe classification errors were found in several of the samples and indicated relationships between error types and signal characteristics. In particular, samples which contained large T-waves had a high number of false PVC detections resulting from confusion of these T-waves with QRS complexes. Other records showing pronounced baseline variation exhibited false premature beat detections when P- and T-waves occurred during baseline movement. The performance of the arrhythmia detection and classification system was then examined to determine muscle noise immunity. An artificial data set consisting of one relatively noise-free ECG cycle repeated at a fixed interval was created. Increasing amplitudes of gaussian white noise were added to this standard data set to simulate muscle noise. The performance of the system was dramatically reduced for even relatively small amounts of added noise. By examining the sections of data where misclassifications occurred, the source of error was identified as inaccuracies in the primitive extraction stage. Figure 2-1(A) illustrates the resulting primitive representation for the original data before noise was added. Figures 2-1(B) and 2-1(C) show results for increasing levels of noise.

PROBLEM STATEMENT 10 results shown in Figure 2-1 illustrate the inaccuracies representation which occur with even moderate levels of noise. in primitive Most classification errors observed in the performance evaluation detailed above can be directly attributed to inaccuracies in QRS complex representation. Specifically, the following list describes the most frequent errors: 1. QRS complex missed completely- causes confusion about the correct rhythm and subsequent classification errors. 2. Artifact (T-wave or muscle noise) incorrectly identified as a QRS complex- causes identification as a premature beat and confuses rhythm. 3. Inaccurate determination of QRS complex duration- causes identification as abnormal because of apparent abnormal duration. 2.3. Research Objectives Further research using this syntactic approach for arrhythmia analysis should first consist of circumventing the design deficiencies detailed in section 2.1. If a good basic system design can be developed, subsequent research can concentrate on improving the implementation. The performance evaluation detailed in section 2.2 demonstrated that improvements in system performance were definitely needed. All of the problems described can be attributed to inadequacies in the primitive extraction stage of the system. It is impossible to accurately analyze the performance of the detection and classification stages when the primitive string extracted does not accurately represent the ECG data. Consequently, the first step in improving system performance must include improvements in the primitive extraction stage. This research was performed with two basic objectives; 1) determine primitive set that better represents waveform features, and 2) improve primitive extraction both for more accurate QRS detection/delineation and improved noise immunity.

Figure 2-1: Primitive extraction errors. (B)

PRIMITIVE SET SELECTION 12 Chapter 3 PRIMITIVE SET SELECTION The primitive extraction phase of a syntactic analysis system is very important for the overall system performance. If the primitive representation of the ECG waveform information is incorrect, the subsequent detection and classification stages will perform poorly. The primitive set must allow accurate representation of the waveform features important for arrhythmia analysis. At the same time, the primitive set must allow a precise symbolic representation of each cycle. At the moment, there is no mathematically formal means of selecting the optimal primitive set. The primitive set must therefore be heuristically determined; the only prerequisite is that the primitives approximate basic shapes in the ECG. If basic shapes are chosen, the primitive set is small but the representation of the data is complicated and variable. If complex shapes are chosen, the representation of the data is less complex but the primitive set is larger and extraction algorithms are more complicated. The primitive set is the building block of the primitive extraction stage; the choice of primitive shapes dictates much of the design of the extraction algorithm. Therefore, the first area investigated in this research effort was the possible improvement of the primitive set used by Ollapally. 3.1. Previous Primitive Sets A literature search revealed four previous research efforts which use syntactic analysis or a closely related system. Beleforte et.al. [4] have used a syntactic algorithm for automated analysis of ECGs preprocessed by digital differentiation. The primitive set was 16 classes of spike-like waveforms resulting from QRS complexes; the classes are differentiated by the normalized

PRIMITIVE SET SELECTION 13 duration and amplitude of the spikes. This procedure is inherently limited in its usefulness because necessary information not contained in the first derivative of the ECG is lost. Udupa et al. [24] developed a syntactic analysis system which used straight line segments of equal length as the primitive set. ECG data is approximately represented by a sequence of straight line segments, each segment has one of three fixed positive or negative slope values, or a slope of zero for a horizontal segment. Another technique (Furno and Tompkins) [11] designed for QRS detection also uses straight line segments; the waveform is divided into a string of seven possible primitive shapes or "tokens". These seven primitives are interpreted as normal up/down, ectopic up/down, noise up/down, or horizontal. The thresholds used in classifying the primitives are determined during an initial learning phase. These primitives were designed primarily for enabling the differentiation of normal and ectopic beats; they are not easily expanded to enable the more precise waveform representation needed for more sophisticated arrhythmia classification. The primitive set used by Ollapally ~vas designed for concise representation of all the visible waveform shapes in the ECG [17]. The resulting primitive set (see Table 3-1 consisted of 12 primitive wave-shapes: small, medium, and large U, small, medium and large inverted U, small and large upslopes, small and large downslopes, a horizontal, and a QRS primitive. The QRS primitive was added as a temporary measure after problems were experienced in obtaining an adequate representation of the QRS complex with the other primitive shapes. 3.2. Constraints The primary concern in selecting a set of primitives is that the chosen set be adequate to compress the ECG but still retain sufficient information to accomplish detection and classification of arrhythmic beats. While most ventricular arrhythmias can be detected primarily on the basis of changes in R- R interval measurements, detection of other arrhythmia types requires recognition of changes in waveform morphology. Thus it is very important that the primitive set be able to represent these morphological changes.

PRIMITIVE SET SELECTION 14 Table 3-1: Ollapally s Primitive Set PRIMITIVES PRIMITIVE SHAPES i. Small U 2. Small inverted U 3. Medium U 4. Medium inverted U 5. Big U 6. Big inverted U 7. Small up-slope 8. Small down-slope 9. Big up-slope i0. Big down-slope ii. Horizontal 12. QRS complex Other considerations in choosing a primitive set include the necessity of obtaining consistent representations of an ECG cycle by cycle. The current implementation of this syntactic analysis system uses a finite state automaton as the string recognition mechanism. The automaton incorporates the duration of primitives as a parameter in the recognizer. By extending this feature, both the duration and amplitude of a primitive could be incorporated into the automaton. Another concern is that the set of primitives must be simple enough to facilitate rapid extraction from the data. If shapes are too complex, inordinate amounts of time will be spent extracting these shapes from the ECG data.

PRIMITIVE SET SELECTION 15 3.3. Selection of the Primitive Set The first step in this project was re-examination of Ollapally s original primitive set. These primitives were chosen to coincide with the basic waveform shapes occurring in Holter ECGs. However, the subdivision of the basic shapes according to size was completely arbitrary. By removing the amplitude quantization of the basic primitive shapes, the possibility of incorporating this additional parameter into the automaton is realized. This modification would increase the accuracy of primitive amplitudes passed to the automaton. If later evaluation determines that such accuracy is not required, primitive amplitudes could still be quantized using thresholds determined by the more "intelligent" second stage of the system. The two basic primitive shapes which remain after removing the quantization are a straight line segment and a U-shaped segment. Inverted U- shapes, and up and down slopes can be indicated by the sign of the amplitude parameter. The original primitive set considered by Ollapally [ 17] proved insufficient to adequately represent QRS complexes. The QRS representation problem requires accurate retention of the QRS height and slope in some form. By OIlapally s use of primitives with quantized height, he inherently limited the accuracy of possible QRS representation. If the U and inverted U primitives were used, important slope information from the QRS complex was lost. If straight line segments were used, the resulting QRS complex representation tended to be too complex and too variable. A complex primitive representation greatly increases the difficulty of determining waveshape onset and offset points in the subsequent detection and classification stages. These problems led Ollapally to declare one primitive to represent all QRS complexes. The primitive representation of the QRS complex should satisfy three basic criterion; 1) it must facilitate rapid extraction from ECG data, 2) it must be simple for efficient recognition by the following stages, and 3) it must retain information necessary for accurate classification. Based on OIlapally s attempts, QRS representation using only the

PRIMITIVE SET SELECTION 16 primitives he defined was ruled out. The first criterion suggests that more complex shapes are required than simple straight line segments. If the signal characteristics of the QRS complex are compared with other waveshapes in the ECG, it is evident that the QRS has a higher frequency content. Consequently, most QRS complexes appear as a V-shaped segment or a sequence of V- shaped segments as compared to the rounded U- or inverted U-shapes of the P-wave and T-wave. In fact, in electrocardiography QRS complexes are labeled according to the pattern of V-shaped waves present [5]. Figure 3-1 illustrates this labeling system. Some QRS complexes do not have a frequency content appreciably higher than other signal components, particularly in cases of conduction defects. In these cases, U-shaped primitives can adequately represent the required duration and amplitude information. In summary, the primitive set now proposed consists of 3 basic waveshapes; 1) a straight line primitive, 2) a U-shaped primitive, and 3) a shaped primitive. Associated with each primitive are two parameters, duration and amplitude. The duration parameter will always assume a positive integer value representing the time duration of the signal in sample points. The amplitude parameter will assume both positive and negative values as an indication of inflection for the the U and V primitives and as an indication of slope for the straight-line primitives. The Table 3-2 illustrates the resulting primitive shapes corresponding to positive and negative amplitudes.

SET SELECTION i 7 rsr rsr S R" RR Figure 3-1: QRS Complex Nomenclature. Table 3-2: New Primitive Set PRIMITIVE AMPLITUDE SIGN SHAPE -/,, - V

PRIMITIVE EXTRACTION 18 Chapter 4 PRIMITIVE EXTRACTION Primitive extraction, the process of decomposing an ECG waveform into a sequence of elemental wave-shapes or "primitives", involves three steps in this application: 1. Selection of the appropriate primitive shape from the primitive set to represent a particular segment of data. 2. Determination of primitive duration by establishing primitive endpoints. 3. Determination of primitive amplitude. The first step in developing an improved primitive extraction algorithm was to evaluate the method used by Ollapally [17]. The aspects of his procedure responsible for poor extraction results were isolated. Then recognizing that primitive extraction is dependent on the primitive set, common ECG analysis techniques which could aid in extraction of the new "V"-primitive shapes were reviewed. Finally, an extraction algorithm was developed which included the necessary improvements. 4.1. Previous Algorithm Ollapally s approach involved searching the ECG data for deviations from the baseline level and then assigning primitives according to amplitude. The metric is a continuously updated measure of the average QRS amplitude. Detection of the QRS complex is based on amplitude criteria alone; no consideration is given to the dynamic properties of this waveform. A brief outline of the algorithm follows: 1. A 5-point moving-average at the current sample point is computed; this essentially represents a low-pass filtered estimate of the baseline.

PRIMITIVE EXTRACTION 1 9 2. Using the baseline estimate as a reference, the subsequent 10 sample points are compared to a threshold level equal to 10% of the average QRS amplitude. 3. If the threshold is not exceeded, the reference is advanced one sample point, the 5-point moving-average is again computed, and step 2 is repeated. 4. When the threshold is exceeded, the amplitudes of subsequent data points are examined to determine the primitive shape. 5. Once the shape is established, the endpoints are determined and the amplitude category is assigned. 6. If the shape is a U or inverted U, the amplitude is compared to the average QRS amplitude. If within a certain range, the primitive is then classified as a QRS primitive and the duration is established. Prevalent sources of error in this primitive extraction algorithm are false negative and false positive QRS detections. In addition, the inaccuracy and variability in the QRS primitive onset and offset estimates caused many normal beats to be classified as abnormal because of misrepresentation of the duration. The ECG wave-shapes encountered in Holter recordings are extremely variable among subjects and even within the same recording. The relative amplitude of the various component waves can vary with respect to each other and with time. Thus it is difficult to reliably extract waveshape information when the component amplitudes are the primary discriminant feature between components. The previous primitive extraction algorithm was based entirely on a relative amplitude strategy for locating and identifying primitive shapes; it made no use of the varying frequency content of the ECG signal components. 4.2. ECG Signal Filtering Linear filtering of the ECG signal is a common technique applied in some form to virtually all ECG analysis algorithms. Digital filters are usually classified as either FIR or IIR filters [18], for finite impulse response or infinite impulse response. FIR filters, if symmetric, exhibit linear phase shift and as such are often selected to avoid distortion of signal shapes.

PRIMITIVE EXTRACTION 20 One class of FIR filters which has been extensively employed for biomedical applications is the "moving-average" type filter. This filter is popular because it is computationally efficient and also has a linear phase characteristic [6]. A sub-class of moving-average filters even more computationally efficient are "running-average" filters, which are identical with the exception that all coefficients are unity. Implementations of movingaverage type filters which are symmetric and non-causal produce no phase shift at all. This characteristic allows filter parameter changes without requiring subsequent changes in compensatory signal delays. A non-causal implementation is possible in digital signal processing because data storage provides access to both previous and successive sample points. The characteristics of zero phase shift, computational efficiency and simplicity are very desirable for this application. For these reasons, all filtering required in the algorithms subsequently described will be performed with running-average filters. If better filter response characteristics are required for a particular algorithm, more complicated and computationally slower filters must be used. The general form of a non-causal running-average filter using 2N+1 points is as follows [6] y(n) = [x(n-n)+...+x(n-l)+x(n)+x(n+l)+...+x(n+n)]/(2n+l) The frequency response of such filters can be determined by transforming the filter equation via the Z-transform, and then evaluating the result along the unit circle in the z-plane to get the frequency characteristic (by substituting z=e je, ~=2rrf/f )[18]. Thus, S x(z) = -N -1 Z X(Z) +...+ Z X(Z) + X(Z) + Z+I X(Z) 2N+l +N X(Z Y(z) - = [ Z-N +... + Z I x(z) + i + Z +I +...+ Z +N ]/(2N+I) Evaluating for z along the unit circle, the frequency response, HLp(~)=Y(~)/X(o~) is obtained:

PRIMITIVE EXTRACTION 21 H (~) = [I + 2cos(w) + 2cos(2~) +... + 2COS(Nw)]/(2N+I) LP Figure 4-1 illustrates the low-pass characteristics of running-average (RA) filters for several values of N. In processing ECG data, high-pass filters are often needed. This type of filter response can be attained from a RA filter by subtracting the filtered result from the original data. By subtracting the low-frequency components from the original data, the high-frequency signal components are obtained. An equation describing this procedure for a general RA filter is y(n) = x(n) - [x(n-n) +... + x(n) +... + x(n+n)]/(2n+l) This reduces to y(n) 2Nx(n) - [x(n-n) +...+ x(n-l) + x(n+l) +...+ 2N+I The frequency response of this filter, HHp(~)=Y(~)/X(~), H (~) HP 2N- [2cos(~) + 2cos(2~) +... + 2COS(N~)] 2N+I H (w) = 1 - (~ HP LP Thus the frequency response for this type of high-pass filter is just one minus the low-pass frequency response for the value of N (Figure 4-2). Table 4-1 lists the -3dB cut-off frequencies of the RA type filter for several values of N, assuming a 125 Hz sampling rate. Depending on the implementation, this value is either the high-frequency cut-off or low-frequency cut-off. Subsequent references to these types of filters will use RA-HP and RA-LP to indicate the specific implementation form.

FREQUENCY (~) Figure 4-1: Frequency response of low-pass running-average filters. FREQUENCY (~) Figure 4-2: Frequency response of high-pass running-average filters.

PRIMITIVE EXTRACTION 23 Table 4-1: Cut-Off Frequencies For RA Filters. N LOW-PASS CUT-OFF HIGH-PASS CUT-OFF 1 19.4 HZ 43.1 HZ 2 11.2 HZ 22.9 HZ 3 7.9 HZ 15.5 HZ 4 6.2 HZ 11.7 HZ 5 5.0 HZ 9.4 HZ 6 4.3 HZ 7.8 HZ 4.3. QRS Detection/Delineation An essential step for all computer arrhythmia detection systems is the detection of the QRS complex. It s dynamic properties usually distinguish it from other wave-shapes in the cycle. Examining the first derivative or slope of the ECG to determine when the absolute value exceeds a certain threshold is the most often used technique for QRS detection [6]. Although this method works well for detecting the occurrence of a QRS complex, determination of the onset and offset points cannot be directly obtained by this procedure. Various forms of QRS detection have been modified to also provide some estimate of onset and offset points. If some method for detecting QRS complexes is included in the primitive extraction algorithm, more consistent waveform representation can be attained. By initially segmenting the data into regions containing ORS complexes and regions not containing QRS complexes, the representation problem is simplified. An algorithm can be applied directly to the QRS segments to obtain a "V"-primitive representation between the pre-determined onset and

PRIMITIVE EXTRACTION 24 offset points. At this point, the segments not containing QRS complexes can be analyzed to extract the other primitive shapes, or further segmentation can be performed. This method greatly improves the accuracy of the extraction algorithm by reducing the number of false positive and false negative QRS detections and improving the accuracy of the primitive endpoint determinations. 4.3.1. HP ECG Analysis Program One algorithm which yields accurate information as to the onset and offset of the QRS complex was developed by Hewlett Packard [4] for their ECG analysis program. This algorithm, called the waveform boundary indicator (WBI), involves determining a weighted sum of the rectified first and second derivatives of the data. By thresholding this result at an appropriate level, the QRS onset and offset points are estimated. The following two-point central difference equation is used to estimate the first derivative of the digitized data. x (n) = [x(n+l) - x(n-l)]/2 Considering the difference equation estimate for the first derivative as the convolution of the ECG data with a linear operator, g(n), the unit sample response of the estimate can be determined. [x(n+l) - x(n-l)]/2 = g which implies g(n) = 0.5(3[n+i]) - 0.5(~[n-l]) The frequency response of the estimated first derivative filter can be determined by first transforming the sample response using the Z-transform and then evaluating the result along the unit circle [18]. S(z) = 0.5z I -I0.5z sin(w) where

PRIMITIVE EXTRACTION 25 The filter response of the first derivative estimator is shown in Figure 4-3 [4]. For frequencies that are much less than the sampling frequency, the estimator response closely matches that of an ideal differentiator. High frequencies, such as muscle noise, are also attenuated. This is typical for the two-point central difference algorithm; the response can be modeled as an ideal differentiator in series with a low-pass filter [2]. The bandwidth of the effective low-pass filter depends on the sampling rate and the step size used for the central difference estimate. A step size of one is used in this case, any larger step size results in an effective low-pass filter bandwidth which is below the frequency range of the QRS complex. The second derivative can be estimated by applying the estimate for the first derivative twice. The resulting equation for the second derivative estimate is then X (n) = [x (n+l) - x (n-l) ]/2 = [x(n+2) - 2x(n) follows: The complete equation for the WBI algorithm can then be expressed as WBI(n) = Cllx (n) + C21x" (n ) I Ahlstrom and Tompkins [1] used a slightly enhanced form of this algorithm for QRS detection in a microprocessor based analysis system.. They smooth the first and second derivative estimates after the non-linear operation of rectification using a moving-average type filter. The added step smooths the pulse occurring whenever a QRS complex is located. A threshold test then determines both onset and offset estimates. The original HP WBI algorithm summed the algorithm result for three simultaneously recorded leads; the effective signal averaging smoothed the result automatically. The WBI algorithm used for evaluation was modified to combine the smoothing into one operation following the non-linear rectification operation; the final form consisted of the following three steps: 1. Sum the rectified first and second derivative estimates. 2. Smooth this sum using a RA-LP(N=3) filter.

Figure 4-3: Frequency response of derivative estimator. (A) (B) (c) Figure 4-4: WBI Example.

PRIMITIVE EXTRACTION 27 3. Threshold the result to determine QRS onset and offset points. The value of N used for the RA-LP filter was chosen by experimentation. Figure 4-4A shows an example ECG waveform, Figure 4-4B illustrates the sum of the rectified first and second derivatives, and Figure 4-4C shows the result after smoothing with a RA-LP(N=3) filter. 4.3.2. High Frequency Signal Energy Technique The frequency characteristics of ECGs have been extensively documented. The electric potential recorded in an ECG is a record of conduction occurring in the heart. The speed of conduction determines the frequency content of the signal recorded. Therefore, the typical wave-shapes found in ECGs tend to have different frequency content according to their respective conduction speeds. The P-wave, representing the depolarization of the atria, usually produces frequencies in the range of 3-11 Hz. The QRS complex represents the spread of depolarization through out the ventricles via a special rapid conduction pathway. Consequently the frequencies present in the QRS shape are higher than any other wave-shapes present in the ECG, generally in the range of 10-30 Hz. The T-wave represents the slow repolarization of the ventricles; it s frequency content is in the range of 1-5 Hz. One approach to QRS detection uses linear filtering of the ECG data. Based on the premise that the QRS complex has a distinctly different frequency content than other ECG component shapes, this approach uses a linear filter to pass only the frequencies in the range of the QRS frequency band. For example, one technique uses a band-pass filter with cut-off frequencies of 10 and 20 Hz (an upper cut-off of 20 Hz rather than 30 Hz was selected to minimize the interference from muscle noise) [14]. The rectified output of the filter is then thresholded to detect the QRS complex. The method of bandpass filtering the signal works well for detecting a QRS complex, but the algorithm does not enable accurate determination of the QRS onset and offset. Applying a threshold test to the result yields an indication of the QRS complex location, but the onset and offset are not easily estimated from this result. A more accurate technique computes the signal energy in a particular

PRIMITIVEXTRACTION 28 frequency range; thresholding at a certain energy level provides estimates of the onset and offset points of high frequency data segments. The total energy of a continuous time signal s(t) can be expressed [18] E = S +oo I S (t) -00 2dt In this application, the signal is a sampled version of a continuous time signal. The following equation represents the energy contained in a segment of the sampled signal of length 2N+1. N E2N+I(n) ~l s(n+k) 12 k=-n Using this relation to compute the signal energy E(n) in a window centered at each sample point, the result is a waveform which peaks sharply corresponding to high signal energy content. By thresholding E(n) at appropriate level, the onset and offset of high frequency signal areas can be estimated. In summary, this technique involves first filtering the ECG signal to remove unwanted frequencies. The RA-HP type filter (section 4.2) was selected because of its low computation time requirement, no phase shift, and simplicity. The desired filter characteristic was a pass-band encompassing the the frequency range of the QRS complex. The value of N best satisfying this requirement is N=4; this provides a low-frequency cut-off at 11.7 Hz with the main lobe extending to 34.1 Hz. This filter response is illustrated in Figure 4-5. Although the amplitude response of this filter doesn t have an ideal band-pass structure, the higher frequencies are attenuated by the analog prefiltering. If problems are encountered from high-frequency interference, an additional low-pass filter stage can also be added. Next, the energy contained in a moving window is computed. This computation can also be performed using a RA type filter. By squaring the value at each sample point, the result of subsequent filtering using a RA-LP filter is proportional to the energy in a moving window. Figures 4-6(a,b,c) illustrate a typical Holter ECG record, the squared value after filtering HP(N=4)), and the energy computed using a RA-LP(N=3) filter respectively. (RA-

0.?07 ; 0.000 12 20 34 62.5 FREQUENCY (HZ) Figure 4-5: RA-HPIN=4 filter response. (A) (B) (C) Figure 4-6: Signal Energy Example.

PRIMITIVE EXTRACTION 30 The width of the time window is determined by the parameter N of the filter. The sampling rate (125 samples/sec) implies the correspondence listed in Table 4-2. In selecting the time window, two considerations are important; 1) the window must be wide enough such that high-frequency noise spikes are not dominant, and 2) increasing the window width increases the computation time. After experimentation, a 48 msec window (N=3) was selected. locate The final step in this algorithm is to threshold the energy waveform to the QRS onset and offset. Figure 4-7 illustrates the waveforms obtained from an ECG sequence for three values of N. 4.4. "V"-Primitive Extraction The two QRS detection/delineation algorithms described above can be used to segment an ECG waveform into two regions: 1) data segments containing a QRS complex, and 2) data segments NOT containing QRS complexes. In addition, the boundaries of the QRS data segments correspond to the QRS onset and offset points. The process of "V"-primitive extraction is now reduced to determining a sequence of "V"-shapes corresponding to the actual shape of the QRS complex between the detected onset and offset locations. Amplitude criteria can now be used in this process because the QRS components are generally large compared to the signal noise level. The following information must be determined from the QRS data segment; 1) the number of "V"-primitives required, 2) the endpoints of each "V"-primitive, and 3) the amplitude of each "V"-primitive. The first step needed for decomposition of the QRS complex into "V"- shapes is the location of turning points. These points indicate the vertexes for any "V"-primitives to be extracted. Turning points can be determined by taking the first difference of all points in the QRS complex segment and noting where the sign of the difference changes. Next, the amplitude values at turning points must be examined to