[ieee 2010 7th international conference on electrical engineering, computing science and automatic...

6
ECG Feature Extraction via Waveform Segmentation Antonio Espiritu-Santo-Rincon and Cuauhtemoc Carbajal-Fernandez Tecnologico de Monterrey, Campus Estado de Mexico Km 3.5 Carretera Lago de Gpe, 52926, Atizapan, Estado de Mexico, MEXICO E-mail: [email protected], [email protected] Abstract The analysis of the ECG signal is widely used for detecting a variety of cardiac pathologies. Most of the clinically useful information embedded in the ECG is related to the duration and amplitude of its individual components. Producing algorithms for the automatic extraction of the ECG features is complicated due to the time-varying nature of the signal resulting of variable physiological conditions and the presence of noise. This paper presents an algorithm for detecting the individual components of the ECG signal. First the R wave is precisely detected using wavelets, and then the other ECG features are extracted using a waveform segmentation approach. The algorithm was tested on the QT Database. KeywordsECG signal, feature extraction, MIT-BIH Arrhythmia Database, QT Database I. I NTRODUCTION The electrocardiogram (ECG) is a diagnostic tool that measures and records the electrical activity of the heart in detail. Being able to interpret these details allows the diag- nosis of a wide range of heart problems. One cycle of the normal ECG is composed of a P wave, a QRS complex and a T wave, corresponding to the atrial depolarization, the ventricular depolarization and the rapid repolarization of the ventricles, respectively. A typical one-cycle ECG tracing is shown in Figure 1. Most of the clinically useful information embedded in the ECG is related to the duration and amplitude of its individual components. For instance, the QT c factor is used to diagnose the Long QT Syndrome (LQTS), which causes 4000 deaths in the US each year [1]. LQTS is a pathology that must be monitored 24/7 in order to diagnose it, and should be performed preferentially by portable devices, as stated by Tovar et al. [2]. It is also important to identify the morphology of the T wave. For instance, inverted T waves that are symmetrical, "round-shouldered" can be caused by coronary ischemia [1]. Producing algorithms for the automatic extraction of the ECG features is complicated due to the time-varying nature of the signal resulting of variable physiological conditions and the presence of noise. A signicant number of techniques have been proposed to detect those features. Zhao et al. proposed a feature extraction method using wavelet transform and support vector machines [3]. Their experiments, carried out on MIT-BIH arrhythmia database [4], were oriented toward Fig. 1. Typical one-cycle ECG signal the recognition of arrhythmias and normal beats. They did not try explicitly to detect the different components of the ECG signal. Castro et al. proposed also an algorithm based on the wavelet transform for feature extraction from the ECG signal and recognition of abnormal heartbeats [5]. Tadejko and Rakowski proposed a mathematical morphology based algorithm [6]. The focus of their work is the evaluation of an automatic classier of the ECG signal for the detection of abnormal beats. Mahmoodabadi et al. described an algorithm for ECG feature extraction based on a multi-resolution wavelet transform [7]. In the rst step, the ECG signal was denoised by removing the corresponding wavelet coefcients at higher scales. Then, QRS complexes were detected and each com- plex is used to locate the peaks of the individual waves, including onsets and offsets of the P and T waves which are present in one cardiac cycle. They evaluated the algorithm on the MIT-BIH Arrhythmia Database, which consists of 48 ECG recordings. Each one has a duration of 30 min. and includes two leads the modied limb lead II and one of the modied leads V 1, V 2, V 4 or V 5 [8]. The sampling frequency is 360 Hz with a resolution of 5 microvolts per bit. Two cardiologists have annotated all beats. The large variety of ECG feature extraction algorithms, and the continuous efforts for their enhancement, proves that universally acceptable solution has not been found yet. This paper presents an algorithm for detecting duration and amplitude of the ECG individual components. First the R wave is precisely detected using wavelets. This part of the algorithm has been reported elsewhere [9]. Finally the other ECG features are extracted using a waveform segmentation approach. The algorithm may be summarized as follows. Once the R 2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) Tuxtla Gutiérrez, Chiapas, México. September 8-10, 2010. IEEE Catalog Number: CFP10827-ART ISBN: 978-1-4244-7314-4 978-1-4244-7314-4/10/$26.00 ©2010 IEEE 250

