Abstract
Cardiovascular diseases are among the leading causes of death, and their early detection and treatment is important for lowering their prevalence and mortality rate. Electrocardiograms (ECGs) record electrical activity of the heart to provide information used to diagnose and treat various cardiovascular diseases. Many approaches to computer-aided ECG analysis have been performed, including Fourier analysis, principal component analysis, analyzing morphological changes, and machine learning. Due to the high accuracy required of ECG-analysis software, there is no universally-agreed upon algorithm to identify P,Q,R,S, and T-waves and measure intervals of interest. Topological data analysis uses tools from algebraic topology to quantify hole-like shapes within data, and methods using persistence statistics and fractal dimension with machine learning have been applied to ECG signals in the context of detecting arrhythmias within recent years. To our knowledge, there does not exist a method of identifying P,Q,S, and T-waves and measuring intervals of interest which relies on topological features of the data, and we propose a novel topological method for performing these aspects of ECG analysis. Specifically, we establish criteria to identify cardinality-minimal and area-minimal 1-cycles with certain properties as P,Q,S, and T-waves. This yields a procedure for measuring the PR-interval, QT-interval, ST-segment, QRS-duration, P-wave duration, and T-wave duration in Lead II ECG data. We apply our procedure to 400 sets of simulated Lead II ECG signals and compare with the interval values set by the model. Additionally, the algorithm is used to identify cardinality-minimal and area-minimal 1-cycles as P,Q,S, and T-waves in two sets of 200 randomly sampled Lead II ECG signals of real patients with 11 common rhythms. Analysis of optimal 1-cycles identified as P,Q,S, and T-waves and comparison of interval measurements shows that 1-cycle reconstructions can provide useful information about the ECG signal and could hold utility in characterizing arrhythmias.
Author summary Topological data analysis (TDA) has been a rapidly growing field within the past 15 years and has found applications across many fields. In the context of TDA, several algorithms primarily using persistence barcode statistics and machine learning have been applied to electrocardiogram (ECG) signals in recent years. We use a topological data-analytic method to identify subsets of an ECG signal which are representative of certain topological features in the ECG signal, and we propose that those subsets coincide with the P,Q,S, and T-waves in the ECG signal. We then use information about these subsets of the signal identified as P,Q,S, and T-waves to measure the PR-interval, QT-interval, ST-segment, QRS-duration, P-wave duration, and T-wave duration. We demonstrate our method on both simulated and real Lead II ECG data. These results show how identifying subsets of an ECG signal with certain topological properties could be used in analyzing the morphology of the signal over time and in arrhythmia-detection algorithms.
Competing Interest Statement
The authors have declared no competing interest.
Footnotes
I am submitting a revision because I found a comment that I had meant to remove in the previous version I had submitted.
https://www.mathworks.com/matlabcentral/fileexchange/10858-ecg-simulation-using-matlab/