An Interpretable DSP Architecture for ECG Rhythm and Premature Ventricular Contraction Detection in MATLAB/Simulink
Electrocardiogram (ECG) monitoring requires reliable signal preprocessing and interpretable detection of abnormal cardiac activity while maintaining low algorithmic complexity. This study presents an integrated digital signal processing architecture developed in MATLAB/Simulink for ECG preprocessing, QRS and R-peak detection, heart-rate estimation, rhythm classification, and premature ventricular contraction (PVC) detection. Real ECG recordings from the MIT-BIH Arrhythmia Database were used for development and evaluation. The preprocessing stage employs minimum-order elliptic IIR high-pass and low-pass filtering, followed by differentiation, squaring, moving-window integration, thresholding, and R-peak detection. RR intervals derived from detected R peaks are used for instantaneous heart-rate calculation and classification of normal rhythm, bradycardia, and tachycardia. PVC detection uses two interpretable beat-level features, an RR-interval ratio and a QRS-energy ratio, combined through fixed rule-based logic. Three initial 10-s windows containing 18 annotated PVCs were used during algorithm development and threshold selection. After the detector parameters were frozen, evaluation was performed on nine additional non-overlapping 10-s windows containing 56 expert-annotated PVCs from MIT-BIH Records 106, 119, and 200. Using a +/-100 ms event-matching tolerance, the held-out evaluation produced 40 true positives, 9 false positives, and 16 false negatives, corresponding to 71.43% sensitivity, 81.63% precision, and 76.19% F1 score. Across the same nine windows, the R-peak detector achieved 94.39% sensitivity, 99.02% positive predictivity, 96.65% F1 score, and approximately 16.91 ms mean absolute timing error. The results demonstrate the feasibility and limitations of a lightweight and explainable streaming ECG-processing architecture and motivate future work incorporating adaptive decision thresholds and broader patient-independent validation.
Authors
- Mst. Jannatul Ferdous (ORCID: https://orcid.org/0000-0003-3828-7943)
- Abdullah Atif (ORCID: https://orcid.org/0009-0003-4577-7032)
Institutions
- Varendra University (BD)
Publication Details
- Journal
- medRxiv
- Published
- 2026-11-18
- DOI
- https://doi.org/10.64898/2026.11.16.26368189
- Primary Topic
- ECG Monitoring and Analysis
- Type
- preprint