journal article·2026-02-28Open access

Correlation Based Dynamic Time Warping for ECG Waveform

Ruri Lee, Byungmun Kang, DongHyeon Kim, DaeEun Kim

Applied Sciences· Volume 16· Issue 5

Abstract

Electrocardiogram waveform delineation is a fundamental task for quantitative cardiac analysis, yet accurate and consistent estimation of waveform boundaries remains challenging due to heart rate variability, inter-subject morphological differences, and nonlinear temporal distortions across cardiac cycles. Conventional rule-based methods and pointwise Dynamic Time Warping approaches are sensitive to amplitude variations and baseline fluctuations, while deep learning–based models require large annotated datasets and often suffer from limited interpretability and generalization. In this study, we propose a morphology-oriented ECG waveform alignment framework based on Pearson correlation–based Dynamic Time Warping (PCDTW). By integrating window-level matching with a correlation-driven cost function, the proposed method explicitly emphasizes local morphological similarity rather than absolute amplitude differences. Each ECG record is aligned using a subject-specific reference cycle constructed from normalized RR intervals, enabling stable correspondence of waveform boundaries without any training process. The proposed method was evaluated on two publicly available databases, the QT Database (QTDB) and the Lobachevsky University Electrocardiography Database (LUDB). Experimental results show that PCDTW significantly reduces QT and QTcB estimation errors compared with conventional DTW variants, demonstrating improved temporal consistency and lower bias across cardiac cycles. In particular, the mean QTcB error was reduced to 28.14 ms, compared with 124.54 ms obtained using conventional DTW. In addition, on LUDB, the overall mean delineation error for the P wave, QRS complex, and T wave boundaries was 10.68 ms, showing comparable or superior performance to state-of-the-art deep learning–based methods despite requiring no external training data. These findings indicate that morphology-aware, correlation-based temporal alignment provides a robust and interpretable alternative for ECG waveform boundary detection under realistic physiological variability.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: ECG Monitoring and Analysis · Heart Rate Variability and Autonomic Control · Time Series Analysis and Forecasting

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

School of Electrical and Electronic Engineering, Yonsei University, Seoul 03722, Republic of Korea

Funding

Korea Institute for Advancement of Technology

References (35)

