SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012



          QRS Detection Algorithm Using Savitzky-Golay
                              Filter
                                               Shreya Das 1, Dr. Monisha Chakraborty*, 1
      1
     Student, School of Bio-Science and Engineering, Jadavpur University, 188, Raja S. C. Mallik Road, Jadavpur, Kolkata,
                                                            India
*, 1
     Assistant Professor, School of Bio-Science and Engineering, Jadavpur University, 188, Raja S. C. Mallik Road, Jadavpur,
                                                        Kolkata, India
                             {shreyadas.jadavpuruniv@gmail.com, *monishack@school.jdvu.ac.in}


Abstract: QRS part of an electrocardiogram (ECG) is                    generated by the depolarisation wave which travels through
physiologically important for cardiac disease detection and            the interventricular septum via the bundle of His and bundle
extraction of this waveform from the raw signal is an important        branches and reaches the ventricular myocardium via the
part of ECG analysis. Pan Tompkins’ algorithm of QRS                   Purkinje fibre network. The impulse first depolarises the left
detection is an established method for extraction of this part
                                                                       side of the septum, and then spreads towards the right. The
of ECG. In this paper, a modification has been done on Pan
Tompkins’ algorithm by using a Savitzky-Golay filter in place          left ventricle has larger muscle mass and thus its depolarisation
of the high pass filter and differentiator of Pan Tompkins’            dominates the ECG wave. The QRS complex ends at the J
algorithm. Then QRS detection of normal as well as diseased            point and from here starts the ST segment. The ST segment
ECG has been done using both Pan Tompkins’ algorithm and               which lies between the J point and the onset of the T wave,
the modified algorithm developed in this work for comparison.          represents the period between the end of ventricular
Index Terms- electrocardiogram, QRS, Pan Tompkins’                     depolarisation and repolarisation. The T wave is the result of
algorithm, Savitzky-Golay filter                                       ventricular repolarisation. This wave in a normal ECG is
                                                                       asymmetrical as the first part of this wave is more gradual
                             I. INTRODUCTION                           than the subsequent part. The QT interval is measured from
                                                                       the beginning of the QRS complex to the end of the T wave.
    Processing and extraction of features from ECG is of               Measurement of this interval is done by taking into account
importance for doctors as many physical conditions and                 the heart rate as this interval elongates as heart rate decreases.
diseases can be detected using this signal as well as for              The last part of the ECG is the U wave which is found just
engineers who obtain ECG by different stimuli and subject it           after the T wave ends. It is a small deflection and generally
to various algorithms to obtain information. Also in case of           upright [1-2].
ECG it is easy to obtain the signal from the human subject as               In this paper, the disease that has been taken is known as
it is non-invasive as well as no drugs or radiations are               ventricular tachyarrhythmia and the data is obtained from
required. Cardiologists usually use the time-domain ECG                PhysioNet. Filtering of the signals has been done on ten data
signals which are recorded on strip-charts to analyze ECG              named cu01 to cu10 [11]. The raw data available in Physionet
signals. For diagnosis purposes, the parts of the waveforms            were passed through an active second order low-pass Bessel
present in normal ECGs and their corresponding occurrences             filter of cut-off frequency 70 Hz before digitization, and were
in the cardiac system are important.                                   digitised at 250 Hz with 12-bit resolution over a 10 V range (10
    The ECG wave consists of certain parts named as the P              mV nominal relative to the unamplified signals). Each data is
wave, PR interval, QRS complex, ST segment, T wave, QT                 approximately 8.5 minutes in duration. These data show the
interval and then the infrequent presence of U wave. The               presence of sustained ventricular tachycardia, ventricular
sino- atrial node or the SA node is positioned on the left             flutter and ventricular fibrillation [11].
atrium and this initiates the electrical signal causing atrial              Ventricular fibrillation is a serious condition of the heart
depolarisation. Although the atrium is anatomically divided            which may lead to stoppage of the heart if untreated.
into two parts, electrically they function as one part.                Precursor of fibrillation is often ventricular tachycardia or
Atria have very little muscle and produce a wave of small              flutter. So it is important to detect flutter and tachycardia in
amplitude called the P wave. The PR segment is the subse-              the ECG. Ventricular tachycardia is defined as three or more
quent part after the P wave and occurs as the electrical im-           ventricular extrasystoles in succession at a rate of more than
pulse is conducted through the atrio-ventricular node or the           120 beats per minute. The tachycardia may be self terminating
AV node, bundle of His and Purkinje fibres. The PR interval            but is described as “sustained” if it lasts longer than 30
can be defined as the time between the onset of atrial                 seconds [2]. This kind of tachycardia falls under broad
depolarisation and the onset of ventricular depolarisation.            category tachycardia which maybe of ventricular or
After the PR interval, QRS complex occurs. This complex is             supraventricular in origin but is mostly ventricular. In
                                                                       ventricular tachycardia the sequence of cardiac activation is
*.1
      Corresponding author                                             altered, and the impulse no longer follows the normal
© 2012 ACEEE                                                      55
DOI: 01.IJSIP.03.01.550
ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012


