FPGA-based ECG Arrhythmia Classification using Dual-Branch DSCResNet with Inter-Patient Evaluation
Abstract
This paper presents a compact Two-Branch Depthwise Separable Convolutional ResNet (DSCResNet) for five-class AAMI ECG arrhythmia classification on the Xilinx Zynq-7020 FPGA. The architecture jointly models waveform morphology through a CNN branch and eight-feature RR interval timing through an RR-MLP branch, fusing both into a 160-dimensional representation for final classification. Unlike all six compared works, this paper strictly enforces the AAMI EC57-compliant inter-patient evaluation protocol, partitioning the MIT-BIH Arrhythmia Database by patient identity with no beat-level overlap between partitions, ensuring all reported metrics represent genuine generalisation to unseen patients. The model achieves 83.11% an overall accuracy and a macro F1-score of 0.521, with a Ventricular ectopic recall of 79.3% and a Supraventricular ectopic recall of 43.2%. The Supraventricular recall is attributed entirely to the RR-MLP branch, with ablation experiments confirming that waveform morphology alone is insufficient for S-class detection. At only $\mathbf{0 . 4 3 ~ M B}$, the model is the most compact in the comparison. Bootstrapped 95% confidence intervals confirm the statistical stability of all reported figures (overall accuracy CI: [83.62%, 84.66%]; macro F1 CI: [0.516, 0.532]). A 4thorder Butterworth bandpass filter implemented in Verilog as four cascaded Q16.16 Second-Order Sections shares exact coefficients with the MATLAB training pipeline, consuming 2,326 LUTs (4.37%), 516 flip-flops (0.48%), zero DSP48 blocks, and 29 mW of logic power, operating at 116.6 MHz with all timing constraints satisfied. Future work will extend the implementation to include the full neural network inference accelerator on the PYNQ-Z2 platform.