+ All Categories
Home > Documents > [IEEE 2008 5th International Multi-Conference on Systems, Signals and Devices (SSD) - Amman...

[IEEE 2008 5th International Multi-Conference on Systems, Signals and Devices (SSD) - Amman...

Date post: 15-Dec-2016
Category:
Upload: abdel-rahman
View: 213 times
Download: 1 times
Share this document with a friend
5
2008 5th International Multi-Conference on Systems, Signals and Devices QRS Complex Detection Based on Symmlets Wavelet Function Khaled Daqrouq*, Ibrahim N. Abu-Isbeih t and Abdel-Rahman AI-Qawasmi** * Philadelphia University/Communication Engineering, Amman, Jordan, e-mail: [email protected] t Philadelphia University/Communication Engineering, Amman, Jordan, e-mail: [email protected] ** Philadelphia University/Communication Engineering, Amman, Jordan, e-mail: [email protected] Abstract-Wavelet theory is inspired the development of a strong methodology for signal processing and can be used as a good tool for non-stationary electrocardiogram (ECG signal) detection. In this paper a QRS complex detection method is proposed based on wavelet transform (WT) with Symmlets function. The proposed method show sharp results for ECG detection parameters. The fiducial points are easily detected and the results show that the sensitivity of the proposed detector is 99.8°A. and the specificity is 98.6°A.. The results obtained in this paper are based on real ECG signal. Keywords-ECG Signal, QRS Complex Detection, Wavelet Transform. I. INTRODUCTION The wavelet functions (mother and its scaled version) are used as orthonormal functions for representing another functions in discrete wavelet transform (DWT) and continuous wavelet transform (CWT). Locating ECG parameters (fiducial points) like QRS complex, ST-segl11ent, R-R interval, J point, iso-electric level, R peak and onset and offset of QRS complex and T wave is very important for diagnosis many cardialogical diseases. The irregularity of ST-segment is considered electro-physiologically significant because it is an indicator of an imbalance myocardial oxygen supply and in myocardial ischemia or infarction. QRS complex and R-R interval have had very essential role in indicating and measuring heart rate variability. As mentioned above, in ECG analysis the single most important feature is the QRS complex, because all other features, like the P and T waves and the on- and offset of the QRS complex are defined relative to the QRS complex. The P and the T wave occur respectively before and after the QRS complex, without knowledge of the QRS location P and T waves are hard to distinguish from each other. Most QRS detectors can be divided into two stages: a filtering stage and a decision stage. The filtering stage is used to emphasize the QRS complex and to reduce noise and the influence of the other waves in the ECG signal (P and T waves). Typically first a band pass fi Iter is applied to the signal to reduce noise and to suppress P and T waves and then put through a non-linear stage to enhance the QRS complex. Then the QRS enhanced signal is thresholded and some decision logic is used for the decision stage of detection. Wavelet transformation has proven to be a very efficient tool in the analysis of ECG signals [1]. Its 978-1-4244-2206-7/08/$25.00 ©2008 IEEE ability to automatically remove noise and to cancel out undesired phenomena such as baseline drift is a benefit other techniques. A simple moving average-based computing method for real-time QRS detection is used in [2]. NUl11erical results indicated that the novel algorithnl finally achieved about 99.5% of the detection rate for the standard database, and also, it could function reliably even under the condition of poor signal quality in the measured ECG data. A QRS cOl11plex detection algorithm that can be applied in various on-line ECG processing systems is presented in [3]. The algorithm is performed in two steps: first a wavelet transfoflll filtering is applied to the signal, then QRS complex localization is performed using a maximum detection and peak classification algorithm. The algorithm has been tested in two phases. First the QRS detection in ECG registrations from the MIT-BIH database has been performed, which led to an average detection ratio of 99.5%. A linear prediction coefficient of a forward linear predictor the prediction error is minimized using a least- square approach is used in [4]. The residual error signal obtained after processing by the linear prediction algorithm is used to localize and to detect QRS complexes. This paper presents CWT with SYl11111lets nl0ther and father wavelets for detecting of QRS-complex. This transform is robust to noise because it divides the signal into several bands of frequencies. Over more, Symmlets wavelet function has the following properties: Compactly supported wavelets with least asymmetry and highest number of vanishing moments for a given support width; - Associated scaling filters are near linear-phase filters; Orthogonal and biorthogonal; - Compact support; and - Near from Symmetry. II. WAVELET TRANSFORM The orthonormal wavelet functions (bases) are analogous to trigonometric sine and cosine. These functions are fundamental functions for building the signals. As with sine and cosine, functions are oscillated about zero. However the oscillation for wavelets damp do\vn fast to zero. A. Signal Approximation using Wavelets The approximation of the signal fit) using wavelet orthonormal bases can be defined as
Transcript
Page 1: [IEEE 2008 5th International Multi-Conference on Systems, Signals and Devices (SSD) - Amman (2008.07.20-2008.07.22)] 2008 5th International Multi-Conference on Systems, Signals and

2008 5th International Multi-Conference on Systems, Signals and Devices

QRS Complex Detection Based on SymmletsWavelet Function

Khaled Daqrouq*, Ibrahim N. Abu-Isbeiht and Abdel-Rahman AI-Qawasmi**

* Philadelphia University/Communication Engineering, Amman, Jordan, e-mail: [email protected] Philadelphia University/Communication Engineering, Amman, Jordan, e-mail: [email protected]

** Philadelphia University/Communication Engineering, Amman, Jordan, e-mail: [email protected]

Abstract-Wavelet theory is inspired the development ofa strong methodology for signal processing and can beused as a good tool for non-stationary electrocardiogram(ECG signal) detection. In this paper a QRS complexdetection method is proposed based on wavelet transform(WT) with Symmlets function. The proposed method showsharp results for ECG detection parameters. The fiducialpoints are easily detected and the results show that thesensitivity of the proposed detector is 99.8°A. and thespecificity is 98.6°A.. The results obtained in this paper arebased on real ECG signal.

Keywords-ECG Signal, QRS Complex Detection,Wavelet Transform.

I. INTRODUCTION

The wavelet functions (mother and its scaled version)are used as orthonormal functions for representinganother functions in discrete wavelet transform (DWT)and continuous wavelet transform (CWT). LocatingECG parameters (fiducial points) like QRS complex,ST-segl11ent, R-R interval, J point, iso-electric level, Rpeak and onset and offset of QRS complex and T waveis very important for diagnosis many cardialogicaldiseases. The irregularity of ST-segment is consideredelectro-physiologically significant because it is anindicator of an imbalance myocardial oxygen supplyand in myocardial ischemia or infarction. QRS complexand R-R interval have had very essential role inindicating and measuring heart rate variability.

As mentioned above, in ECG analysis the single mostimportant feature is the QRS complex, because all otherfeatures, like the P and T waves and the on- and offset ofthe QRS complex are defined relative to the QRScomplex. The P and the T wave occur respectivelybefore and after the QRS complex, without knowledgeof the QRS location P and T waves are hard todistinguish from each other. Most QRS detectors can bedivided into two stages: a filtering stage and a decisionstage. The filtering stage is used to emphasize the QRScomplex and to reduce noise and the influence of theother waves in the ECG signal (P and T waves).Typically first a band pass fi Iter is applied to the signalto reduce noise and to suppress P and T waves and thenput through a non-linear stage to enhance the QRScomplex. Then the QRS enhanced signal is thresholdedand some decision logic is used for the decision stage ofdetection. Wavelet transformation has proven to be avery efficient tool in the analysis of ECG signals [1]. Its

978-1-4244-2206-7/08/$25.00 ©2008 IEEE

ability to automatically remove noise and to cancel outundesired phenomena such as baseline drift is a benefito~er other techniques. A simple moving average-basedcomputing method for real-time QRS detection is used in[2]. NUl11erical results indicated that the novel algorithnlfinally achieved about 99.5% of the detection rate for thestandard database, and also, it could function reliablyeven under the condition of poor signal quality in themeasured ECG data. A QRS cOl11plex detectionalgorithm that can be applied in various on-line ECGprocessing systems is presented in [3]. The algorithm isperformed in two steps: first a wavelet transfoflllfiltering is applied to the signal, then QRS complexlocalization is performed using a maximum detectionand peak classification algorithm. The algorithm hasbeen tested in two phases. First the QRS detection inECG registrations from the MIT-BIH database has beenperformed, which led to an average detection ratio of99.5%. A linear prediction coefficient of a forward linearpredictor the prediction error is minimized using a least­square approach is used in [4]. The residual error signalobtained after processing by the linear predictionalgorithm is used to localize and to detect QRScomplexes.

This paper presents CWT with SYl11111lets nl0ther andfather wavelets for detecting of QRS-complex. Thistransform is robust to noise because it divides the signalinto several bands of frequencies. Over more, Symmletswavelet function has the following properties:

Compactly supported wavelets with least asymmetryand highest number of vanishing moments for agiven support width;

- Associated scaling filters are near linear-phase filters;

Orthogonal and biorthogonal;

- Compact support; and- Near from Symmetry.

II. WAVELET TRANSFORM

The orthonormal wavelet functions (bases) areanalogous to trigonometric sine and cosine. Thesefunctions are fundamental functions for building thesignals. As with sine and cosine, functions are oscillatedabout zero. However the oscillation for wavelets dampdo\vn fast to zero.

A. Signal Approximation using Wavelets

The approximation of the signal fit) using waveletorthonormal bases can be defined as

