Proposal and Prototype of a GUI-Based Algorithm for ECG R-Wave Correction and Immediate R-R Interval Updating

Read the full article See related articles

Discuss this preprint

Start a discussion What are Sciety discussions?

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

Electrocardiography (ECG) is a key biosensing technique for assessing cardiac function and autonomic activity. Accurate detection of R-wave peaks and precise calculation of R-R intervals (RRIs) are essential for heart rate variability (HRV) analysis, yet automated detection algorithms remain vulnerable to misdetections caused by noise or baseline fluctuations. Conventional correction methods based on filter or threshold adjustments may introduce new errors, highlighting the need for an intuitive manual correction function. To address this issue, we developed a prototype graphical user interface (GUI)-based ECG viewer implemented in Fortran for high computational efficiency. The system enables interactive insertion or deletion of R-wave peaks with immediate recalculation of RRIs and automatic updates of related analyses, including power spectral density, histograms, Lorenz plots, and polar plots. Validation using synthetic ECG signals at four sampling frequencies (125-1000 Hz) and three time scales (2, 5, and 10 s) compared GUI-derived RRIs with gold-standard RRIs, showing correction errors below 0.7% and stable update times within 20-30 ms. When applied to real ECG recordings from the MIT-BIH Arrhythmia Database using the MLII lead from records 115 and 122, the same RRI-based comparison achieved accuracies exceeding 0.985 at ±10 ms and reaching 1.000 at ±20 ms or higher. These results confirm that the proposed system provides reliable and immediate feedback and is applicable to physiological data. The algorithm may support future applications in research, clinical, and educational domains of biosignal processing.

Article activity feed