Upload: cuauhtemoc

Post on 23-Feb-2017

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [IEEE 2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) (Formerly known as ICEEE) - Tuxtla Gutierrez, Mexico (2010.09.8-2010.09.10)]

ECG Feature Extraction via WaveformSegmentation

Antonio Espiritu-Santo-Rincon and Cuauhtemoc Carbajal-FernandezTecnologico de Monterrey, Campus Estado de Mexico

Km 3.5 Carretera Lago de Gpe, 52926, Atizapan, Estado de Mexico, MEXICOE-mail: [email protected], [email protected]

Abstract�The analysis of the ECG signal is widely used fordetecting a variety of cardiac pathologies. Most of the clinicallyuseful information embedded in the ECG is related to theduration and amplitude of its individual components. Producingalgorithms for the automatic extraction of the ECG featuresis complicated due to the time-varying nature of the signalresulting of variable physiological conditions and the presenceof noise. This paper presents an algorithm for detecting theindividual components of the ECG signal. First the R waveis precisely detected using wavelets, and then the other ECGfeatures are extracted using a waveform segmentation approach.The algorithm was tested on the QT Database.

Keywords�ECG signal, feature extraction, MIT-BIHArrhythmia Database, QT Database

I. INTRODUCTIONThe electrocardiogram (ECG) is a diagnostic tool that

measures and records the electrical activity of the heart indetail. Being able to interpret these details allows the diag-nosis of a wide range of heart problems. One cycle of thenormal ECG is composed of a P wave, a QRS complexand a T wave, corresponding to the atrial depolarization, theventricular depolarization and the rapid repolarization of theventricles, respectively. A typical one-cycle ECG tracing isshown in Figure 1.Most of the clinically useful information embedded in the

ECG is related to the duration and amplitude of its individualcomponents. For instance, the QTc factor is used to diagnosethe Long QT Syndrome (LQTS), which causes 4000 deathsin the US each year [1]. LQTS is a pathology that mustbe monitored 24/7 in order to diagnose it, and should beperformed preferentially by portable devices, as stated byTovar et al. [2]. It is also important to identify the morphologyof the T wave. For instance, inverted T waves that aresymmetrical, "round-shouldered" can be caused by coronaryischemia [1].Producing algorithms for the automatic extraction of the

ECG features is complicated due to the time-varying natureof the signal resulting of variable physiological conditions andthe presence of noise. A signi�cant number of techniqueshave been proposed to detect those features. Zhao et al.proposed a feature extraction method using wavelet transformand support vector machines [3]. Their experiments, carriedout on MIT-BIH arrhythmia database [4], were oriented toward

Fig. 1. Typical one-cycle ECG signal

the recognition of arrhythmias and normal beats. They didnot try explicitly to detect the different components of theECG signal. Castro et al. proposed also an algorithm basedon the wavelet transform for feature extraction from the ECGsignal and recognition of abnormal heartbeats [5]. Tadejkoand Rakowski proposed a mathematical morphology basedalgorithm [6]. The focus of their work is the evaluation ofan automatic classi�er of the ECG signal for the detection ofabnormal beats. Mahmoodabadi et al. described an algorithmfor ECG feature extraction based on a multi-resolution wavelettransform [7]. In the �rst step, the ECG signal was denoisedby removing the corresponding wavelet coef�cients at higherscales. Then, QRS complexes were detected and each com-plex is used to locate the peaks of the individual waves,including onsets and offsets of the P and T waves which arepresent in one cardiac cycle. They evaluated the algorithm onthe MIT-BIH Arrhythmia Database, which consists of 48 ECGrecordings. Each one has a duration of 30 min. and includestwo leads �the modi�ed limb lead II and one of the modi�edleads V 1, V 2, V 4 or V 5 [8]. The sampling frequency is 360Hz with a resolution of 5 microvolts per bit. Two cardiologistshave annotated all beats.The large variety of ECG feature extraction algorithms,

and the continuous efforts for their enhancement, proves thatuniversally acceptable solution has not been found yet.This paper presents an algorithm for detecting duration and

amplitude of the ECG individual components. First the Rwave is precisely detected using wavelets. This part of thealgorithm has been reported elsewhere [9]. Finally the otherECG features are extracted using a waveform segmentationapproach.The algorithm may be summarized as follows. Once the R