intraventricular conduction pathway. As a consequence, the                  The transfer function of the high pass filter is as shown in
morphology of the QRS complex is bizarre, and the duration                  equation (4).
of the complex is prolonged [2]. The ECG waveform which is                  Hhp(z)= P(z)/X(z)= z-16 – Hlp(z)/32                            (4)
obtained is overshadowed with noise signal due to which                     It is finally obtained as in equation (5).
essential features cannot be identified from it. There are many             Hhp(z)= (-z32 + 32z16 – 32z15 + 1)/(32z32 – 32z31)             (5)
algorithms present for denoising an ECG signal and popular                  The difference equation of the filter is as in equation (6).
among them is the Pan- Tompkins’ algorithm [3,9]. In this                         p (nT)= x(nT – 16T) – 0.0313[y(nT – T) + x(nT) – x(nT –
algorithm feature extraction is restricted to QRS detection                                   32T)]                                        (6)
from the original signal by passing the signal through a band               The low cut off frequency of the filter is about 5 Hz and delay
pass filter and a differentiator and then squaring of the                   is 80 ms. The gain of this filter is 1 [9].
resulting signal. The band pass filter is the one which                     ii) Derivative
eliminates noise and the differentiator is used to provide                       To provide information about the slope of the QRS
information about the slope of the QRS complex. Squaring of                 complex, differentiation of the signal is done, after it has been
the signal is done so that all negative values in the waveform              through the band pass filter [9]. A five point derivative is
are changed to positive values. This process is a nonlinear                 implemented using the transfer function as shown in equation
operation which amplifies the output of the differentiator                  (7).
nonlinearly. Then the signal is passed through a moving                     H(z)= 0.1(2 + z-1 – z-3 – 2z-4 )                               (7)
integrator to obtain the QRS waves [3,9].                                   The difference equation for this transfer function is as shown
    This paper shows an alternative way of QRS detection                    in equation (8).
from the ECG signal using Savitzky-Golay filter in place of                      y (nT)= (1/8)*[2x(nT) + x(nT – T) – x( nT – 3T) – 2x(nT –
the band pass filter of the Pan Tompkins’ algorithm. A normal                                            4T)                               (8)
as well as a diseased ECG data showing ventricular                          The fraction 1/8 in equation (8) is an approximation of the actual
tachyarrythmic ECG data are taken and Pan Tompkins’                         gain of 0.1. This derivative approximates the ideal derivative in
algorithm using Savitzky-Golay filter is implemented. The                   the dc through 30 Hz frequency range, and it has a filter delay of
respective QRS detected signals have been obtained from                     10 ms [9].
both types of data.                                                         iii) Squaring
                                                                                 Now, the signal is to be squared. This is the non linear
                            II. THEORY                                      processing of the signal. It is done to get all positive values so
                                                                            that later these values can be processed to get the corresponding
A. Pan Tompkins’ Algorithm
                                                                            squared waves. Also this processing emphasizes the higher
i) Band pass filter                                                         frequencies of the ECG signal which are due to the presence of
    The band pass filter that has been used has been done                   the QRS complexes [9]. Point by point squaring of the signal
by using a low pass filter and then a high pass filter in cascade.          obtained from the differentiator is implemented by equation (9).
The purpose low pass filter is to suppress high frequency                    y ( nT)= [x(nT)]2                                            (9)
noise [9]. Filter design using digital filters having integer
coefficients allows real time processing speeds. No floating                iv) Moving Integrator
point processing required so speed is high. This band pass                      The slope of the R wave is not the absolute way to detect
filter for QRS detection algorithm reduces noise in the ECG                 QRS complexes in an ECG. There may be many long duration
signal by matching the spectrum of average QRS complex,                     and large amplitude QRS waves in the ECG which is abnormal.
eliminating noise due to muscle artefacts, 60 Hz power line                 Only slope of R wave cannot detect these waves [9]. So a moving
interference, baseline wandering and T wave interference. QRS               window integrator is used so that these waves can be detected
energy is maximised by the pass band of approximately in the                as well. The difference equation for this moving window
5 to 15 Hz range. The filter is an integer filter which has poles           integrator is as shown in equation (10).
located such so as to cancel out the zeroes [9]. The second                  y(nT)= (1/N) [(x(nT) – (N-1)T) + (x(nT) – (N-2)T) +…+x(nT)]
order low pass filter has the transfer function of as shown in                                            (10)
equation (1).                                                               It is important to choose an appropriate value for N, which is the
   H(z)= (1- z-6)2/(1- z-1)2                                   (1)          number of samples in the width of the moving window [9].
The cut- off frequency of the filter is 11 Hz, delay is 5 samples           B. Savitzky-Golay Filter
and the gain is 36 [9]. The difference equation of the filter is as
                                                                                 Savitzky-Golay filter has been used both for ECG noise
shown in equation (2).
                                                                            reduction and compression [4-8]. It has been used because of
 y (nT)= 2y(nT- T) - y(nT - 2T) + x(nT) – 2x(nT – 6T) + x(nT –
                                                                            its signal following capabilities by least squares approach [8,10].
 12T)                                                           (2)
                                                                            The Savitzky-Golay filter that has been used in this paper is of
