Automated Heart Rate and QRS Axis Classification on Digital Electrocardiograms to Determine Associated Disease
DOI:
https://doi.org/10.54536/ajbb.v5i1.7025Keywords:
Bradycardia, Digitized ECG, Electrical Axis, Neurokit, Signal Analysis, TachycardiaAbstract
A computational tool was developed in Python to automatically analyze digitized electrocardiograms (ECGs) from the PhysioNet database. Open-source libraries such as NeuroKit, SciPy, and BioScipy were employed to detect fiducial points corresponding to the P wave and QRS complex. Based on these measurements, temporal intervals within the ECG were extracted to estimate heart rate, cardiac rhythm, and electrical axis, thus allowing the identification of potential underlying cardiac abnormalities. The proposed script demonstrated the ability to accurately detect conditions including bradycardia (mild, moderate, or severe), tachycardia, rhythm classification (regular or irregular), and electrical axis orientation (normal, leftward deviation, rightward deviation, or indeterminate). In this preliminary testing phase, a total of 100 ECGs were analyzed. From these, 60% were classified as bradycardia, 10% as tachycardia, 30% as normal frequency; on the other hands, electrical axis was classified as leftward (20%), indeterminate (20%) deviations and 60% as normal, while no rightward deviations were observed. Examples of specific cardiac conditions identified by the algorithm include Left Ventricular Hypertrophy (LVH), Sinus Node Dissociation (SND) and electrical instability (EI). These results were validated by a cardiologist from Hospital General Desiderio Rosado Carvajal in Comalcalco, Tabasco, Mexico, who performed the analyses through conventional diagnostic methods and, in all cases the predictions were exactly equals. The high accuracy observed supports the potential of this computational approach as a technological aid in clinical settings.
Downloads
References
Achayra U. Oh, S. H. (2017). A deep convulutional neural network model to calssify hertbeats. . Computer in biology and medicine, 389-396.
Ahmad, Z. T. (2021). ECG heartbeat classification using multimodal function . IEEE Access, , 15-21.
Ahmed A. Ali, A. (2023). Classifying cardiac arrhythmia from ECG signal using 1D CNN deep learning model. Methematics, 1-16.
Almalchy, M. C. (2019). Noise Removal from ECG Signal Based on Filtering Techniques. Noise Removal from ECG signal based on filtering techniques, 176-181.
Altay, Y. K. (2020). A New ECG Signal Processing Method Based on Wide-Band Notch Filter. IEEE conference of Russian Young Researcher in Electrical and Electronic Engineering, 64-69.
Ansari, Y. M. (2023). Deep learning for ECG arrhytmia detection and classification: an overview of progress for period. Frontiers in physiology, 64-67.
Ata, F. (2024). Atrioventricular block in patients with hyperthyroidism: a narrative review. Journal of International Medical Research, 1-14.
Darmawahyuni, A. N. (2024). An improved electrocardiogram arrhythmia classification performance with feature optimization. BMC Medical Informatics and Decision Making, 1-17.
García-Isla, G. V.-R.-L.-H. (2022). PyECG: A software tool for the analysis of the QT interval in the electrocardiogram. Computer Methods and Programs in Biomedicine, 24-32.
Golgowsky, M. O. (2020). International Conference on Computational Problems of Electrical Engineering (CPEE) . Anomaly detection in ECG using wavelet transform. (págs. 1-4). Poland: IEEE.
Gosselin, R. V. (2024). Pyheartlib: A Python package for automated processing and feature extraction of electrocardiogram signals. Journal of Open Source Software, 120-135.
Hashim, F. A. (2017). Electrocardiogram noise cancellation using wavelet transform. Journal of Fundamental and Applied Sciences, 131-140.
Hesar, H. M. (2017). ECG denoising using marginalized particle extended kalman filter with an automatic particle weighting strategy. . J. Biomed. Health Inform, 635-644.
Hoang, T. P. (2022). A Python package for physiological signal quality control. Frontiers in Physiology, 1-8.
Hossain, B. B. (2019). An Accurate QRS complex and P wave Detection in ECG Signals using Complete Ensemble Empirical Mode Decomposition Approach. IEEE Access, 1-12.
Huang Y. Liu, H. W. (2021). Ventricular arrhythmia predics poor outcome in polymyositis/dermatomyositis with myocardial involment. . Rheumatology, 9-16.
Kosinski, W. O. (2013). Digital signal processing un ECG recorder with python-based software. Journal of medical informatic and technology., 1-8.
Kramer, L. M. (2022). ECGAssess: A Python-base toolbox to assess ECG lead signal quality. Frontier in Digital Health, 1-9.
Kumar, A. R. (2019). Efficent QRS complex detection algorithm base on fast Fourier transform. . Biomedical engineering letters, 145-151.
Lee, J. (2023). Optimizing thresholds for diagnostic test: a focus on sensitivity and specificity trade-off. Journal of medical diagnostic methods, 123-130.
Lee, S. J. (2018). Efficient Fiducial point detection of ECG QRS complex based on polygonal approximation. Sensors, 18-25.
Liu, M. D. (2022). Prognostic significance of first- degree atrioventricular block in a large Asian population: a prospective cohort study. BMJ Open, 1-8.
Magrupov, T. M. (2020). ECG Signal Processing Algorithms to Determine Heart Rate. Journal of Computer Engineering, 1-9.
Makowski, D. P. (2021). NeuroKit2: A Python toolbox for neurophysiological signal processing. Behavior Research Methods, 1289-1296.
Migliore, F. T. (2019). First-degree atrioventricular block on basal electrocardiogram predicts future arrhythmic events in patients with Brugada syndrome:along-term follow-up study from the Veneto region of North eastern Italy. European Society of Cardiology, 322-331.
Milivojevic, M. G. (2017). Python based physiological signal processing for vital signs monitoring. Internation Conference on electrical, electronics and computing engineering, 1-4.
Nabian, M. Y. (2018). An open-source feature extraction for the analysis of peripherial physiological data. . Journlas od Translational Egineering in health and medicine, 1-11.
Nguyen, L. D. (2021). Heart rate feature extraction based on Neurokit2 with python. . Internetworking Indonesia Journal, 39-44.
Organization, W. H. (23 de 05 de 2025). World Health Organization. Obtenido de https://www.who.int/es
Pascual Huerta, J. (2024). Sensitivity, specificity, and predictive values (Parte II). Revista Española de Podología., 69-70.
Raymond, P. E. (2019). Association between PR Interval, First‐degree atrioventricular block and major arrhythmic events in patients with Brugada syndrome – Systematic review and meta‐analysis. Journal of Arrhythmia, 1-7.
Roberts, J. W. (2024). Open-source software for repiratory rate estimation using single-lead electrocardiograms. Scientific report,, 1-11.
Roth, G. M. (2020). Globarl burden of cardiovascular disease and risk factors, 1990-2019: update from GBD 2019 study. Jounals of the american collegue of cardiology, 2982-3021.
Sandoval, M. M. (2025). Comparison of moving average and Savitzky-Golay filters for noise removal in electrocardiograms. International Journal of engineering in computer science, 184-188.
Singh, A. K. (2023). ECG Signal Feature Extraction Trends in Methods and Applications. Biomedical engineering,, 74-86.
Sultana, N. K. (2015). Mitigation of noise and interference in ECG signal with Savitzky-Golay least squares polynomials and discrete wavelet transform. . Computer and communication Thecnologies, 1-5.
Sun, L. L. (2012). ECG analysis using multiple instance learning for myocardial infarction detection. IEEE Trans. Biomed Engineering, 48-56.
T. Rodrigues, S. S. (2021). 25th International Conference on Pattern Recognition (ICPR), . A Low-Complexity R-peak Detection Algorithm with Adaptive Thresholding for Wearable Devices (págs. 1-8). Milan, Italy.: IEEE.
Venkatesan, C. K. (2020). FPGA implementation of real-time ECG signal processing for automated PR interval monitoring. Microprocessors and Microsystems, 94-99.
Wicaksana, C. F. (2019). Comparison of acceleration python library on design and implementation of QRS detection module from ECG heart signal. . Materials Science and Engineering , 1-7.
Zavadjil, M. (2024). A decision tree classifier algorithm for the automated analysis of electrocardiogram signals to identify heart arrythmias. Journals of high school science, 74-86.
Zheng, J. G. (20 de 05 de 2025). Physionet. Obtenido de https://physionet.org/content/ecg-arrhythmia/1.0.0/
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Manuel Sandoval Martínez, Claudia Morales Barrón, Luz Elba Castillo Izquierdo, Ramón Izquierdo Córdova

This work is licensed under a Creative Commons Attribution 4.0 International License.