2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) Tuxtla Gutiérrez, Chiapas, México. September 8-10, 2010.

IEEE Catalog Number: CFP10827-ART ISBN: 978-1-4244-7314-4 978-1-4244-7314-4/10/$26.00 ©2010 IEEE

250

Page 2: [IEEE 2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) (Formerly known as ICEEE) - Tuxtla Gutierrez, Mexico (2010.09.8-2010.09.10)]

wave has been identi�ed, a segmentation of the ECG signalin an RR interval is performed. Within a range of samples,the maximum and minimum of each wave is searched. Themaximum and minimum of the Q and S waves are searchedindependently from the others, as they are based on the Rwave location only. P and T are dependant waves; they requiresome support points in order to determine their location. Thosepoints are de�ned as the end of S wave Soff , the beginningof T wave Ton, and the onset of Q wave, Qon. Finally thepolarity of the T wave is determined.The rest of this paper is structured as follows. Section

2 details the PQS feature extraction. Section 3 details theT wave location procedure. Section 4 presents the methodthat searches for the presence of a negative T waveform.Section 5 discusses the results obtained from the applicationof the algorithm presented to the QT Database [10]. Finally,conclusions are drawn in section 6.

II. PQS DETECTION ALGORITHMSThe quality of PQS detection methodology depends upon

the correct detection of the R waves that identify each indi-vidual heart beat. In this work, the R wave is identi�ed bythe wavelet-based algorithm proposed by Espiritu-Santo andCarbajal [9]. The results obtained from this step are the timeindexes of all the R waves presented in the analyzed ECGsignal record of the database [4]. The RR time interval isgiven by

RR(i) = R(i+ 1)�R(i) (1)

where R(i) represents the actual index of the R wave peak,R(i + 1) the index of the next R wave peak, and RR(i) thetime interval between peaks i and i+ 1.

A. S wave detectionThe S wave represents the end of the QRS complex, which

corresponds to the physiological ventricular depolarization.The search range for the S peak location starts at the R wavelocation plus an offset of 6 units. The shorter length of theS wave is estimated to be between 0.016 and 0.036 seconds,equivalent to 6 and 13 samples. The upper limit of the range isproportional to the RR interval. The longest length of the RSintervals is found to be around 0.27 seconds, assuming an RRinterval of 1.41 seconds. In order to avoid searching within thesame amount of samples in each beat, the searching range wasreduced with a proportional factor related to the RR interval.Different S wave examples are presented in Figure 2.

B. Q wave detectionThe Q wave represents the onset of the QRS complex.

The Q peak location is found in an interval that starts atfrom 0.02 to 0.06 seconds corresponding to 8 and 22 samplesrespectively. Making it proportional to the heart beat lengthwill make the range wider for most cases. For example, apatient with a QR interval equal to 8, can have RR equalto 292 and another can have QR equal to 19 and RR equalto 235. In this case, the range will be wider for longer RR

Fig. 2. Possible S waveforms (2000 samples each)

Fig. 3. Q wave identi�cation (150 samples in this case)

intervals, which can cause the algorithm to incorrectly placethe Q wave. The Q wave detection is shown in Figure 3.1) Q wave onset detection: The onset of Q, Qon, is the

point with maximum amplitude before the negative peak ofthe Q wave. The index search range is Q � 12 to Q � 5.The Qon index needs correction because some points beforeit have higher amplitude. In order to correct the Qon index,it is needed to:� Calculate the amplitude difference between Q and Qonusing Equation 2:

level = yQon(i)� yQ(i) (2)

� Set a proportional amplitude threshold to correct theQon location to 0.90 if the amplitude difference betweenP and level is above 0.25, else set the threshold to 0.87.

� Starting from Qon, �nd the �rst value with less amplitudethan level(i) � threshold.

Figure 4 presents the correction method of Q wave onset.

C. P wave detectionThe P wave represents the auricular depolarization in the

ECG. As this wave can be located near Q or far from it,the range also needs to be proportional to the RR interval.

2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) Tuxtla Gutiérrez, Chiapas, México. September 8-10, 2010.

IEEE Catalog Number: CFP10827-ART ISBN: 978-1-4244-7314-4 978-1-4244-7314-4/10/$26.00 ©2010 IEEE