The high pass filter is implemented by subtracting a first order            zero order and of frame length 41.
low pass filter from an all pass filter with delay [9]. The transfer
function of the low pass filter is as shown in equation (3).
 Hlp(z)= Y(z)/X(z)= (1 – z-32)/(1 – z-1)                        (3)
© 2012 ACEEE                                                           56
DOI: 01.IJSIP.03.01. 550
ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012




                                   Fig 2: Block diagram showing QRS detection using Savitzky-Golay filter

                                                                                                    IV. RESULTS
                          III. PROCEDURE
                                                                             The established Pan Tomkins’ algorithm as shown in Fig. 1
   On both the normal and diseased data, Pan Tompkins’
                                                                         has been applied on normal and ventricular tachyarrythmic ECG
algorithm has been implemented using the conventional
                                                                         data and the final QRS detected signals obtained are shown in
algorithm and then using Savitzky-Golay filter in place of the
                                                                         Fig. 3 and Fig. 5 respectively. The results obtained after applying
high pass filter and differentiator. The block diagrams of these
                                                                         the developed algorithm using Savitzky-Golay filter is shown
two methods are shown in Fig. 1 and Fig.2 respectively.
                                                                         in Fig. 4 and Fig. 6 for normal and diseased ECG data
                                                                         respectively. The different blocks of the algorithm have
                                                                         applied as shown in Fig. 2 and the final QRS detected signals
                                                                         are obtained.




                             Fig. 3: Result of the last block of Pan Tompkins’ algorithm for normal ECG data




  Fig. 4: Result of the last block of Pan Tompkins’ algorithm for         Fig. 5: Result of the last block of Pan Tompkins’ algorithm with
                      diseased ECG (data cu04)                                       Savitzky-Golay filter for normal ECG data


© 2012 ACEEE                                                        57
DOI: 01.IJSIP.03.01.550
ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012


                         V. CONCLUSION                                    [1] [4] Dotsinsky, G. Mihov, “A simple approach for tremor
                                                                          suppression in electrocardiograms”, in Int. J. Bioautomation, 2010,
    From the results obtained using the developed algorithm,              14(2), 129-138.
it can be observed that QRS detection is possible with higher             [5] C.M. Fira, Liviu Goras, “An ECG signals compression method
amplitudes of the detected QRS peaks. This algorithm also                 and its validation using NNs”, in IEEE Trans. Biomed. Eng. 2008,
eliminates the need of the high pass filter and the differentiator        vol.55, no.- 4.
blocks as present in Pan Tompkins’ algorithm.                             [6] M. Lascu, D. Lascu, “ Electrocardiogram compression and
                                                                          optimal ECG filtering algorithms”, in WSEAS Transactions on
                                                                          Computers, Issue 4, Volume 7, April 2008.
                           REFERENCES                                     [7] K. Pandia, S. Ravindran, R. Cole, G. Kovacs, L. Giovangrandi,
[1] Gary D. Clifford, Francisco Azuaje, Patrick E. McSharry,              “ Motion artefact cancellation to obtain heart sounds from a single
Advanced Methods and Tools for ECG Data Analysis. Engg. in                chest- worn accelerometer” in IEEE ICASSP 2010.
Medicine & Biology, Boston, London, 2006.                                 [8] S. Hargittai, “ Savitzky-Golay least squares polynomial filters
[2] Francis Morris, June Edhouse, William J. Brady, John Camm,            in ECG signal processing” in IEEE, Computers in Cardiology, 2005.
ABC of Clinical Electrocardiography.BMJ Books, London, 2003.              [9] W.J. Tompkins, Biomedical Digital Signal Processing.
[3] J. Pan, W.J. Tompkins, “A real-time QRS detection algorithm”,         Englewood Cliffs, NJ, Prentice Hall, 1993.
IEEE Trans. Biomed. Eng. 1985, vol.32, pp. 230-236.                       [10] Sophocles J. Orfanidis, Introduction to Signal Processing.
                                                                          Prentice Hall, 2010.
                                                                          [11] www.physionet.org/physiobank/database/cudb/




© 2012 ACEEE                                                         58
DOI: 01.IJSIP.03.01. 550

Weitere ähnliche Inhalte

Was ist angesagt?

Algorithm for the Representation of Parameter Values of Electrocardiogram
Algorithm for the Representation of Parameter Values of ElectrocardiogramAlgorithm for the Representation of Parameter Values of Electrocardiogram
Algorithm for the Representation of Parameter Values of Electrocardiogram
TELKOMNIKA JOURNAL
 
Long term post Ventricular tachycardia ablation guided by non contact mapping...
Long term post Ventricular tachycardia ablation guided by non contact mapping...Long term post Ventricular tachycardia ablation guided by non contact mapping...
Long term post Ventricular tachycardia ablation guided by non contact mapping...
salah_atta
 
Ecg signal processing for detection and classification of cardiac diseases
Ecg signal processing for detection and classification of cardiac diseasesEcg signal processing for detection and classification of cardiac diseases
Ecg signal processing for detection and classification of cardiac diseases
IAEME Publication
 
Ecg compression using fft
Ecg compression using fftEcg compression using fft
Ecg compression using fft
cjsupreme
 

