ECG Signal Processing IV
A REAL-TIME QRS DETECTION
A N D DELINEATION
ALGORITHM BASED ONTHE
INFLECTION ANGLE OF THE ECGWAVEFORM
Hsiao-Shu Hsiung, U.S., Cheng-Rung Cheng. Ph.D.'. and Gvo-Jen Jan. Ph.D.
Dept. o f Electrical Engineering. National Taivan University Taipei, Taivan. R.O.C.
*
Dept. of Biomedical Engineering, National Taivan Univ. HospitalABSTRACT
A fast and accurate algorithm is devel- oped for t h e detection and delineation o f
QRS complexes. T h i s algorithm uses an effi- cient data compression scheme t o reduce t h e s i z e o f t h e vhole processing points. According t o t h e principle of human visual cognition of ECG r a v e f o p , an inf1e:tion angle (
I A
1 betveen 180 and -180 is defined t o detect and delineate t h e QRScomplexes. Easy implementation, accurate delineation, fast execution speed. baseline ignored. and n o adaptive threshold values are t h e advantage of using inflection angle. The average time t o detect and delineate one QRS complex is 0.25 second on
PC/AT.
Results o f successful application of t h i s algorithm t o 5 typical arrhythmia c a s e s in t h e Presence of noise, muscle arteface. baseline drift and morphology changes a r epresented.
-
The first task o f any set o f ECG analy- sis algorithms either in time domain or in frequency domain is t o detect and delineate t h e QRS complexes. The accuracy of such algorithms vi11 ultimately determine t h e reliability and versatility of the subse- quent analysis approach.
Some QRS detectors have incorporated automatic gain control feedback loops which change threshold values by the slopes of the Q R S complexes already detected in order t o increase the immunity of muscle noise. Unfortunately, it exists s o m e sudden changes in t h e QRS morphology when arrhyth- mias occurs and t h e threshold values can't be adjusted so fast a s t o achieve t h e detection task. Besides. t h e baseline drift and large
P
and T raves may present significant false triggering problems t o QRS detector. The algorithm proposed in this paper not only can overcome the previ- o u s problems but also provides a fast and precise QRS delineator.The basic idea of our approach comes from t h e principle o f human visual cogni- tion o f ECG waveform. After surveyed many ECG morphology in t h e literature and t h e clinical trials, ve draw three conclusions t o recognize t h e QRS complex a s follovs :
1. The absolute value of t h e I A in
R
point is greater than 115' (Fig.1).2. The absolute value o f the
I A
in Q and Spoints are greater than 23' and less than t h e absolute value o f I A in R point. 3. The amplitude difference betveen Q and R
and between
R
and S exceed the averageamplitude variation.
-
The nev QRS detection and delineation algorithm comprises six steps :
1. A Preprocessing 1s used t o reduce the noise and muscle artefact.
2.
A
new data compression scheme 111 makes use of a differential filter and piece- vise linear approximation t o extract the inflection points ( IP ) which can be brought into use for identifing signifi- cant features such a s P, Q, R, S - a n dT
points. After data compression.approximately 1/10 of total original sampling points is reserved for further processing.
3. The average amplitude variation now can be obtained from t h e following formula:
A A V = l/n * I ~ l D a ( I P t . I P t - ~ )
where IPt is ith inflection point and Da(IPt.IPt-l) is the amplitude differ- ence between
IPt
and I P I - 1 .4. The I A in each IP is calculated by three nearby
IP,
I P t - 1 , IPt and I P t . 1 , a s follovs:IAI =Tan-' (Da(IPt, IPt - t)/Dt (IPt , IPt - 1 ) ) - Tan-' (Da(IPt a I , IPt )/Dt(IPt + I ,
~ P I
) )where IAt is t h e I A in
IPt
andDt(IPt .IPt - 1 ) is t h e number of sampling points between IPt and IPI - 1 .
5. If t h e absolute value of I A J is greater than 1.57 (60'). then searching backward and forvard t o find 2 inflection points.
IPt and
IPI.
The absolute values ofIAt
andIAI
need t o be both greater than 0.4(23'). Also, the sign of
IAt
and I A Rneed t o be oppsite t o t h e I A J .
6. The IA in IPJ is then recalculated by I P I , IPJ and IPR. If the new absolute value of I A J is greater than 2.0 ( 115") and t h e absolute value of amplitude
0138--IEEE ENGINEERING IN MEDICIlsE & BIOLOGY SOCIETY 1lTH ANNUAL INTERNATIONAL CONFERENCE CH2770-6/89/0000-0138 $01.00 C 1989 IEEE
~
--lr-
I
difference between I P I and
IPI
and betveen IPS and IPk are both greaterthan 1.5rAAV. then r e treat IPI
,
IPI and IPK a s Q. R and S points. respectively.BESULTS
monitoring system o f National Taiwan University Hospital,
WIT-BIH
data base and KONTRON WEDICAL 994 arrhythmia simulator t o validate t h e performance of our algorithm. The program is implemented on the PC/AT. The sampling r?te is 250 samples/sec. The average speed I S 0.25 second for one QRS detection and delineation.Fig.2 illustrates 5 typical arrhythmia c a s e s of ECG and its resu 1 ts.CD"
Due t o t h e efficient data compression and succinct detection and delineation definition, our novel algorithm can be easily implemented and fast executed. According t o t h e nature o f inflection angle. the baseline vander can be ignored and n o threshold values need t o be adjusted during processing. So, t h e detection and delinea- tion results are really precise and match t h e outcomes of human recognition. However, different sampling rate rill affect t h e detection accuracy. T h e sampling frequency between 200 Hz and 5 0 0 Hz is therefore strongly suggested. One more important property of our research is this algorithm can be extended t o detect multiphasic QRS
complexes. In summary, t h e whole process is defined very clearly and is suitable for use in a real-time ECG monitoring or diagnosis system.
We slsect s o m e special ECG data from the
REFERENCES
[ l l . Hsiao-Shu Hsiung. " Move! system for arrhythmias diagnosis, W.S. Thesis, National Taiva! Univ.. 1988.
[21. H.S.Lee"et.al, ECG waveform analysis by SPE. Comput. Biomed. Res., V01.20.
pp. 410-457, 1987. P RS Pis P 1s (a) PRS P RS PRS P s b) P i s P I s 4 1 s P RS
IEEB EN61NEERIkW IN MEDICINE C BIOLOGY BOCIETY l l T H ANNUAL INTERNATIONAL CO#BERBNCB--0139