251

Page 3: [IEEE 2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) (Formerly known as ICEEE) - Tuxtla Gutierrez, Mexico (2010.09.8-2010.09.10)]

Fig. 4. Correction of the beginning of the Q wave

Fig. 5. P wave search interval

The PR interval duration is beetween 0.09 and 0.19 secondsdepending on the RR interval, equivalent to 19 and 38 samplesrespectively. Within the proportional aspect, the limits are 14%to 22% of the respective RR interval. In contrast with theP wave detection method proposed by Tan and Choi [11],this one does not rely on the difference method for R wavedetection. It has also the advantage of detecting P waveswith low amplitude and of not including T waves within Pwave detection. So, depending on the search area size, twopossibilities exist:

� Narrow search area: 0:81�RR(i)�7 to Q(i)�18. In thecase of P wave detection, most cases can be found from:081 �RR but patient 111, 209, 215 and 228 have wideQRS complex, moving the P location to 0:71 �RR.

� Wide search area: 0:71 � RR(i) � 7 to Q(i) � 18,considering the 4 patients with wide PR interval. Theonly disadvantage of this search area is when there isno detectable P wave and the ST segment is depressed,pushing the P wave detection towards the beginning ofthe search area in equation (6).

Figure 5 is a representation of the proportional searchintervals.

III. T WAVE DETECTION

The T wave is one of the most complex components to �nd.Generating an algorithm to detect it is dif�cult due to time-varying conditions, resulting in different approaches to solvethis problem, mainly because the T wave might be inverted,leading to misclassi�cation. As a �rst approach, the T wavewill be classi�ed as the maximum point between S and thehalf point of the RR interval. The search area for T is limitedto one half of the RR interval and the S wave index. Thissearch interval represents an improvement to the work doneby Tan [11], in which the T wave can overlap with the Pwave in patients with no detectable P wave.

A. T wave onset detection

The beginning of T wave, Ton, is used as a support pointin order to determine whether the polarity of T is positive,negative or �at. This is an important process because negativeor �at T waves indicate cardiac ischemia, which is a harmfulpathology. The point is searched as the minimum from the Swave to T with a given offset in each side.

B. T wave end detection

In the biomedical �eld the end of the T wave, Toff , hasbeen a point for discussion. Nowadays specialists differ whenmaking the identi�cation of the spot. The characteristics thancan be used for the correct identi�cation are the minimumamplitude after T within a limited range or the slope changewhen the heart polarization has been concluded. Both methodsgenerate results that are similar, but could differ in presenceof noise.1) Slope method: At �rst sight the slope method seems

easy to implement as the T wave has a curved shape thatbecome �at at its end. Despite that, the amplitude change isso small in each step, that differentiating the signal resultsuseless. Another fact is that measurement noise is an unavoid-able characteristic of the ECG signal, which will cause thedifferentiation method to fail as the result in areas with noisewill be greater than the expected. In the left half of �gure6 it can be observed that the differentiated signal lacks of avisible T wave. A method to avoid noise and amplify the Twave form is to add a number of previous values of the signaland then differentiate the result. This process will smooth thesignal and will be easier to �nd the end of the T wave. Amathematical simpli�cation is possible as in Equation 5.

SUM = s(i) + s(i� 1) + � � �+ s(i� n) (3)

diff = SUM(i)� SUM(i� 1) (4)

diff(i) = s(i)� s(i� n� 1) (5)

In order to identify the index of Toff , the amplitude indiff(i) should be greater than -0.005.

2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) Tuxtla Gutiérrez, Chiapas, México. September 8-10, 2010.

IEEE Catalog Number: CFP10827-ART ISBN: 978-1-4244-7314-4 978-1-4244-7314-4/10/$26.00 ©2010 IEEE

252

Page 4: [IEEE 2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) (Formerly known as ICEEE) - Tuxtla Gutierrez, Mexico (2010.09.8-2010.09.10)]

Fig. 6. Identi�cation of Toff using the slope method

Fig. 7. Identi�cation of the T wave using the slope method

2) Sum method: Similar to the previous procedure, the summethod makes the signal smooth by adding previous values.This process will use consecutive decisions. If a point hasgreater amplitude than all of the previous 3 samples, it can beaccepted as a Toff point.Both methods result in different Toff positions that are