Was ist angesagt? (20)

Algorithm for the Representation of Parameter Values of Electrocardiogram
Algorithm for the Representation of Parameter Values of ElectrocardiogramAlgorithm for the Representation of Parameter Values of Electrocardiogram
Algorithm for the Representation of Parameter Values of Electrocardiogram
 
Steady State Free Precession MRA
Steady State Free Precession MRASteady State Free Precession MRA
Steady State Free Precession MRA
 
2011 10 unipolar electrograms
2011 10 unipolar electrograms2011 10 unipolar electrograms
2011 10 unipolar electrograms
 
Analysis of RS-Segment to Evaluate the Effect of Ventricular Depolarization d...
Analysis of RS-Segment to Evaluate the Effect of Ventricular Depolarization d...Analysis of RS-Segment to Evaluate the Effect of Ventricular Depolarization d...
Analysis of RS-Segment to Evaluate the Effect of Ventricular Depolarization d...
 
Electrophysiologic Study
Electrophysiologic StudyElectrophysiologic Study
Electrophysiologic Study
 
Identification of Myocardial Infarction from Multi-Lead ECG signal
Identification of Myocardial Infarction from Multi-Lead ECG signalIdentification of Myocardial Infarction from Multi-Lead ECG signal
Identification of Myocardial Infarction from Multi-Lead ECG signal
 
Long term post Ventricular tachycardia ablation guided by non contact mapping...
Long term post Ventricular tachycardia ablation guided by non contact mapping...Long term post Ventricular tachycardia ablation guided by non contact mapping...
Long term post Ventricular tachycardia ablation guided by non contact mapping...
 
IRJET- Detection of Abnormal ECG Signal using DWT Feature Extraction and CNN
IRJET- Detection of Abnormal ECG Signal using DWT Feature Extraction and CNNIRJET- Detection of Abnormal ECG Signal using DWT Feature Extraction and CNN
IRJET- Detection of Abnormal ECG Signal using DWT Feature Extraction and CNN
 
Classification of Arrhythmia from ECG Signals using MATLAB
Classification of Arrhythmia from ECG Signals using MATLABClassification of Arrhythmia from ECG Signals using MATLAB
Classification of Arrhythmia from ECG Signals using MATLAB
 
EPS 的基本設定_20120916_南區
EPS 的基本設定_20120916_南區EPS 的基本設定_20120916_南區
EPS 的基本設定_20120916_南區
 
Cardiac MRI principle
Cardiac MRI principleCardiac MRI principle
Cardiac MRI principle
 
Cardio Logical Signal Processing for Arrhythmia Detection with Comparative An...
Cardio Logical Signal Processing for Arrhythmia Detection with Comparative An...Cardio Logical Signal Processing for Arrhythmia Detection with Comparative An...
Cardio Logical Signal Processing for Arrhythmia Detection with Comparative An...
 
Ecg signal processing for detection and classification of cardiac diseases
Ecg signal processing for detection and classification of cardiac diseasesEcg signal processing for detection and classification of cardiac diseases
Ecg signal processing for detection and classification of cardiac diseases
 
Ekg
EkgEkg
Ekg
 
Noise removal using_ecg
Noise removal using_ecgNoise removal using_ecg
Noise removal using_ecg
 
Islamic University Sample Question Solution 2019 (Biomedical Signal Processing)
Islamic University Sample Question Solution 2019 (Biomedical Signal Processing)Islamic University Sample Question Solution 2019 (Biomedical Signal Processing)
Islamic University Sample Question Solution 2019 (Biomedical Signal Processing)
 
Ecg compression using fft
Ecg compression using fftEcg compression using fft
Ecg compression using fft
 
Understanding pacemakers
Understanding pacemakersUnderstanding pacemakers
Understanding pacemakers
 
Icd basic 042411(dr chang)
Icd basic 042411(dr chang)Icd basic 042411(dr chang)
Icd basic 042411(dr chang)
 
Focus on the origin of NCT
Focus on the origin of NCTFocus on the origin of NCT
Focus on the origin of NCT
 

Ähnlich wie QRS Detection Algorithm Using Savitzky-Golay Filter

Paper id 36201509
Paper id 36201509Paper id 36201509
Paper id 36201509
IJRAT
 
Heart rate detection using hilbert transform
Heart rate detection using hilbert transformHeart rate detection using hilbert transform
Heart rate detection using hilbert transform
eSAT Journals
 

Ähnlich wie QRS Detection Algorithm Using Savitzky-Golay Filter (20)

Comparison of Normal and Ventricular Tachyarrhythmic Electrocardiograms using...
Comparison of Normal and Ventricular Tachyarrhythmic Electrocardiograms using...Comparison of Normal and Ventricular Tachyarrhythmic Electrocardiograms using...
Comparison of Normal and Ventricular Tachyarrhythmic Electrocardiograms using...
 
Wavelet transform based on qrs detection using diodic algorithm
Wavelet transform based on qrs detection using diodic algorithmWavelet transform based on qrs detection using diodic algorithm
Wavelet transform based on qrs detection using diodic algorithm
 
Af4103186190
Af4103186190Af4103186190
Af4103186190
 