Page 2: [IEEE 2008 5th International Multi-Conference on Systems, Signals and Devices (SSD) - Amman (2008.07.20-2008.07.22)] 2008 5th International Multi-Conference on Systems, Signals and

2008 5th International Multi-Conference on Systems, Signals and Devices

Fig. 1. (a) The scaled version (father) of Symmlets. (b) Mother ofSymmlets.

fOH= conv(fO,Hi_D);dI=dyaddown(fOH);%level=2slL= conv(sl,Lo_D);s2=dyaddown(sIL);

slH= conv(sl,Hi_D);

d2=dyaddown(s 1H);

%level=3s2L= conv(s2,Lo_D);s3=dyaddown(s2L);s2H= conv(s2,Hi_D);d3=dyaddown(s2H)

fo

III. METHODOLOGY

It was shown in [12, 13, 14] that the maximum of theabsolute value of CWT using the mother wavelet as thefirst derivative of a smoothing function indicates theoccurrence fast (sharp) signal variations like QRScomplex. We choose function sym.8 form Symmletswavelets shown in Fig. 1 to locate QRS conlplex by Rwave peak location as the maximum of the square valueofCWT.

(2)

(1)

(b)

\{I. (t) = 2-), 2 qJ(2-1/ - k)},k

<1>. (t) = 2-'/ /2 <1>(2-1 t - k)l,k

