• Jyoti Bali KLE Technological University, Hubballi-580031, Karnataka, India
  • Anilkumar Nandi
  • P.S. Hiremath
  • Poornima .G. Patil
Keywords: ECG-Apnea database, Pan-Tompkins algorithm, Principal Component Analysis, Artificial Neural Networks, Levenberg–Marquardt algorithm, Scaled Conjugate Gradient algorithm


In this paper, a novel methodology for Sleep apnea detection is proposed using ECG signal analysis. It involves the following sequential procedure: Pre-processing using digital filters, Peak or QRS complex detection using Pan-Tompkins algorithm, Feature extraction from detected QRS complex, Reduction of features using Principal Component Analysis (PCA) and finally the Classification using Artificial Neural Networks (ANNs).  The result of the classification of the input ECG signal record is as either belonging to apnea or normal category.  For experimentation, the ECG-Apnea database from MIT’s is used. The performance measures of Peak or QRS complex detection are Accuracy(Acc)=94%, Sensitivity(Se)=95%, Specificity(Sp)= 93% and Precision ( Pr) = 92%. The PCA is applied on the set of time and frequency features of ECG signal to achieve dimensionality reduction and thus reduce the computational time cost, both in training and testing phase of classification by 43% and 33% respectively. The performance of ANN clasifier trained using Scaled Conjugate Gradient (ANN_SCG) has marginally improved values of Acc, Se, Sp, Pr and F-measure , whereas the execution time is significantly reduced by 66%  as compared to that of ANN  classifier trained with Levenberg-Marquardt algorithm (ANN_LM). The experimental results demonstrate the effectiveness of the proposed method in terms of significantly reduced time cost even as compared with two of the published results.


Download data is not yet available.


Nathaniel S. Marshall, Keith K. H. Wong, Peter Y. Liu, Stewart R. J. Cullen, Matthew W. Knuiman, Ronald R. Grunstein, “Sleep Apnea as an Independent Risk Factor for All-Cause Mortality: The Busselton Health Studyâ€, SLEEP, Vol. 31, No. 8, 2008

Jonathan C. Jun, Swati Chopra, Alan R. Schwartz, “Sleep apnoea†, Eur Respir Rev. 25(139) 2016, 12–18.

Robert Joseph Thomas, Chol Shin, Matt Travis Bianchi, Clete Kushida and Chang- Ho Yun, “Distinct polysomnographic and ECG spectograpic phenotypes embedded within Obstructive Sleep Apnea†Sleep Science and practice, 2017,1:1.

Rangayyan, Rangaraj M. “Biomedical signal analysis : a case-study approach†. c2002, IEEE Press ,New York, Wiley-Interscience.

Valtino Afonso, “Biomedical Digital Signal Processing†1993, Pages 236-264, Prentice-Hall, Inc. , ISBN:0-13-067216-5

Piotr FigoÅ„, PaweÅ‚ IrzmaÅ„ski, Adam Jóśko , “ECG signal quality improvement techniquesâ€, PRZEGLÄ„D ELEKTROTECHNICZNY, ISSN 0033-2097, R. 89 NR 4/2013

Pan, Jiapu; Tompkins, Willis J. “A Real-Time QRS Detection Algorithm†, IEEE Transactions On Biomedical Engineering, Vol. BME-32, No. 3, 1985.

Ahlstrom, M. L ,Tompkins, W. J. (1985). “Digital Filters for Real-Time ECG Signal Processing Using Microprocessorsâ€, IEEE Transaction on Biomedical Engineering, Vol.32, No.9, 2007,pp. 708-713.

Mihaela Lascu,Dan Lascu , “Labview Based Event Detection using Pan Tompkins Algorithm “, Proceedings of 7th WSEAS International Conference on Signal Processing, computational Geometry and Artificial Vision, Athens Greece, 2007.

Mohamed Elgendi, Mirjam Jonkma, Friso De Boer , “Improved QRS Detection Algorithm using Dynamic Thresholdsâ€, International Journal of Hybrid Information Technology,Vol.2, No.1, 2009.

Mohammad Pooyan and Fateme Akhoondi, â€Providing An Efficient Algorithm For Finding R Peaks In ECG Signals And Detecting Ventricular Abnormalities With Morphological Features†, Journal of Medical Signals & Sensors , 6(4): 218–223, 2016.