ECG
ECGECG
ECG
 
Ecg interpretations
Ecg interpretationsEcg interpretations
Ecg interpretations
 
Paper id 36201509
Paper id 36201509Paper id 36201509
Paper id 36201509
 
Ecg interpretation
Ecg interpretation Ecg interpretation
Ecg interpretation
 
7. 60 69
7. 60 697. 60 69
7. 60 69
 
ECG
ECGECG
ECG
 
Saecg
SaecgSaecg
Saecg
 
Ax32327332
Ax32327332Ax32327332
Ax32327332
 
Biomedical signal processing
Biomedical signal processingBiomedical signal processing
Biomedical signal processing
 
ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP
ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAPANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP
ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP
 
Ecg ppp.pptx 2
Ecg ppp.pptx 2Ecg ppp.pptx 2
Ecg ppp.pptx 2
 
Normal ecg interpretation
Normal ecg interpretationNormal ecg interpretation
Normal ecg interpretation
 
Heart rate detection using hilbert transform
Heart rate detection using hilbert transformHeart rate detection using hilbert transform
Heart rate detection using hilbert transform
 
Lec51()
Lec51()Lec51()
Lec51()
 
P-Wave Related Disease Detection Using DWT
P-Wave Related Disease Detection Using DWTP-Wave Related Disease Detection Using DWT
P-Wave Related Disease Detection Using DWT
 
EKG 12 Leads
EKG 12 LeadsEKG 12 Leads
EKG 12 Leads
 
Complete pan tompkins implementation of ecg qrs detector
Complete pan tompkins implementation of ecg qrs detectorComplete pan tompkins implementation of ecg qrs detector
Complete pan tompkins implementation of ecg qrs detector
 

Mehr von IDES Editor

Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...
Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...
Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...
IDES Editor
 
Line Losses in the 14-Bus Power System Network using UPFC
Line Losses in the 14-Bus Power System Network using UPFCLine Losses in the 14-Bus Power System Network using UPFC
Line Losses in the 14-Bus Power System Network using UPFC
IDES Editor
 
Cloud Security and Data Integrity with Client Accountability Framework
Cloud Security and Data Integrity with Client Accountability FrameworkCloud Security and Data Integrity with Client Accountability Framework
Cloud Security and Data Integrity with Client Accountability Framework
IDES Editor
 
Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...
Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...
Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...
IDES Editor
 

Mehr von IDES Editor (20)

Power System State Estimation - A Review
Power System State Estimation - A ReviewPower System State Estimation - A Review
Power System State Estimation - A Review
 
Artificial Intelligence Technique based Reactive Power Planning Incorporating...
Artificial Intelligence Technique based Reactive Power Planning Incorporating...Artificial Intelligence Technique based Reactive Power Planning Incorporating...
Artificial Intelligence Technique based Reactive Power Planning Incorporating...
 
Design and Performance Analysis of Genetic based PID-PSS with SVC in a Multi-...
Design and Performance Analysis of Genetic based PID-PSS with SVC in a Multi-...Design and Performance Analysis of Genetic based PID-PSS with SVC in a Multi-...
Design and Performance Analysis of Genetic based PID-PSS with SVC in a Multi-...
 
Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...
Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...
Optimal Placement of DG for Loss Reduction and Voltage Sag Mitigation in Radi...
 
Line Losses in the 14-Bus Power System Network using UPFC
Line Losses in the 14-Bus Power System Network using UPFCLine Losses in the 14-Bus Power System Network using UPFC
Line Losses in the 14-Bus Power System Network using UPFC
 
Study of Structural Behaviour of Gravity Dam with Various Features of Gallery...
Study of Structural Behaviour of Gravity Dam with Various Features of Gallery...Study of Structural Behaviour of Gravity Dam with Various Features of Gallery...
Study of Structural Behaviour of Gravity Dam with Various Features of Gallery...
 
Assessing Uncertainty of Pushover Analysis to Geometric Modeling
Assessing Uncertainty of Pushover Analysis to Geometric ModelingAssessing Uncertainty of Pushover Analysis to Geometric Modeling
Assessing Uncertainty of Pushover Analysis to Geometric Modeling
 
Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...
Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...
Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...
 
Selfish Node Isolation & Incentivation using Progressive Thresholds
Selfish Node Isolation & Incentivation using Progressive ThresholdsSelfish Node Isolation & Incentivation using Progressive Thresholds
Selfish Node Isolation & Incentivation using Progressive Thresholds
 
Various OSI Layer Attacks and Countermeasure to Enhance the Performance of WS...
Various OSI Layer Attacks and Countermeasure to Enhance the Performance of WS...Various OSI Layer Attacks and Countermeasure to Enhance the Performance of WS...
Various OSI Layer Attacks and Countermeasure to Enhance the Performance of WS...
 
Responsive Parameter based an AntiWorm Approach to Prevent Wormhole Attack in...
Responsive Parameter based an AntiWorm Approach to Prevent Wormhole Attack in...Responsive Parameter based an AntiWorm Approach to Prevent Wormhole Attack in...
Responsive Parameter based an AntiWorm Approach to Prevent Wormhole Attack in...
 