close to each other. Their difference is around 7 samples,equivalent to 0.0194 seconds. The search intervals for Tonand Toff and the methods are presented in �gures 6 and 7.Table I is presented in order to summarize the intervals used

in sections 2 and 3. It includes the indexes of the lower andthe upper limits of the search intervals. The search algorithmsprovide the indexes which satisfy the maximum or minimumconditions.

TABLE I. Search Intervals

Wave Beginning End TypeP 0:71 �RR(i)� 7 Qon(i)� 12 maxQ RR(i)� 25 RR(i)� 7 minQon Q(i)� 12 Q(i)� 5 maxS R(i) + 6 RR(i)=5� 10 minTon 0:7 � ((T (i)� S(i)) T (i)� 10 minT S(i) + 15 RR(i)=2 max

IV. POSITIVE/NEGATIVE T WAVE DECISIONBeing able to classify whether T has a positive or a negative

form, is an important step towards an effective ECG analysissystem. It is important due to the fact that ischemia is the mostcommon pathology when the T wave has negative morphol-ogy. It is also important to establish whether or not the T orToff point is the correct one for a QTc analysis. A method

that tries to differentiate both morphologies was developed;it is based on a point system that considers 5 conditionsthat are related to negative T conditions. The conditions willhave weighted values in order to decide whether T wave ispositive or negative. The weighted conditions and values arethe following:

1) Ton and S difference: In some cases the S � Toninterval is �at and has a concavity near T . In some casesthe concavity reaches the same amplitude of the S wave.

2) T and Ton difference: Some negative T waves have lowamplitude in the T peak if it is referenced to Ton.

3) T - S + offset and Ton: This indicates the slope beforethe T spot. If it is negative it can lead to a negative Tclassi�cation.

4) Ton�T , T �Toff : The amplitude difference of thesepoints indicates the morphology of the supposed T wave.Normally T � Ton is smaller than T � Toff , but thesecond factor can have a low result if the T wave polarityis inverted.

5) Ton�Soff proportional factor: This quotient is greaterthan 0.22 only in T waves that are inverted. The limitmust be adjusted for high cardiac frequencies. In normalcases the threshold is set to 0.22. If the current RRinterval is less than 250 samples, set it to 0.24. If theamplitude difference between the T and T onset is lessthan zero set it to -0.05. This last value is related toventricular tachycardia. If k � 4 then T is negative.

TABLE II. Negative T wave weighted conditions

k Operation Condition+1 yTon(i)� yS(i) < 0:05+1 yT (i)� yTon(i) < 0:25+1 yT (i)� yS(i) + 5 < 0:08

+2yT (i)�yToff (i)yT (i)�yTon(i)

< 0:4

+4Ton(i)�Soff (i)

RR(i)< threshold

Figure 8 shows how the algorithm works, highlighting in redthe negative T waves. Positive T waves are highlighted in blue.In general, the algorithm detects most of the negative T waves,but is not completely accurate. The second adjustment of thethreshold value is for ventricular tachycardia (V T ) cases asshown in Figure 9. Those cases have different structure interms of T and Ton amplitude difference.Negative T wave detection can also be used to decide if the

QT interval should be calculated with the offset or the peakof T wave in equation (6).

QTc =QT

RR0:37(6)

In the case of a negative T waveform, the QT interval ismeasured from the detected points referred as Q and T in thispaper. Normal T waves involve a QT interval measured fromQ to Toff .

2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) Tuxtla Gutiérrez, Chiapas, México. September 8-10, 2010.

IEEE Catalog Number: CFP10827-ART ISBN: 978-1-4244-7314-4 978-1-4244-7314-4/10/$26.00 ©2010 IEEE

253

Page 5: [IEEE 2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) (Formerly known as ICEEE) - Tuxtla Gutierrez, Mexico (2010.09.8-2010.09.10)]

Fig. 8. Detection of a negative T wave

Fig. 9. Adjustment of th threshold value for Ventricular Tachycardia

V. RESULTS