Philip De Chazal, Richard B Reilly, “A Patient Adapting Heart Beat Classifier Using ECG morphology and Heart Beat Interval Features†, IEEE Transactions on Biomedical Engineering, VOL.53, No.12, 2006.

Francisco Castells, Pablo Laguna, Leif Sornmo, Andreas Bollmann, and Jose Millet Roig, “Principal Component Analysis in ECG Signal Processing†, Hindawi Publishing Corporation EURASIP Journal on Advances in Signal Processing Volume 2007, Article ID 74580, 2007, 21 pages.

Penzel and A. Bianchi “Detection of Sleep Apnea from Surface ECG Based on Features Extracted by an Autoregressive Model, Proceedings of the IEEE International Conference on Engineering in Medicine and Biology Society, 2007, pp. 6105-6108.

Sebastian Canisius, Thomas Ploch, Volker Gross, Andreas Jerrentrup, Thomas Penzel, Karl Kesper, “Detection of Sleep Disordered Breathing by automated ECG analysisâ€, 30th Annual International IEEE EMBS Conference, Vancouver, British Columbia, Canada, 2008, 978-1-4244-1815-2/08/$25.00 ©2008 IEEE.

T. Penzel, G. B. Moody, R. G. Mark, A. L. Goldberger, and J. H. Peter, “The apnea-ECG databaseâ€. Computers in Cardiology, 2000, pp. 255-258.

L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdor, P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.K. Peng, and H. E. Stanley, “PhysioBank, PhysioToolkit, and PhysioNet : Components of a new research resource for complex physiologic signalsâ€, Circulation, 2000.

Laiali Almazaydeh, Khaled Elleithy, Miad Faezipour , “ Detection of Obstructive Sleep Apnea Through ECG Signal Features†978-1-4673-0818-2/12/$31.00 ©2012 Crown.

Valtino Afonso, Biomedical Digital Signal Processing, Pages 236-264 ,Prentice-Hall, Inc. Upper Saddle River, NJ, USA ©1993.

B.U.Kohler , C. Hennig and R. Orglmeister,â€The principles of software QRS detectionâ€, IEEE Engineering in Medicine and Biology Magazine, vol. 21, no. 1, 2002, pp. 42-57.

Udit Satija, Barathram. Ramkumar, and M. Sabarimalai Manikandan, “A Review of Signal Processing Techniques for Electrocardiogram Signal Quality Assessmentâ€, IEEE Reviews in Biomedical Engineering, 2018.

Fatin A. Elhaj, Naomie Salim, Arief R. Harris, Tan Tian Swee, Taqwa Ahmed, “Arrhythmia Recognition and Classification using combined linear and nonlinear features of ECG signalsâ€, Computer Methods and Programs in Biomedicine, 127, 2016, 52-63.

Yeldos A. Altay and Artem S. Kremlev, “Comparative analysis of ECG signal processing methods in the time-frequency domain “,IEEE Conference of Russian Young Researchers in Electrical and Electronic Engineering (EIConRus), 2018, 1058-1062.

Sridhar Krishnan, Yashodhan Athavale,†Trends In Biomedical Signal Feature Extractionâ€, Biomedical Signal Processing and Control journal, 43, 2018, 41-63.

Harjeet Kaur, Rajni Rajni, “Electrocardiogram Signal Analysis for R-Peak Detection and Denoising with Hybrid Linearization and Principal Component Analysis†,Turkish Journal of Electrical Engineering & Computer Sciences, 25, 2017, 2163-2175.

Roshan Joy Martis , U. Rajendra Acharya , K.M. Mandana , A.K. Ray, Chandan Chakraborty, “Application Of Principal Component Analysis To ECG Signals For Automated Diagnosis Of Cardiac Healthâ€, Expert Systems with Applications Volume 39, Issue 14, 2012 , 11792-11800.

R.Rodrígueza, A. Mexicanob, J. Bilac, S. Cervantesd, R. Ponceb, “Feature Extraction of Electrocardiogram Signals by applying Adaptive Threshold and Principal Component Analysisâ€, Journal of Applied Research and Technology 13 , 2015, 261-269.