Cloud Security and Data Integrity with Client Accountability Framework
Cloud Security and Data Integrity with Client Accountability FrameworkCloud Security and Data Integrity with Client Accountability Framework
Cloud Security and Data Integrity with Client Accountability Framework
 
Genetic Algorithm based Layered Detection and Defense of HTTP Botnet
Genetic Algorithm based Layered Detection and Defense of HTTP BotnetGenetic Algorithm based Layered Detection and Defense of HTTP Botnet
Genetic Algorithm based Layered Detection and Defense of HTTP Botnet
 
Enhancing Data Storage Security in Cloud Computing Through Steganography
Enhancing Data Storage Security in Cloud Computing Through SteganographyEnhancing Data Storage Security in Cloud Computing Through Steganography
Enhancing Data Storage Security in Cloud Computing Through Steganography
 
Low Energy Routing for WSN’s
Low Energy Routing for WSN’sLow Energy Routing for WSN’s
Low Energy Routing for WSN’s
 
Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...
Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...
Permutation of Pixels within the Shares of Visual Cryptography using KBRP for...
 
Rotman Lens Performance Analysis
Rotman Lens Performance AnalysisRotman Lens Performance Analysis
Rotman Lens Performance Analysis
 
Band Clustering for the Lossless Compression of AVIRIS Hyperspectral Images
Band Clustering for the Lossless Compression of AVIRIS Hyperspectral ImagesBand Clustering for the Lossless Compression of AVIRIS Hyperspectral Images
Band Clustering for the Lossless Compression of AVIRIS Hyperspectral Images
 
Microelectronic Circuit Analogous to Hydrogen Bonding Network in Active Site ...
Microelectronic Circuit Analogous to Hydrogen Bonding Network in Active Site ...Microelectronic Circuit Analogous to Hydrogen Bonding Network in Active Site ...
Microelectronic Circuit Analogous to Hydrogen Bonding Network in Active Site ...
 
Texture Unit based Monocular Real-world Scene Classification using SOM and KN...
Texture Unit based Monocular Real-world Scene Classification using SOM and KN...Texture Unit based Monocular Real-world Scene Classification using SOM and KN...
Texture Unit based Monocular Real-world Scene Classification using SOM and KN...
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

