Submitted:
31 October 2026
Posted:
09 November 2026
You are already at the latest version
Abstract
We present a QRS detector built from a difference of two triangular moving averages, \(x_p=\mathrm{TMA}(x-\mathrm{TMA}(x,w_1),w_2)\), computed by running sums at constant cost per sample, and a local decision rule with no learned parameters. The filter rejects the constant component exactly; we prove a two-sided bound between each triangular stage and the Gaussian of equal variance and a uniform bound, valid for any scale ratio, between the filter and an explicit difference of Gaussians. The decision rule combines a sliding-window threshold with a refractory and T-wave constraint; one of 48 prespecified configurations was selected on the MIT-BIH Arrhythmia Database and tested against Pan--Tompkins and Elgendi's two-moving-average detector on the Supraventricular Arrhythmia, INCART and European ST-T databases (the last never used before) and on the Noise Stress Test benchmark. Elgendi's detector has the highest F1 at \(\pm100\)~ms on every clinical database, but the difference is significant (record-bootstrap 95% interval excluding zero) only on INCART; the proposed detector has a higher gross F1 than Pan-Tompkins on all of them, significantly only on MIT-BIH. Its R-peak timing error has a lighter tail than Pan-Tompkins everywhere and a lighter or equal tail compared with Elgendi's detector (offset-free 95th percentile 22-39~ms against 31-55~ms on three databases; equal on European ST-T). On this benchmark, at 12 and 6~dB, within the band where QRS detection in wearable ECG is considered reliable, it has the highest F1 and fewest false detections (significantly at 6~dB); at 0~dB and below all methods become unusable (\(F_1\le0.33\)).
Keywords:
QRS detection
; triangular moving average
; difference of Gaussians
; running sum
; adaptive threshold
; noise stress test
; electrocardiogram
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.