M. F. Moller, “A Scaled Conjugate Gradient Algorithm for Fast Supervised Learningâ€, Neural Networks, 6, 1993, pp. 525–533.

S. Ali and K. A. Smith, “On learning algorithm selection for classificationâ€, Applied Soft Computing, (6), 2006, pp.119–138.

W.W. Hager and H. Zhang, “A survey of nonlinear Conjugate Gradient methodsâ€, Pacific of Journal Optimization, 2:35, 2006, pp. 35–58

M. K. S. Alsmadi, K. B. Omar, S. A. Noah, “Back propagation algorithm: The best algorithm among the Multi-layer Perceptron algorithmâ€, International Journal of Computer Science and Network Security, vol., 9(4), 2009, pp. 378–383.

Powers, D.M.W. “Evaluation: From Precision, and F-Measure To ROC, Informedness, Markedness & Correlation†Journal of Machine Learning Technologies, , Volume 2, Issue 1, 2011, pp-37-63.

Krzysztof Gajowniczek, Tomasz ZÄ…bkowski, Ryszard Szupiluk “ Estimating the ROC Curve and its significance for Classification Modelsâ€, Assessment Quantitative Methods In Economics, Vol. Xv, No. 2, 2014, Pp. 382 – 391,

Philip de Chazal, Thomas Penzel, Conor Heneghan, “Automated detection of Obstructive Sleep Apnoea at different time scales using the Electrocardiogramâ€, IOP Publishing Ltd, Physiological Measurement, Volume 25, Number 4 , 2004.

Bali, J., Nandi, A., Hiremath, P, “Performance Comparison of ANN Classifiers For Sleep Apnea Detection Based on ECG Signal Analysis Using Hilbert Transformâ€, International Journal Of Computers & Technology, 17(2), 2018, 7312-7325.

FAUST, Oliver, ACHARYA, U. Rajendra, NG, E. Y. K. and FUJITA, Hamido (2016). “A review of ECG-based diagnosis support systems for obstructive sleep apneaâ€, Journal of Mechanics in Medicine and Biology, 16 (01), 2016, p. 1640004.

A.F. Quiceno-Manrique, J.B. Alonso-Hernandez, C.M. Travieso-Gonz´alez, M.A. Ferrer-Ballester, G. Castellanos-Dom´ınguez, “Detection of obstructive sleep apnea in ECG recordings using time-frequency distributions and dynamic featuresâ€, 31st Annual International Conference of the IEEE EMBS Minneapolis 2009.

A. Khandoker, C. K. Karmakar, M. Palaniswami, “Automated recognition of patients with Obstructive Sleep Apnoea using wavelet-based features of Electrocardiogram recordingsâ€, Computers in Biology and Medicine 39 (1),2009, 88–96

C. Varon, D. Testelmans, B. Buyse, J. A. K. Suykens and S. Van Huffel, “Sleep apnea classification using least-squares support vector machines on single lead ECG," 2013 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Osaka, 2013, pp. 5029-5032.

M. Bsoul, H. Minn, L. Tamil, “Apnea medassist: Real-time sleep apnea monitor using single-lead ECGâ€, IEEE Transactions on Information Technology in Biomedicine 15 (3) (2011) 416–427.

B. M. Oussama, B. M. Saadi, H. S. Zine-Eddine, “Extracting features from ECG and respiratory signals for automatic supervised classification of heartbeat using Neural Networksâ€, Asian Journal of Information Technology 15 (1) ,2016 , 5–11.

S.C. Gupta, V.K. Kapoor, “Fundamentals of Mathematical Statistics a Modern Approachâ€, 10th Edition 2000.

Priscilla E. Greenwood , Michael S. Nikulin, “A Guide to Chi-Squared Testing†(Wiley Series in Probability and Statistics), 1st Edition.

How to Cite
Bali, J., Nandi, A., Hiremath, P., & Patil, P. .G. (2018). DETECTION OF SLEEP APNEA IN ECG SIGNAL USING PAN-TOMPKINS ALGORITHM AND ANN CLASSIFIERS. COMPUSOFT: An International Journal of Advanced Computer Technology, 7(11). Retrieved from