VHDL Implementation of a Causal QRS Detector and Heart-Rate Classifier on a Cyclone V FPGA: Inter-Patient Validation on MIT-BIH
Keywords:
FPGA implementation, QRS detection, heart rate classification, Pan-Tompkins algorithm, VHDL, MIT-BIH, fixed-point arithmetic, inter-patient validationAbstract
This work presents a digital system for QRS detection and heart-rate classification, implemented in native VHDL on an Intel Cyclone V FPGA (DE1-SoC platform) and validated by RTL simulation. The detector follows the Pan-Tompkins processing chain in a simplified fixed-point form and uses integer arithmetic throughout, with a 24-bit squared energy term and a 27-bit moving-window integrator. Synthesized in Quartus Prime 19.1, the system reaches 75.56 MHz and occupies 1,980 of 32,070 ALMs (6%), or 1,102 ALMs (3%) without the optional demonstration ROM, one DSP block and no embedded memory blocks, that module mapping to distributed logic. Validation covered the complete MIT-BIH Arrhythmia Database (48 records, 24 hours of signal, 109,494 annotated beats). The 12-bit input mapping uses a fixed calibration constant derived from the database storage format, so no per-record information enters the signal path. The secondary-threshold parameters and the threshold floor were selected on the DS1 subset and evaluated on the disjoint DS2 subset, following the inter-patient division of de Chazal. On DS2 the detector reaches a sensitivity of 99.56%, a positive predictivity of 99.30% and an F1-score of 99.43%. The rate classifier, evaluated over 44 records after AAMI pacemaker exclusion, reaches 97.14% accuracy over the matched beats, with per-class F1 between 93.74% and 97.90%, and a heart-rate bias of -0.41 BPM with limits of agreement of +5.59 and -6.40 BPM. Its reference applies the same decision rule to the annotated RR intervals, so the figure measures error propagation rather than the validity of the rule.
Downloads
References
C. Pavlatos, A. Dimopoulos, G. Manis, and G. Papakonstantinou, "Hardware implementation of Pan & Tompkins QRS detection algorithm," in Proc. EMBEC'05 Conf., Prague, Czech Republic, Nov. 2005.
R. Stojanović, D. Karadaglić, M. Mirković, and D. Milošević, "A FPGA system for QRS complex detection based on integer wavelet transform," Meas. Sci. Rev., vol. 11, no. 4, pp. 131-138, 2011, doi: 10.2478/v10048-011-0024-z.
S. Raj, K. C. Ray, and O. Shankar, "Cardiac arrhythmia beat classification using DOST and PSO tuned SVM," Comput. Methods Programs Biomed., vol. 136, pp. 163-177, 2016, doi: 10.1016/j.cmpb.2016.08.016.
S. Pal and M. Mitra, "Detection of ECG characteristic points using multiresolution wavelet analysis based selective coefficient method," Measurement, vol. 43, no. 2, pp. 255-261, 2010, doi: 10.1016/j.measurement.2009.10.004.
N. S. Madiraju, N. Kurella, and R. Valapudasu, "FPGA implementation of ECG feature extraction using time domain analysis," arXiv preprint arXiv:1802.03310, 2018. doi: 10.48550/arXiv.1802.03310
A. T. Özdemir and K. Danişman, "Fully parallel ANN-based arrhythmia classifier on a single-chip FPGA: FPAAC," Turk. J. Elec. Eng. Comp. Sci., vol. 19, no. 4, pp. 667-687, 2011, doi: 10.3906/elk-1006-488.
M. N. Imtiaz and N. Khan, "Pan-Tompkins++: A robust approach to detect R-peaks in ECG signals," in Proc. IEEE Int. Conf. Bioinformatics and Biomedicine (BIBM), Las Vegas, NV, USA, Dec. 2022, pp. 2905-2912, doi: 10.1109/BIBM55620.2022.9995552.
J. Pan and W. J. Tompkins, "A Real-Time QRS Detection Algorithm," IEEE Trans. Biomed. Eng., vol. BME-32, no. 3, pp. 230-236, 1985, doi: 10.1109/TBME.1985.325532.
G. B. Moody and R. G. Mark, "The impact of the MIT-BIH Arrhythmia Database," IEEE Eng. Med. Biol. Mag., vol. 20, no. 3, pp. 45-50, 2001, doi: 10.1109/51.932724.
Intel Corporation, "Cyclone V Device Handbook," 2019. [Online]. Available: https://www.intel.com/content/www/us/en/docs/programmable/683036/current/overview.html
Association for the Advancement of Medical Instrumentation, Testing and Reporting Performance Results of Cardiac Rhythm and ST Segment Measurement Algorithms, ANSI/AAMI EC57:2012, Arlington, VA, USA, 2012.
World Health Organization, "Cardiovascular diseases (CVDs)," Fact sheet, Geneva, Switzerland, Jul. 31, 2025. [Online]. Available: https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds)
A. Chen, Y. Zhang, M. Zhang, W. Liu, S. Chang, H. Wang, J. He, and Q. Huang, "A real time QRS detection algorithm based on ET and PD controlled threshold strategy," Sensors, vol. 20, no. 14, art. 4003, Jul. 2020, doi: 10.3390/s20144003.
P. de Chazal, M. O'Dwyer, and R. B. Reilly, "Automatic classification of heartbeats using ECG morphology and heartbeat interval features," IEEE Trans. Biomed. Eng., vol. 51, no. 7, pp. 1196-1206, Jul. 2004, doi: 10.1109/TBME.2004.827359.
J. A. García Limón, F. Martínez-Suárez, and C. Alvarado-Serrano, "Implementation of wavelet-transform-based algorithms in an FPGA for heart rate and RT interval automatic measurements in real time: Application in a long-term ambulatory electrocardiogram monitor," Micromachines, vol. 14, no. 9, art. 1748, Sep. 2023, doi: 10.3390/mi14091748.
S. Dhyani, A. Kumar, S. Choudhury, C. Verma, and Z. Illés, "Assessing ECG-QRS signal detection algorithm chip and simulation on several FPGAs," Discover Computing, vol. 28, art. 13, 2025, doi: 10.1007/s10791-025-09504-6.
G. A. L. Silva, P. H. L. Silva, G. J. P. Moreira, V. L. S. Freitas, J. C. Gertrudes, and E. J. S. Luz, "A systematic review of ECG arrhythmia classification: adherence to standards, fair evaluation, and embedded feasibility," Research on Biomedical Engineering, vol. 42, no. 3, art. 42, 2026, doi: 10.1007/s42600-026-00485-z.
S. Mangaraj, K. Mahapatra, and S. Ari, "HLS-compiled PYNQ-based cardiac arrhythmia detection system leveraging quantized ECG beat images," Biomedical Signal Processing and Control, vol. 109, art. 108063, 2025, doi: 10.1016/j.bspc.2025.108063.