QRS Detection Algorithm Using Savitzky-Golay Filter

  • 1. ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012 QRS Detection Algorithm Using Savitzky-Golay Filter Shreya Das 1, Dr. Monisha Chakraborty*, 1 1 Student, School of Bio-Science and Engineering, Jadavpur University, 188, Raja S. C. Mallik Road, Jadavpur, Kolkata, India *, 1 Assistant Professor, School of Bio-Science and Engineering, Jadavpur University, 188, Raja S. C. Mallik Road, Jadavpur, Kolkata, India {shreyadas.jadavpuruniv@gmail.com, *monishack@school.jdvu.ac.in} Abstract: QRS part of an electrocardiogram (ECG) is generated by the depolarisation wave which travels through physiologically important for cardiac disease detection and the interventricular septum via the bundle of His and bundle extraction of this waveform from the raw signal is an important branches and reaches the ventricular myocardium via the part of ECG analysis. Pan Tompkins’ algorithm of QRS Purkinje fibre network. The impulse first depolarises the left detection is an established method for extraction of this part side of the septum, and then spreads towards the right. The of ECG. In this paper, a modification has been done on Pan Tompkins’ algorithm by using a Savitzky-Golay filter in place left ventricle has larger muscle mass and thus its depolarisation of the high pass filter and differentiator of Pan Tompkins’ dominates the ECG wave. The QRS complex ends at the J algorithm. Then QRS detection of normal as well as diseased point and from here starts the ST segment. The ST segment ECG has been done using both Pan Tompkins’ algorithm and which lies between the J point and the onset of the T wave, the modified algorithm developed in this work for comparison. represents the period between the end of ventricular Index Terms- electrocardiogram, QRS, Pan Tompkins’ depolarisation and repolarisation. The T wave is the result of algorithm, Savitzky-Golay filter ventricular repolarisation. This wave in a normal ECG is asymmetrical as the first part of this wave is more gradual I. INTRODUCTION than the subsequent part. The QT interval is measured from the beginning of the QRS complex to the end of the T wave. Processing and extraction of features from ECG is of Measurement of this interval is done by taking into account importance for doctors as many physical conditions and the heart rate as this interval elongates as heart rate decreases. diseases can be detected using this signal as well as for The last part of the ECG is the U wave which is found just engineers who obtain ECG by different stimuli and subject it after the T wave ends. It is a small deflection and generally to various algorithms to obtain information. Also in case of upright [1-2]. ECG it is easy to obtain the signal from the human subject as In this paper, the disease that has been taken is known as it is non-invasive as well as no drugs or radiations are ventricular tachyarrhythmia and the data is obtained from required. Cardiologists usually use the time-domain ECG PhysioNet. Filtering of the signals has been done on ten data signals which are recorded on strip-charts to analyze ECG named cu01 to cu10 [11]. The raw data available in Physionet signals. For diagnosis purposes, the parts of the waveforms were passed through an active second order low-pass Bessel present in normal ECGs and their corresponding occurrences filter of cut-off frequency 70 Hz before digitization, and were in the cardiac system are important. digitised at 250 Hz with 12-bit resolution over a 10 V range (10 The ECG wave consists of certain parts named as the P mV nominal relative to the unamplified signals). Each data is wave, PR interval, QRS complex, ST segment, T wave, QT approximately 8.5 minutes in duration. These data show the interval and then the infrequent presence of U wave. The presence of sustained ventricular tachycardia, ventricular sino- atrial node or the SA node is positioned on the left flutter and ventricular fibrillation [11]. atrium and this initiates the electrical signal causing atrial Ventricular fibrillation is a serious condition of the heart depolarisation. Although the atrium is anatomically divided which may lead to stoppage of the heart if untreated. into two parts, electrically they function as one part. Precursor of fibrillation is often ventricular tachycardia or Atria have very little muscle and produce a wave of small flutter. So it is important to detect flutter and tachycardia in amplitude called the P wave. The PR segment is the subse- the ECG. Ventricular tachycardia is defined as three or more quent part after the P wave and occurs as the electrical im- ventricular extrasystoles in succession at a rate of more than pulse is conducted through the atrio-ventricular node or the 120 beats per minute. The tachycardia may be self terminating AV node, bundle of His and Purkinje fibres. The PR interval but is described as “sustained” if it lasts longer than 30 can be defined as the time between the onset of atrial seconds [2]. This kind of tachycardia falls under broad depolarisation and the onset of ventricular depolarisation. category tachycardia which maybe of ventricular or After the PR interval, QRS complex occurs. This complex is supraventricular in origin but is mostly ventricular. In ventricular tachycardia the sequence of cardiac activation is *.1 Corresponding author altered, and the impulse no longer follows the normal © 2012 ACEEE 55 DOI: 01.IJSIP.03.01.550
  • 2. ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012 intraventricular conduction pathway. As a consequence, the The transfer function of the high pass filter is as shown in morphology of the QRS complex is bizarre, and the duration equation (4). of the complex is prolonged [2]. The ECG waveform which is Hhp(z)= P(z)/X(z)= z-16 – Hlp(z)/32 (4) obtained is overshadowed with noise signal due to which It is finally obtained as in equation (5). essential features cannot be identified from it. There are many Hhp(z)= (-z32 + 32z16 – 32z15 + 1)/(32z32 – 32z31) (5) algorithms present for denoising an ECG signal and popular The difference equation of the filter is as in equation (6). among them is the Pan- Tompkins’ algorithm [3,9]. In this p (nT)= x(nT – 16T) – 0.0313[y(nT – T) + x(nT) – x(nT – algorithm feature extraction is restricted to QRS detection 32T)] (6) from the original signal by passing the signal through a band The low cut off frequency of the filter is about 5 Hz and delay pass filter and a differentiator and then squaring of the is 80 ms. The gain of this filter is 1 [9]. resulting signal. The band pass filter is the one which ii) Derivative eliminates noise and the differentiator is used to provide To provide information about the slope of the QRS information about the slope of the QRS complex. Squaring of complex, differentiation of the signal is done, after it has been the signal is done so that all negative values in the waveform through the band pass filter [9]. A five point derivative is are changed to positive values. This process is a nonlinear implemented using the transfer function as shown in equation operation which amplifies the output of the differentiator (7). nonlinearly. Then the signal is passed through a moving H(z)= 0.1(2 + z-1 – z-3 – 2z-4 ) (7) integrator to obtain the QRS waves [3,9]. The difference equation for this transfer function is as shown This paper shows an alternative way of QRS detection in equation (8). from the ECG signal using Savitzky-Golay filter in place of y (nT)= (1/8)*[2x(nT) + x(nT – T) – x( nT – 3T) – 2x(nT – the band pass filter of the Pan Tompkins’ algorithm. A normal 4T) (8) as well as a diseased ECG data showing ventricular The fraction 1/8 in equation (8) is an approximation of the actual tachyarrythmic ECG data are taken and Pan Tompkins’ gain of 0.1. This derivative approximates the ideal derivative in algorithm using Savitzky-Golay filter is implemented. The the dc through 30 Hz frequency range, and it has a filter delay of respective QRS detected signals have been obtained from 10 ms [9]. both types of data. iii) Squaring Now, the signal is to be squared. This is the non linear II. THEORY processing of the signal. It is done to get all positive values so that later these values can be processed to get the corresponding A. Pan Tompkins’ Algorithm squared waves. Also this processing emphasizes the higher i) Band pass filter frequencies of the ECG signal which are due to the presence of The band pass filter that has been used has been done the QRS complexes [9]. Point by point squaring of the signal by using a low pass filter and then a high pass filter in cascade. obtained from the differentiator is implemented by equation (9). The purpose low pass filter is to suppress high frequency y ( nT)= [x(nT)]2 (9) noise [9]. Filter design using digital filters having integer coefficients allows real time processing speeds. No floating iv) Moving Integrator point processing required so speed is high. This band pass The slope of the R wave is not the absolute way to detect filter for QRS detection algorithm reduces noise in the ECG QRS complexes in an ECG. There may be many long duration signal by matching the spectrum of average QRS complex, and large amplitude QRS waves in the ECG which is abnormal. eliminating noise due to muscle artefacts, 60 Hz power line Only slope of R wave cannot detect these waves [9]. So a moving interference, baseline wandering and T wave interference. QRS window integrator is used so that these waves can be detected energy is maximised by the pass band of approximately in the as well. The difference equation for this moving window 5 to 15 Hz range. The filter is an integer filter which has poles integrator is as shown in equation (10). located such so as to cancel out the zeroes [9]. The second y(nT)= (1/N) [(x(nT) – (N-1)T) + (x(nT) – (N-2)T) +…+x(nT)] order low pass filter has the transfer function of as shown in (10) equation (1). It is important to choose an appropriate value for N, which is the H(z)= (1- z-6)2/(1- z-1)2 (1) number of samples in the width of the moving window [9]. The cut- off frequency of the filter is 11 Hz, delay is 5 samples B. Savitzky-Golay Filter and the gain is 36 [9]. The difference equation of the filter is as Savitzky-Golay filter has been used both for ECG noise shown in equation (2). reduction and compression [4-8]. It has been used because of y (nT)= 2y(nT- T) - y(nT - 2T) + x(nT) – 2x(nT – 6T) + x(nT – its signal following capabilities by least squares approach [8,10]. 12T) (2) The Savitzky-Golay filter that has been used in this paper is of The high pass filter is implemented by subtracting a first order zero order and of frame length 41. low pass filter from an all pass filter with delay [9]. The transfer function of the low pass filter is as shown in equation (3). Hlp(z)= Y(z)/X(z)= (1 – z-32)/(1 – z-1) (3) © 2012 ACEEE 56 DOI: 01.IJSIP.03.01. 550
  • 3. ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012 Fig 2: Block diagram showing QRS detection using Savitzky-Golay filter IV. RESULTS III. PROCEDURE The established Pan Tomkins’ algorithm as shown in Fig. 1 On both the normal and diseased data, Pan Tompkins’ has been applied on normal and ventricular tachyarrythmic ECG algorithm has been implemented using the conventional data and the final QRS detected signals obtained are shown in algorithm and then using Savitzky-Golay filter in place of the Fig. 3 and Fig. 5 respectively. The results obtained after applying high pass filter and differentiator. The block diagrams of these the developed algorithm using Savitzky-Golay filter is shown two methods are shown in Fig. 1 and Fig.2 respectively. in Fig. 4 and Fig. 6 for normal and diseased ECG data respectively. The different blocks of the algorithm have applied as shown in Fig. 2 and the final QRS detected signals are obtained. Fig. 3: Result of the last block of Pan Tompkins’ algorithm for normal ECG data Fig. 4: Result of the last block of Pan Tompkins’ algorithm for Fig. 5: Result of the last block of Pan Tompkins’ algorithm with diseased ECG (data cu04) Savitzky-Golay filter for normal ECG data © 2012 ACEEE 57 DOI: 01.IJSIP.03.01.550
  • 4. ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012 V. CONCLUSION [1] [4] Dotsinsky, G. Mihov, “A simple approach for tremor suppression in electrocardiograms”, in Int. J. Bioautomation, 2010, From the results obtained using the developed algorithm, 14(2), 129-138. it can be observed that QRS detection is possible with higher [5] C.M. Fira, Liviu Goras, “An ECG signals compression method amplitudes of the detected QRS peaks. This algorithm also and its validation using NNs”, in IEEE Trans. Biomed. Eng. 2008, eliminates the need of the high pass filter and the differentiator vol.55, no.- 4. blocks as present in Pan Tompkins’ algorithm. [6] M. Lascu, D. Lascu, “ Electrocardiogram compression and optimal ECG filtering algorithms”, in WSEAS Transactions on Computers, Issue 4, Volume 7, April 2008. REFERENCES [7] K. Pandia, S. Ravindran, R. Cole, G. Kovacs, L. Giovangrandi, [1] Gary D. Clifford, Francisco Azuaje, Patrick E. McSharry, “ Motion artefact cancellation to obtain heart sounds from a single Advanced Methods and Tools for ECG Data Analysis. Engg. in chest- worn accelerometer” in IEEE ICASSP 2010. Medicine & Biology, Boston, London, 2006. [8] S. Hargittai, “ Savitzky-Golay least squares polynomial filters [2] Francis Morris, June Edhouse, William J. Brady, John Camm, in ECG signal processing” in IEEE, Computers in Cardiology, 2005. ABC of Clinical Electrocardiography.BMJ Books, London, 2003. [9] W.J. Tompkins, Biomedical Digital Signal Processing. [3] J. Pan, W.J. Tompkins, “A real-time QRS detection algorithm”, Englewood Cliffs, NJ, Prentice Hall, 1993. IEEE Trans. Biomed. Eng. 1985, vol.32, pp. 230-236. [10] Sophocles J. Orfanidis, Introduction to Signal Processing. Prentice Hall, 2010. [11] www.physionet.org/physiobank/database/cudb/ © 2012 ACEEE 58 DOI: 01.IJSIP.03.01. 550