In order to validate this algorithm, the obtained results werecompared with manual determined boundaries from a portionof the QT Database, including the signals that are also partof the MIT Arrhythmia Database. The manual boundariesare annotations made by experts, including the onset, peakand offset of P wave and QRS complex as well the Twave peak and offset. The results presented in this sectioncompare the detection performance of the algorithm againstthe manual annotations in terms of the samples between them.The analysis presented in Table III includes the absoluteerror (Equation 8) and the average error (Equation 9). Botherror measures are analyzed with the objective of determiningwhether the algorithm is failing in wave detection, fact thatwould be re�ected in a high-magnitude absolute error. TableIV includes the combined results of the database analyzedsignals (sel:100,103,114,117,123).

Perror(i) = Palgorithm(i)� Pdatabase(i) (7)

PAbsError =

Pni=1 jPerror(i)j

n(8)

Pmean =

Pni=1 Perror(i)

n(9)

TABLE III. Feature extraction estimation error results for two �les

Samples File 100: 29 beats File 117: 29 beatsMeanError

AbsoluteError

MeanError

AbsoluteError

Pon 1.2 1.7 -0.1 3.5P 6.0 6.2 0.5 2.1

Poff 1.1 1.6 -2.4 3.5Q 0.4 1.6 -4.5 4.6R 0.0 0.4 -1.7 1.7

TABLE IV. Average feature extraction results

Samples Total: 145 beatsMean Error Absolute Error

Pon 7.1 12.5P 3.0 7.3

Poff -3.1 6.6Q -3.1 7.2R 1.2 2.6S -0.2 6.4T 3.9 9.8

Toff -1.2 9.3

Results from Table III demonstrate that the detectionmethod proposed in this paper delivers similar results to themanual annotations of the database [10]. For instance, theerrors with greatest magnitude got from the �le 100 arerelated the identi�cation of P and Toff ; the average errorwas equal to 6 samples. In the �le 117 the greatest errorsare presented in the Q and S waves with an average of 4.7samples. These errors are attributed to the different diagnosismethods, as �le 100 is being annotated near Qon and S while�le 117 is annotated near Q and Soff , and the annotations aresometimes done in a midpoint. Despite the subtle differencebetween the manual annotations, the time range of the errorfor each wave is not greater than 0.04 seconds. The last resultis presented in the bar plots of Figures 10 and 11, whereeach range is limited to one standard deviation with the meanerror as the base value. Each bar plot order corresponds tothe sequence of the ECG waves shown above. For example�gure 10 order is fT; Toff; : : : ; Sg and �gure 11 order isfPon; P; : : : ; T offg. Results from Table IV demonstrate thatPon and T waves present the highest magnitude errors. Themaximum absolute error found is equivalent to 0.03 secondswhich is attributed to signals with special characteristics suchas the lack of P wave (sel114). These results also demonstratethat the database annotations are not completely accurate,as the R wave absolute error is 2.6 samples. This error isattributed to the inexact location of the R wave in the positivepeak of the QRS complex.The comparison of the results delivered by the algorithm and

the annotations of the �le 100, are important for the negative T

2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) Tuxtla Gutiérrez, Chiapas, México. September 8-10, 2010.

IEEE Catalog Number: CFP10827-ART ISBN: 978-1-4244-7314-4 978-1-4244-7314-4/10/$26.00 ©2010 IEEE

254

Page 6: [IEEE 2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) (Formerly known as ICEEE) - Tuxtla Gutierrez, Mexico (2010.09.8-2010.09.10)]

Fig. 10. Sel100 analysis and deviation range in seconds

Fig. 11. Sel117 analysis and deviation range in seconds

wave detection proposal. In this speci�c signal the algorithmis detecting the concavity of the T wave and classifying itas negative. This generates a point shifting in the classi�edwaves, the original Ton and T waves are renamed as T andToff respectively. After this shifting process the average errorof these waves is around 2 and 6 samples respectively whereasthe results would be around 30 samples if the classi�ed waveswere not shifted.The designed search areas have considered the extreme

length conditions for each one of the waves but will notbe �awless if a signal presents characteristics outside thoselimits. For further reference, the average processing time ofthe 30 minute signals, using TIC and TOC commands inMATLAB (Intel Centrino Duo @ 1.5 GHz, 2 GB RAM), is0.375 seconds. In order to visualize the generalized searchareas for the algorithms, Figure 12 is presented.