(a)

J(t) = .L S j.k <t> j.k (t) +.L d j .k ~j.k (t) +k k

.L d j - Lk~j-Lk (t) +..... + .Ld Lk ~Lk (t)k k

Roughly speaking, \V(t) represents high frequencyparts of the signal, and $(t) represents smooth and lowfrequency parts of the signal [5, 6]. The wavelet types,which generally used are: Haar, Daubechies, Symmletsand Coiflets. Functions \Vj,k(t) and $j,k(t) are scaled andtranslated version from \V and ~ [7,8]:

where j is the scale, k is the translation parameter, Sj,k,~,k are the wavelet approximation coefficients and \Vj,k(t)and $j,k(t) are wavelet approximation functions. Waveletfunctions have two forms: \V is the mother of wavelets(wavelet function), and $ the father of wavelets (scaledfunction) shown in Fig. 1.

B. Discrete Wavelet Tran~form

The discrete wavelet transform (DWT) calculates thewavelet approximation coefficients. For example, for

discrete and finite signal j' =(I. ,/2' .. " IN ), DWT

calculates m coefficients vector W = (WI' W2 ,' ", wm ),

which consists of wavelet approxinlation coefficients Sj,kand ~,k, j = 1, 2, ... , J.

DWT is defined mathematically as follows:

(3)

where W is the DWT matrix.To calculate the wavelet approximation coefficients

we apply known Mallars algorithm (MA) [9]. Thisalgorithm convolutes the signal with wavelet functionand its scaled version as 10\\' pass and high pass (H, L),which are called quadrature Inirror filters (QMF) [10,11]and applies decilllation operation. By using Mallarsalgorithm we decompose the original signal intosubsignals ( dI, d2, d3 ... , dj, sj, where dj = (dj,I, dj,2, ...,dj,N/2j » and sj = (sj,I, sj,2~ ... , sj ,N/2j », with differentbands of signal frequency.

To understand Mallat's algorithm let's study its stepsbasing on the follo\ving program written by the authorsin Matlab environment using wavelet toolbox:

% Mallat's algorithm for 3 levels[Lo_D,Hi_D] = wfilters('dbi ','d');

%level=1fOL= conv(fO,Lo_D);

sl =dyaddo\vn(fOL);

Fig. 2. Mallat's Algorithm, where fo is original signal and the arrowwith number two means decimation operation.

The proposed detector shown in Fig. 3 can be dividedinto three stages as follows:

The first stage: The new detector is based on usingthe CWT with sym.8 and scale 23 (for samplingfrequency ~ = 100 Hz and 210 for fs = 400 Hz), as a passband filter (fronl 12 to 38 Hz), which pernlits the QRScomplex frequency without P, T and noise frequencies(Fig. 4), because the average spectral frequency of QRScomplex is from 6 to 30, and from 0 to 5 Hz artefactmotion noises and from 5 to 10 Hz for P and T.

Fiducial QRS1(N), QRS2(N),

PointsDetection

Fig. 3. The QRS complex detector

TABLE I.THE COEFFICIENTS OF LOW AND HIGH PASS FILTERS OF SYM.8

FUNCTION

0.0034 -0.0005 0.0317 0.0076 -0.1433

L-0.0613 0.4814 0.7772 0.3644 -0.0519- 0.0272 0.0491 0.0038 -0.0150 -0.00030.0019-0.0019 -0.0003 0.0150 0.003 -0.0491

H-0.0272 0.0519 0.3644 -0.7772 0.48140.0613 - 0.1433 -0.0076 0.0317 0.0005-0.0034

Page 3: [IEEE 2008 5th International Multi-Conference on Systems, Signals and Devices (SSD) - Amman (2008.07.20-2008.07.22)] 2008 5th International Multi-Conference on Systems, Signals and

2008 5th International Multi-Conference on Systems, Signals and Devices

where L(i) is the vector of these amplitudes, i the indexof amplitude in original signal, B is indicated empiricallyequals to 0.15 where the frequency of sampling is 100Hz and 400 Hz, and R is nlax (CWT (23,t)i).

From Fig. 4 & 5 we can see that using the CWT withsym.8 and scale 23 is very suitable for QRS complexdetection because the centre frequency at scale 23 is verysuitable for QRS complex spectral frequency, which isabout (17 Hz), and because R, and Q and S peaks havethe same places as in original signal. The very highfrequency noise does not appear.

FPR-R

IV. R-R INTERVAL DETECTION

The R-R interval detection is very important tomeasure heart rate and for heart rate variabilitydiagnosing as shown in Fig. 6.

0/0 QRS complex detectorcO = CWT(x,3,'sym8');

c=cO/'2;

LI =find(c>0.15*max(c»;

for i=2:length(LI), 12(i-I)=find(c=max(c«LI(i-I)-1O):(L 1(i-I)+ 10»»;

end

L4( 1)=L3( I);

j=2;

for i=2:length(L3)

ifnot (l3(i)==14U-I»

14U)=13(i);

j=j+ I;

end

end

Command cO = CWT(x,3,'sym8'); calculates cO as theCWT ofx (ECG signal),

Command c=cO./\2; calculates square of cO, commandLI=find(c>O.l5*max(c»; finds the indices ofamplitudes bigger than threshold B, for i=2:length(LI),12(i-1)=find(c=max(c((L 1(i-I )-1 O):(L1(i-I)+ I0»»; thisloop locates the index n of QRS complex in the window(i=IO:i+10) by indicating the fiducial points asmaximum for each and in vector L1(i), the followingprocedure is used for getting L3(i) \vithout repeating anyelelnents.

L3( 1)=L2( 1);

j=2;

for i=2 :length(L2)

ifnot (l3(i)=13U-I»

14U)=13(i);

j=j+ I;

3500

(4)

100

L(i) > B*R

Fig. 4 CWT at scales 23 and FFT(d3)

2oeD°I3E_?VB-2000 0

-o 50

FFT

CWT (23,t)

ECG

The second stare: is to calculate square ofcoefficients (CWT (2 ,t»2. Now it is very easy to detect athreshold of QRS complex at CWT (23,t); afterwards,detecting the maximum in every window, which includesQRS complex will indicate R. peak (Fiducial point-FP).

The third stage: indicating all amplitudes higher thanthreshold B:

1:0lUiiiJiiiJjJiJo 500 1000 1500 2000 2500 3000 3500

150

oFig. 5 ECG signal and (CWT (2 3,t))2 signal

Fig. 6. R-R interval detection

The fourth stage: in this stage the QRS complex islocated in the window (i=IO:i+IO) (wherej; is 100 Hzand (i=30:i+30) where Is is 400 Hz) by indicating thefiducial point as maxitnum for each i in vector L(i)

where n is the index of R peak in original signal.

To understand the detector let's study its stages basingon the following program written by us in Matlabenvironment using wavelet toolbox for fs=IOO Hz:

This interval can be detected and measured afterdetecting FP ofQRS complexes by:

where ~THR is the time interval between two consecutiveFP in seconds, FP(i) detects FP of QRS complex andFP(i+ I) is the FP of next QRS complex. The heart rate ismeasured as:

(6)R-R= ~THR= FP(i+ I) - FP(i)~IO~i~i+IO (5)FP(n)=lnax[(CWT(23,t»)2 ],

Page 4: [IEEE 2008 5th International Multi-Conference on Systems, Signals and Devices (SSD) - Amman (2008.07.20-2008.07.22)] 2008 5th International Multi-Conference on Systems, Signals and

2008 5th International Multi-Conference on Systems, Signals and Devices

where HR is the heart rate in one n1inute. Up normalheart rate appears when

HR>100 beats/min (tachycardia): R-R<0.6 s,

HR<60 beats/min (bradycardia): R-R> I s.

S2= «[T] - [FP])/[T])' 100% = 98.60% (9)

where [T] is the number of QRS complexes for all base,[FN] is the number of false negative and [FP] is thenumber of false positive.

The proposed QRS complex detector has been testedfor 1001 QRS complexes of several ECG signals of 3200samples (8s) (for each one) with san1pling frequency of

0A. Heart rate calculating programfor i=2:1ength(l4)

RR.(i-l )=14(i)-14(i-l);

Rr=rr>10;

RR=rr(Rr);RRmean=mean(RR);

HR=60/(RRmean/100);

ifHR>IOO

HRD=('tachycardia');

elseifHR<60HRD=('bradycardia');

else

HRD=('normal');

end

Loop for i=2:length(L3), rr(i-I )=14(i)-14(i-I);calculates rr as the R-R interval for all fiducial points in14(i-l) vector, command HR=60/(RRmean/100);calculates heart rate for frequency sampling 100 Hz,condition if, else if, else are used to write the result ofheart rates diagnosing.

V. CONCLUSIONS

The problems that may face the QRS complexdetection are the morphology of QRS which depends onpatient, the ECG leads and the change of in1pedance inthe skin-electrode place. On the other hand, differenttypes of noises can be recorded through the detectionprocess. The successfully designed detector should workdespite ofthose problems.

The first stage of the evaluation of presented detectoris determining the errors. The errors of detector aredivided into two kinds:

• False positive (FP): detector detects the QRScomplex when it doesn't appear,

• False negative (FN): detector doesn't detect the QRScon1plex when it appears,

We tested proposed detector for 100 I QRS complexesof 30 several ECG signals. Each signal has 1000 sampleswith sampling frequency 100 Hz. During the detection,at the beginning, some amplitude appeared before thefirst QRS complex that caused the detector to have FP.As a result of cutting the signal FN=1 and FP=7. Wherethe sensitivity of detector is determined as

REFERENCES

[1] Haddad, S. A. P., Houben, R., and Serdijn, W.A."The history and developluent of paceillakers: anelectronics perspective", Klinische Fysica, pp. 8­15,2004.

[2] S. Chen, H. Chen, H. Chan, "A real-time QRSdetection method based on moving-averagingincorporating with wavelet denoising", ComputerMethods and Programs in Biomedicine, Volun1e82, Issue 3, pp. 187-195

[3] L. Szilagyi, S.M. Szilagyi, A. Frigy; S.E. Laszlo,L.K. Gorog, Z. Benyo, "Quick QRS ComplexDetection for On-Line ECG and Holter Systems",Engineering in Medicine and Biology Society,IEEE-EMBS 2005, pp. 3906, 2005.

[4] Z. E. Hadj Slimane, F. Bereksi Reguig,"Laboratoire de Genie Biomedical (GBM)",Departement d'electronique Faculte des Sciencesde l'Ingenieur, Universite Abou Bekr Belkaid­Tlemcen. B.P.l19, Tlemcen, Algeria

[5] I. Daubechies, '~The olihonormal bases ofcompactly supported wavelets," Comma Pure Appl.Math. Vo1.41, pp. 909-996,1988.

[6] C. K Chui. "Wavelets: a tutorial in theory andapplication," Boston.

[7] V Nitish Guo Xon-rong, Ssun Yi-chun, F. Hanley,"Multiresolution wavelet analysis of evokedpotential;' IEEE Transactions on BiomedicalEngineering, Vol. 40, No. 11, November 1993.

[8] S. G. Mallat, "Multifrequency channeldecomposition of image and wavelet models,"IEEE Transactions, Acoustic Speech Signal Proc.,Vol. 37, 1989.

[9] 1. Mallat, '"A theory of n1ultiresolution signaldecomposition the wavelet representation," IEEETransactions on Pattern Ana(vsis and MachineIntelligence, Vol. 11, No.7, pp. 674-693, July1989.

[10] Bruce, Andrew, '"Applied Wavelet Analysis WithS-plus," New York: Springer-Verlag, 1996,XXI,3385:IL.

400 Hz. The results of testing show that the sensitivitySI of detector can reach 100% and the specificity S2equals 99.70%.

The proposed detector used in this paper is tested forreal ECG signal. The following results are concluded:

The possibility of detection of the QRS complex byCWT using wavelet function sym.8.

The performance of the QRS complex detectorpresented hasn't been changed by adding muscle noise,even when SNR= -0.039 dB, because CWT is robust tonoise and suitable for non-stationary ECG signal naturethan averaging moving filter.

The average rate of QRS detector achieved is about99.75.

(7)

(8)

HR= 60 / ~THR

SI = «[T] - [FN])/[T])' 1000/0 = 99.800/0

and the specificity of the detector is given by

Page 5: [IEEE 2008 5th International Multi-Conference on Systems, Signals and Devices (SSD) - Amman (2008.07.20-2008.07.22)] 2008 5th International Multi-Conference on Systems, Signals and

2008 5th International Multi-Conference on Systems, Signals and Devices

[11] 1. Chen, I. Shuichi, "A wavelet Transform-BasedECG Compression Method Guaranteeing DesertSignal Quality," IEEE Transactions on BiomedicalEngineering, Vol. 45, No. 12, December 1993.

[12] S. G. Mallat, S. Zhong, "Characterisation of signalsfronl Multiscale edges," IEEE Transactions onPattern Analysis and Machine Intelligence, Vol. 14,No.7, pp. 710-732 July 1992.

[13] S. G. Mallat, S. Zhong, "Compact imagerepresentation from Multiscale edges," 3rd Conf. onCompo Vision, 1990.

[14] N. V. Thakor, J.G Webster, J. Tompkins,"Estimation QRS complex power spectra for designof QRS filter," IEEE Transactions on BiomedicalEngineering, Vol. 31, pp 702-706, Nov., 1985.


Recommended