Show source-provided references
1. Recommendations for the standardization and interpretation of the electrocardiogram: Part I: The electrocardiogram and its technology a scientific statement from the American Heart Association Electrocardiography and Arrhythmias Committee, Council on Clinical Cardiology; the American College of Cardiology Foundation; and the Heart Rhythm Society endorsed by the International Society for Computerized Electrocardiology10.1016/j.jacc.2007.01.024 ↗
2. Prospective evaluation of smartwatch-enabled detection of left ventricular dysfunction10.1038/s41591-022-02053-1 ↗
3. Intraindividual variability in electrocardiograms10.1016/j.jelectrocard.2008.01.012 ↗
4. Classification of ST segment in ECG signals based on cross correlated supervised data10.1007/s42452-020-3050-3 ↗
5. Rule-based method for morphological classification of ST segment in ECG signals10.1007/s40846-015-0092-x ↗
6. An algorithm for robust and efficient location of T-wave ends in electrocardiograms10.1109/TBME.2006.884644 ↗
7. Application of the phasor transform for automatic delineation of single-lead ECG fiducial points10.1088/0967-3334/31/11/005 ↗
8. Abrishami, H., Han, C., Zhou, X., Campbell, M., and Czosek, R. (2018). Supervised ECG interval segmentation using LSTM neural network. Proceedings of the International Conference on Bioinformatics & Computational Biology (BIOCOMP), The Steering Committee of The World Congress in Computer Science, Computer Engineering and Applied Computing (WorldComp).
9. Semantic segmentation of ECG waves using hybrid channel-mix convolutional and bidirectional LSTM10.1016/j.bspc.2020.102162 ↗
10. DENS-ECG: A deep learning approach for ECG signal delineation10.1016/j.eswa.2020.113911 ↗
11. Beat-to-beat electrocardiogram waveform classification based on a stacked convolutional and bidirectional long short-term memory10.1109/ACCESS.2021.3092631 ↗
12. Camps, J., McCarthy, A., Rodrıguez, B., and Mincholé, A. (2018, January 13–14). ConvNet Based QRS Multilead Delineator in Electrocardiogram Signals. Proceedings of the First Joint Workshop on AI in Health Organized as Part of the Federated AI Meeting (FAIM 2018), Co-Located with AAMAS 2018, ICML 2018, IJCAI 2018 and ICCBR 2018, Stockholm, Sweden. Available online: https://ceur-ws.org/Vol-2142/short1.pdf.
13. Jimenez-Perez, G., Alcaine, A., and Camara, O. (2019). U-Net architecture for the automatic detection and delineation of the electrocardiogram. Proceedings of the 2019 Computing in Cardiology (CinC), IEEE.10.22489/CinC.2019.284 ↗
14. Isensee, F., Petersen, J., Klein, A., Zimmerer, D., Jaeger, P.F., Kohl, S., Wasserthal, J., Koehler, G., Norajitra, T., and Wirkert, S. (2018). nnu-net: Self-adapting framework for u-net-based medical image segmentation. arXiv.10.1007/978-3-658-25326-4_7 ↗
15. ECG_SegNet: An ECG delineation model based on the encoder-decoder structure10.1016/j.compbiomed.2022.105445 ↗
16. Dynamic programming algorithm optimization for spoken word recognition10.1109/TASSP.1978.1163055 ↗
17. Querying and mining of time series data: Experimental comparison of representations and distance measures10.14778/1454159.1454226 ↗
18. On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling10.1080/14786440009463897 ↗
19. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals10.1161/01.CIR.101.23.e215 ↗
20. Laguna, P., Mark, R.G., Goldberg, A., and Moody, G.B. (1997). A database for evaluation of algorithms for measurement of QT and other waveform intervals in the ECG. Proceedings of the Computers in Cardiology 1997, IEEE.10.1109/CIC.1997.648140 ↗
21. LUDB: A new open-access validation tool for electrocardiogram delineation algorithms10.1109/ACCESS.2020.3029211 ↗
22. Advanced QT interval analysis in long-term electrocardiography using shape-based clustering and template matching: A novel approach for Holter monitoring10.1016/j.heliyon.2025.e42662 ↗
23. Vullings, H., Verhaegen, M.H., and Verbruggen, H. (1998). Automated ECG segmentation with dynamic time warping. Proceedings of the 20th Annual International Conference of the IEEE Engineering in Medicine and Biology Society. Vol. 20 Biomedical Engineering Towards the Year 2000 and Beyond (Cat. No. 98CH36286), IEEE.10.1109/IEMBS.1998.745863 ↗
24. shapeDTW: Shape dynamic time warping10.1016/j.patcog.2017.09.020 ↗
25. Keogh, E.J., and Pazzani, M.J. (2000, January 20–23). Scaling up dynamic time warping for datamining applications. Proceedings of the Sixth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Boston, MA, USA.10.1145/347090.347153 ↗
26. Which QT correction formulae to use for QT monitoring?10.1161/JAHA.116.003264 ↗
27. Statistical methods for assessing agreement between two methods of clinical measurement10.1016/S0140-6736(86)90837-8 ↗
28. Association for the Advancement of Medical Instrumentation (1999). ANSI/AAMI EC57:1998/(R)2008: Testing and Reporting Performance Results of Cardiac Rhythm and ST Segment Measurement Algorithms, Association for the Advancement of Medical Instrumentation. Technical Report; Revision of AAMI ECAR:1987.
29. Finding morphology points of electrocardiographic-signal waves using wavelet analysis10.1007/s11141-019-09929-2 ↗
30. Artificial intelligence-enhanced electrocardiography in cardiovascular disease management10.1038/s41569-020-00503-2 ↗
31. Electrocardiographic QT interval and mortality: A meta-analysis10.1097/EDE.0b013e318225768b ↗
32. Long-term outcomes in individuals with prolonged PR interval or first-degree atrioventricular block10.1001/jama.2009.888 ↗
33. P-wave duration and the risk of atrial fibrillation: Results from the Copenhagen ECG Study10.1016/j.hrthm.2015.04.026 ↗
34. Electrocardiographic T-wave morphology and risk of mortality10.1016/j.ijcard.2020.12.016 ↗
35. A review of signal processing techniques for electrocardiogram signal quality assessment10.1109/RBME.2018.2810957 ↗