Fig. 12. Ranges of search for each ECG component

VI. CONCLUSIONSThis paper presents a proposal for PQST wave identi�ca-

tion that proved to be accurate through visual analysis. Thealgorithms are simpli�ed to the areas where each wave canbe found and have been limited to minimum and maximumsearch. Perhaps this is the greatest disadvantage as the al-gorithm searches in the complete range even if the selectedwave has been found. The negative T wave detection canbe de�ned with the established weighted values, and resultsin a simple computing process. Through the analysis of �le100, it has been concluded that the algorithm is performing acorrect differentiation. In general, signal segmentation provedto be effective in the PQST wave detection algorithms asthe deviation ratio for any of the waves is not greater than0.04 seconds. In summary, the main contribution of this paperis an effective ECG feature extraction method that relieson wavelets and the search for maxima and minima withinlimited intervals. Due to its relative simplicity, this methodseems adequate for its implementation on low power, portabledevices. However, further work should be carried out in orderto combine manual annotations and an adaptable algorithmthat adjust some parameters depending on the observationsmade by the specialist.

REFERENCES[1] Sociedad Mexicana de Cardiología. Tratados de Cardiología, México

D. F.: Ed. Distribuidora Intersistemas, 2006.[2] B. Tovar-Corona, J. González-Villaruel, H. Becerra-Esquivel, A. Juárez-

Carrazco, and A. Espíritu-Santo-Rincón, "Prototype of a portable plat-form for ECG monitoring and diagnostic applications," 5th InternationalConference on Electrical Engineering, Computing Science and Auto-matic Control, 2008, CCE '08. pp.223-227, 12-14 Nov. 2008.

[3] Qibin Zhao, and Liqing Zhan, �ECG Feature Extraction and Clas-si�cation Using Wavelet Transform and Support Vector Machines,�International Conference on Neural Networks and Brain, ICNN&B '05,vol. 2, pp. 1089-1092, 2005.

[4] Physiobank Archive Index, �MIT-BIH ArrhythmiaDatabase,� PhysioNet, April 2010. [Online] Available:http://www.physionet.org/physiobank/database/mitdb/ [Accessed:May 19, 2010].

[5] B. Castro, D. Kogan, and A. B. Geva, �ECG feature extraction usingoptimal mother wavelet,� The 21st IEEE Convention of the Electricaland Electronic Engineers in Israel, pp. 346-350, 2000.

[6] P. Tadejko, and W. Rakowski, �Mathematical Morphology Based ECGFeature Extraction for the Purpose of Heartbeat Classi�cation,� 6th In-ternational Conference on Computer Information Systems and IndustrialManagement Applications, CISIM '07, pp. 322-327, 2007.

[7] S. Z. Mahmoodabadi, A. Ahmadian, M. D. Abolhasani, M. Eslami,and J. H. Bidgoli, "ECG Feature Extraction Based on MultiresolutionWavelet Transform," 27th Annual International Conference of the En-gineering in Medicine and Biology Society, 2005. IEEE-EMBS 2005,pp.3902-3905, 17-18 Jan. 2006

[8] R. Mark, and G. Moody, MIT-BIH Arrhythmia data base directory,Cambridge: Massachusetts Institute of Technology, 1988.

[9] A. Espíritu-Santo-Rincón, and C. Carbajal-Fernandez, "Discrete WaveletTransform and Difference Method Applied to ECG R-wave DetectionAlgorithms," Electronics, Robotics and Automotive Mechanics Confer-ence, 2010. CERMA '10, unpublished.

[10] Physiobank Archive Index, �QT Database,� PhysioNet, April 2010.[Online] Available: http://www.physionet.org/physiobank/database/qtdb/[Accessed: May 19, 2010].

[11] K. F. Tan, and K. L. Choi, "Detection of the QRS complex, P waveand T wave in electrocardiogram," First International Conference onAdvances in Medical Signal and Information Processing, 2000, (IEEConf. Publ. No. 476), pp.41-47, 2000.

2010 7th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE 2010) Tuxtla Gutiérrez, Chiapas, México. September 8-10, 2010.

IEEE Catalog Number: CFP10827-ART ISBN: 978-1-4244-7314-4 978-1-4244-7314-4/10/$26.00 ©2010 IEEE

255