Precise detection and localization of R-peaks from ECG signals

Heart rate variability (HRV) is derived from the R-R interval, which depends on the precise localization of R-peaks within an electrocardiogram (ECG) signal. However, current algorithm assessment methods prioritize the R-peak detection's sensitivity rather than the precision of pinpointing the...

Full description

Bibliographic Details
Main Authors: Diguo Zhai, Xinqi Bao, Xi Long, Taotao Ru, Guofu Zhou
Format: Article
Language:English
Published: AIMS Press 2023-10-01
Series:Mathematical Biosciences and Engineering
Subjects:
Online Access:https://www.aimspress.com/article/doi/10.3934/mbe.2023848?viewType=HTML
_version_ 1827767720313094144
author Diguo Zhai
Xinqi Bao
Xi Long
Taotao Ru
Guofu Zhou
author_facet Diguo Zhai
Xinqi Bao
Xi Long
Taotao Ru
Guofu Zhou
author_sort Diguo Zhai
collection DOAJ
description Heart rate variability (HRV) is derived from the R-R interval, which depends on the precise localization of R-peaks within an electrocardiogram (ECG) signal. However, current algorithm assessment methods prioritize the R-peak detection's sensitivity rather than the precision of pinpointing the exact R-peak positions. As a result, it is of great value to develop an R-peak detection algorithm with high-precision R-peak localization. This paper introduces a novel R-peak localization algorithm that involves modifications to the well-established Pan-Tompkins (PT) algorithm. The algorithm was implemented as follows. First, the raw ECG signal $ X\left(i\right) $ was band-pass filtered (5–35 Hz) to obtain a preprocessed signal $ Y\left(i\right) $. Second, $ Y\left(i\right) $ was squared to enhance the QRS complex, followed by a 5 Hz low-pass filter to obtain the QRS envelope, which was transformed into a window signal $ W\left(i\right) $ by dynamic threshold with a minimum width of 200 ms to mark the QRS complex. Third, $ Y\left(i\right) $ was used to generate QRS template $ T\left(n\right) $ automatically, and then the R-peak was identified by a template matching process to find the maximum absolute value of all cross-correlation values between $ T\left(n\right) $ and $ Y\left(i\right) $. The proposed algorithm achieved a sensitivity (SE) of 99.78%, a positive prediction value (PPV) of 99.78% and data error rate (DER) of 0.44% in R-peak localization for the MIT-BIH Arrhythmia database. The annotated-detected error (ADE), which represents the error between the annotated R-peak location and the detected R-peak location, was 8.35 ms for the MIT-BIH Arrhythmia database. These results outperformed the results obtained using the classical Pan-Tompkins algorithm which yielded an SE of 98.87%, a PPV of 99.14%, a DER of 1.98% and an ADE of 21.65 ms for the MIT-BIH Arrhythmia database. It can be concluded that the algorithm can precisely detect the location of R-peaks and may have the potential to enhance clinical applications of HRV analysis.
first_indexed 2024-03-11T12:01:56Z
format Article
id doaj.art-b02ee0d8260f48e7bc80a8167da1d7ae
institution Directory Open Access Journal
issn 1551-0018
language English
last_indexed 2024-03-11T12:01:56Z
publishDate 2023-10-01
publisher AIMS Press
record_format Article
series Mathematical Biosciences and Engineering
spelling doaj.art-b02ee0d8260f48e7bc80a8167da1d7ae2023-11-08T01:34:16ZengAIMS PressMathematical Biosciences and Engineering1551-00182023-10-012011191911920810.3934/mbe.2023848Precise detection and localization of R-peaks from ECG signalsDiguo Zhai0Xinqi Bao1Xi Long2Taotao Ru 3Guofu Zhou 41. Guangdong Provincial Key Laboratory of Optical Information Materials and Technology, Institute of Electronic Paper Displays, South China Academy of Advanced Optoelectronics, South China Normal University, Guangzhou 510006, China 2. National Center for International Research on Green Optoelectronics, South China Normal University, Guangzhou 510006, China3. Department of Engineering, King's College London, Strand, London, WC2R 2LS, UK4. Department of Electrical Engineering, Eindhoven University of Technology, 5612, AZ, Eindhoven, The Netherlands1. Guangdong Provincial Key Laboratory of Optical Information Materials and Technology, Institute of Electronic Paper Displays, South China Academy of Advanced Optoelectronics, South China Normal University, Guangzhou 510006, China 2. National Center for International Research on Green Optoelectronics, South China Normal University, Guangzhou 510006, China1. Guangdong Provincial Key Laboratory of Optical Information Materials and Technology, Institute of Electronic Paper Displays, South China Academy of Advanced Optoelectronics, South China Normal University, Guangzhou 510006, China 2. National Center for International Research on Green Optoelectronics, South China Normal University, Guangzhou 510006, ChinaHeart rate variability (HRV) is derived from the R-R interval, which depends on the precise localization of R-peaks within an electrocardiogram (ECG) signal. However, current algorithm assessment methods prioritize the R-peak detection's sensitivity rather than the precision of pinpointing the exact R-peak positions. As a result, it is of great value to develop an R-peak detection algorithm with high-precision R-peak localization. This paper introduces a novel R-peak localization algorithm that involves modifications to the well-established Pan-Tompkins (PT) algorithm. The algorithm was implemented as follows. First, the raw ECG signal $ X\left(i\right) $ was band-pass filtered (5–35 Hz) to obtain a preprocessed signal $ Y\left(i\right) $. Second, $ Y\left(i\right) $ was squared to enhance the QRS complex, followed by a 5 Hz low-pass filter to obtain the QRS envelope, which was transformed into a window signal $ W\left(i\right) $ by dynamic threshold with a minimum width of 200 ms to mark the QRS complex. Third, $ Y\left(i\right) $ was used to generate QRS template $ T\left(n\right) $ automatically, and then the R-peak was identified by a template matching process to find the maximum absolute value of all cross-correlation values between $ T\left(n\right) $ and $ Y\left(i\right) $. The proposed algorithm achieved a sensitivity (SE) of 99.78%, a positive prediction value (PPV) of 99.78% and data error rate (DER) of 0.44% in R-peak localization for the MIT-BIH Arrhythmia database. The annotated-detected error (ADE), which represents the error between the annotated R-peak location and the detected R-peak location, was 8.35 ms for the MIT-BIH Arrhythmia database. These results outperformed the results obtained using the classical Pan-Tompkins algorithm which yielded an SE of 98.87%, a PPV of 99.14%, a DER of 1.98% and an ADE of 21.65 ms for the MIT-BIH Arrhythmia database. It can be concluded that the algorithm can precisely detect the location of R-peaks and may have the potential to enhance clinical applications of HRV analysis.https://www.aimspress.com/article/doi/10.3934/mbe.2023848?viewType=HTMLheart rate variabilityr-peak detectiontemplate matchingdynamic thresholdannotated-detected error
spellingShingle Diguo Zhai
Xinqi Bao
Xi Long
Taotao Ru
Guofu Zhou
Precise detection and localization of R-peaks from ECG signals
Mathematical Biosciences and Engineering
heart rate variability
r-peak detection
template matching
dynamic threshold
annotated-detected error
title Precise detection and localization of R-peaks from ECG signals
title_full Precise detection and localization of R-peaks from ECG signals
title_fullStr Precise detection and localization of R-peaks from ECG signals
title_full_unstemmed Precise detection and localization of R-peaks from ECG signals
title_short Precise detection and localization of R-peaks from ECG signals
title_sort precise detection and localization of r peaks from ecg signals
topic heart rate variability
r-peak detection
template matching
dynamic threshold
annotated-detected error
url https://www.aimspress.com/article/doi/10.3934/mbe.2023848?viewType=HTML
work_keys_str_mv AT diguozhai precisedetectionandlocalizationofrpeaksfromecgsignals
AT xinqibao precisedetectionandlocalizationofrpeaksfromecgsignals
AT xilong precisedetectionandlocalizationofrpeaksfromecgsignals
AT taotaoru precisedetectionandlocalizationofrpeaksfromecgsignals
AT guofuzhou precisedetectionandlocalizationofrpeaksfromecgsignals