ECG Signal Analysis and Abnormality Detection Application
Abstract
1. Introduction
2. Preliminaries
2.1. ECG Signal: Biological and Medical Significance
2.2. ECG Waveform
2.3. Segments and Intervals
2.4. QRS Complex—RR Interval—Heartbeat—Heart Rate
2.5. Normal Ranges of Selected ECG Signal Parameters
3. DATASET—The Lobachevsky University Electrocardiography Database
4. Algorithm for ECG Signal Analysis
4.1. Detection of QRS Complex, Heart Rate, PQ and QT Intervals
4.1.1. Data Filtering
- Low-pass filter—high-frequency noise (e.g., power-line interference and muscle noise) above 11 Hz is removed.
- High-pass filter—components below 5 Hz are eliminated to remove baseline drift, baseline wander.
- Derivative filter—a five-point derivative filter is used to enhance steep slopes in the signal, thus improving the detection of the R wave transition, and suppressing low-frequency components from P and T waves.
- Squaring—the signal is squared to eliminate negative values and amplify significant peaks (of the QRS complex).
- Moving Window Integration—a 31-sample moving average filter smooths the signal and emphasises its essential characteristics by averaging out short-term fluctuations, capturing the slope and width of the QRS complex.
- Thresholding—adaptive thresholding, involving a dual thresholding mechanism, detects segments containing QRS complexes.
4.1.2. QRS Complex Detection
- Q, R, S Point Detection—maxima and minima within i detected segments are identified as , and points positions for , where n is the total number of QRS complexes within the record, and subsequently the values of , and are evaluated, considering the sampling frequency Hz.
- QRS complex duration evaluation—the length of the QRS complex is calculated as , followed by averaging over the whole record.
4.1.3. Heart Rate, PQ and QT Intervals Evaluation
- Heart rate—the RR time intervals across the entire record are calculated as for , followed by computing a vector that indicates how many times each interval fits into 60 s, i.e., . These values are then averaged over the entire record to determine the number of beats per minute (bpm), which represents the heart rate.
- P wave detection—the Time windowing and slope analysis is used to identify the P wave peak and, subsequently, the start and end of the P wave using positive and negative slopes of the filtered signal.
- T wave detection—the Maximum slope intercept method is used to determine the end of the T wave by identifying the point where the isoelectric line intersects with a tangent line drawn along the steepest downward slope of the T wave, which may also be notched or fused with a U wave.
- PQ and QT intervals evaluation—the lengths of the PQ and QT intervals are evaluated as the averages of the distances and , respectively.
4.2. Multi-Class Multi-Label ECG Classification Using Support Vector Machines
4.2.1. Data Input and Label Reduction
- Data input—the SVMC data input consists of two files containing data from the LUDB database: one file includes raw ECG signals, and the other carries the information on the diagnoses corresponding to the ECG records:
- –
- ECG “Features” are extracted by preprocessing 200 records of raw ECG signals.
- –
- Labels that represent diagnoses grouped into 8 diagnostic categories (classes) are extracted and stored in a multi-label format for each record. One record can have none, one, or multiple diagnoses assigned in none, one or numerous diagnostic categories; thus, one record is linked to eight label vectors. Records without class assignments, and thus without any labels, are removed to guarantee consistent learning.
- Label reduction—a multi-label to single-label reduction is implemented due to the limited number of records in LUDB that are linked to a particular combination of labels (diagnoses) within specific classes (diagnostic categories), which could negatively affect the effectiveness and accuracy of SVMC training. Therefore, for each record, label vectors with multiple labels are reduced to only one of them, specifically the most dominant label across the dataset. The reduction strategy in this case involves clinically relevant mappings.
4.2.2. Architecture Design of the SVM Model
- Design Scheme
- –
- The dataset is split into 70% training, 20% testing, and a 10% hold-out validation subsets.
- –
- Error-Correcting Output Codes (ECOC) framework is used to decompose the multi-class problem into multiple binary classification subproblems. The classifier itself is based on an SVM that uses a radial basis function kernel embedded in an ECOC decomposition. In the “one-vs-one” coding scheme, binary classifiers are constructed, trained for each pair combination. Regularisation is applied to improve generalisation and capture nonlinear relationships. The decoding process aggregates the binary outcomes and assigns the final label based on the Hamming distance.
- –
- The hyperparameter optimisation of the SVMC is conducted through Bayesian optimisation, which relies on an acquisition function (“expected—improvement—plus”) to explore the parameter space efficiently.
- –
- K-fold cross-validation is used on the training subset at each evaluation of the objective function to ensure robustness and reduce overfitting. Due to the small dataset, the “leave-one-out” cross-validation scheme was employed.
4.2.3. Model Training and Evaluation
- Model training
- –
- Combine outputs—during prediction, all SVM classifiers’ outputs are aggregated into a single vector, which is then compared against the predefined ECOC schema. The closest match determines the predicted label for each class of the ECG signal.
- –
- Cross validation (CV)—during each CV round, the dataset is divided into folds for training and one fold for validation. The misclassification loss is averaged across all folds to determine the objective function for hyperparameter selection. This procedure ensures that the optimisation process does not overfit to a single train/validation split, but instead identifies parameters that generalise across multiple dataset partitions.
- –
- Final training—after the optimisation process, the model is retrained on the entire dataset using the best-found hyperparameters. Prediction accuracy is evaluated, and a confusion matrix is analysed for a class-specific performance and misclassification trends.
- Evaluate the trained model (Accuracy, Confusion Matrix, CV)—the trained model is evaluated using a holdout validation strategy. The classifier’s performance is assessed using standard evaluation metrics, such as accuracy, which is calculated as the ratio of correctly classified samples, while a confusion matrix is analysed to identify class-specific performance and misclassification patterns.
4.2.4. Identification of Diagnoses
- Class labels prediction—the final outcome of the pipeline is the assignment of predicted class labels to unseen ECG records. These labels correspond to clinically meaningful diagnostic categories.
5. Selection of LUDB Diagnoses
- 1.
- Heart rhythmsThis category describes the temporal organisation of cardiac electrical activity, with rhythm abnormalities classified as either benign or pathological. The diagnoses included are:
- Sinus rhythm—normal rhythm originating from the sinoatrial (SA) node.
- Sinus tachycardia—elevated heart rate (>100 bpm) with preserved sinus origin.
- Sinus bradycardia—reduced heart rate (<60 bpm), which may be normal (e.g., in athletes) or pathological.
- Sinus arrhythmia—mildly irregular rhythm with sinus origin, typically benign.
- Irregular sinus rhythm—more pronounced irregularity; may require further evaluation.
- Abnormal rhythm—unspecified rhythm deviating from expected sinus morphology.
- 2.
- Electrical axis of the heartThe electrical axis represents the average direction of ventricular depolarisation in the frontal plane. Axis deviations may indicate structural or conduction-related abnormalities and can be classified into the following diagnoses:
- Normal axis—QRS axis between −30° and +90°.
- Left axis deviation—axis leftward of −30°, often due to left anterior hemiblock or left ventricular hypertrophy.
- Right axis deviation—axis rightward of +90°, which may reflect right ventricular hypertrophy or pulmonary disease.
- Vertical axis—axis close to +90°, often normal in tall, slender individuals.
- Horizontal axis—axis closer to 0°, frequently seen in short or obese individuals.
- Undetermined axis—cases where the QRS axis could not be determined due to atypical morphology.
- 3.
- Conduction abnormalitiesThis category captures pathologies associated with delayed or blocked electrical signal propagation, such as:
- Sinoatrial block—interruption of impulse from the SA node.
- First-degree AV block—prolonged PR interval indicating slowed AV node conduction.
- Third-degree AV block—complete atrioventricular dissociation.
- Left bundle branch block (LBBB)—conduction delay in the left bundle, resulting in prolonged QRS with characteristic morphology.
- Right bundle branch block (RBBB)—similar delay, affecting the right bundle.
- Hemiblocks—partial block of a fascicle within the left bundle branch (e.g., anterior or posterior).
- Intraventricular conduction delay—non-specific delay in QRS conduction not fitting bundle branch patterns.
- 4.
- ExtrasystolesExtrasystoles are premature depolarisations that originate from ectopic foci (abnormal regions within the heart capable of generating electrical impulses) in the atria or ventricles, including:
- Atrial extrasystole—premature atrial contraction, which may appear as single beats, bigeminy, or low atrial origin.
- Ventricular extrasystole (PVC)—premature ventricular contraction, including:
- –
- single PVCs,
- –
- couplet PVCs,
- –
- bigeminy or trigeminy,
- –
- polymorphic PVCs,
- –
- localisation from the RVOT (right ventricular outflow tract), IVS (interventricular septum), etc.
- 5.
- Hypertrophies and OverloadsDiagnoses indicating structural or electrical evidence of increased chamber mass or pressure are represented by:
- Left/right atrial hypertrophy—enlargement of atria due to volume overload or valvular disease.
- Left/right ventricular hypertrophy—often secondary to hypertension or pulmonary disorders.
- Overload—increased pressure or volume loading conditions, leading to ECG changes without true hypertrophy.
- 6.
- Cardiac pacingRhythms associated with pacemakers can be categorised as:
- Unipolar or bipolar pacing—types of pacemaker electrode configurations.
- Atrial/ventricular pacing—specific chamber being paced.
- Biventricular pacing—coordinated stimulation of both ventricles, commonly used in cardiac resynchronisation therapy.
- P-synchrony—atrial tracking or synchrony with native P wave activity.
- 7.
- Ischemia and InfarctionDiagnoses in this category indicate acute or chronic myocardial ischaemia or infarction patterns:
- STEMI—ST elevation myocardial infarction with regional elevation (e.g., anterior, inferior, posterior).
- NSTEMI or undefined ischemia—myocardial infarction without ST elevation or with non-specific ischemic signs.
- Ischemia—transient ST segment depression or T wave inversion.
- Scar formation—electrocardiographic evidence of prior myocardial infarction (e.g., Q waves).
- 8.
- Repolarization abnormalitiesAbnormalities in ventricular repolarisation are often observed in systemic illness, effects of drugs, or as non-specific findings, including:
- Repolarisation abnormalities—general T wave or ST segment changes not directly attributable to ischemia or infarction.
- Localisation—may be noted in anterior, lateral, inferior, or combined leads.
6. ECG Signal Analysis and Abnormality Detection Application
7. Experimental Results and Discussion
7.1. Experiments Using LUDB Records
- Female of age 18 years
- Ground truth:Rythm: sinus rhythm,Electric axis of the heart: vertical,Standard ECG analysis:QRS xomplex: 79 ms in the normal range (74–112 ms),PQ interval: 172 ms in the normal range (112–190 ms),QT interval: 380 ms in the normal range (337–455 ms),Heart rate: 76 bpm in the normal range (47–105 bpm),Conclusion: all selected parameters are adequate to a 18-year-old female.SVM classification:Rythm: sinus rhythm,Electric axis of the heart: vertical,Conclusion: a diagnosis has been identified regarding the electric axis of the heart being vertical.Overall conclusion:Standard ECG signal analysis indicates that all the monitored ECG parameters are within normal ranges. Nevertheless, the SVM classification diagnostics identified the vertical electric axis of the heart, requiring further examination in light of other potential patients’ conditions (Figure 5).

- Female of age 17 years
- Ground truth:Rythm: sinus bradycardia,Electric axis of the heart: horizontal,Non-specific repolarisation abnormalities: anterior wall, septal.Standard ECG analysis:QRS complex: 52 ms outside the normal range (74—112 ms),PQ interval: 166 ms in the normal range (112—190 ms),QT interval: 404 ms in the normal range (337—455 ms),Heart rate: 53 bpm in the normal range (47—105 bpm),Conclusion: QRS complex duration is inadequate to a 17–year–old female.SVM classification:Rythm: sinus bradycardia,Electric axis of the heart: horizontal,Non-specific repolarisation abnormalities: anterior wall,Conclusion: several diagnoses have been identified in regard to the heart rhythm (sinus bradycardia), electric axis of the heart (horizontal), and non-specific repolarisation abnormalities (anterior wall).Overall conclusion:Standard ECG signal analysis indicates an abnormal QRS complex duration, falling outside the normal range. Additionally, the SVM classification diagnostics identified sinus bradycardia, a horizontal electric axis of the heart, and non-specific repolarisation abnormalities in the anterior wall, requiring further examination and appropriate treatment of the patient (Figure 6).

- Male of age 28 years
- Ground truth:Rythm: sinus rhythm,Electric axis of the heart: vertical,Standard ECG analysis:QRS xomplex: 103 ms in the normal range (80–126 ms ),PQ interval: 156 ms in the normal range (118–196 ms),QT interval: 401 ms in the normal range (342–456 ms),Heart rate: 78 bpm in the normal range (45–95 bpm),Conclusion: all selected parameters are adequate to a 28-year-old male.SVM classification:Rythm: sinus rhythm,Electric axis of the heart: vertical,Conclusion: a diagnosis has been identified regarding the electric axis of the heart being vertical.Overall conclusion:Standard ECG signal analysis indicates that all selected ECG parameters are within normal ranges. Nevertheless, the SVM classification diagnostics identified the vertical electric axis of the heart, requiring further examination in light of other potential patients’ conditions (Figure 7).

- Male of age 41 years
- Ground truth:Rythm: sinus rhythm,Electric axis of the heart: left axis deviation,Hypertrophies: left atrial hypertrophy,left ventricular hypertrophy,Ischemia: undefined ischemia/scar/supp.nstemi: apical,undefined ischemia/scar/supp.nstemi: lateral wall,posterior wall.Standard ECG analysis:QRS complex: 118 ms in the normal range (78–122 ms),PQ interval: 228 ms outside the normal range (115–200 ms),QT interval: 473 ms outside the normal range (342–458 ms),Heart rate: 65 bpm in the normal range (47–95 bpm),Conclusion: PQ interval and QT interval durations are inadequate to a 41-year-old male.SVM classification:Rythm: sinus rhythm,Electric axis of the heart: left axis deviation,Hypertrophies: left atrial hypertrophy,Ischemia: undefined ischemia/scar/supp.nstemi: apical,Conclusion: several diagnoses have been identified in regard to the electric axis of the heart (left axis deviation), hypertrophies (left atrial hypertrophy), and ischemia (undefined ischemia/scar/supp.nstemi: apical).Overall conclusion:Standard ECG signal analysis indicates abnormal PQ interval and QT interval durations, both falling outside the normal ranges. Additionally, the SVM classification diagnostics identified left axis deviation of the heart, left atrial hypertrophy, and apical ischemia, requiring further examination and appropriate treatment of the patient (Figure 8).

7.2. Experiments Using PTB-XL Dataset and MIT-BIH Arrhythmia Database
- Female of age 43 years
- Ground truth:Rythm: sinus bradycardia,Standard ECG analysis:QRS complex: 100 ms in the normal range (76–114 ms),PQ interval: 169 ms outside the normal range (112–200 ms),QT interval: 395 ms outside the normal range (350–458 ms),Heart rate: 63 bpm in the normal range (47–90 bpm),Conclusion: all selected parameters are adequate to a 43-year-old female.SVM classification:Rythm: sinus bradycardia,Conclusion: a diagnosis has been identified regarding the heart rhythm being sinus bradycardia.Overall conclusion:Standard ECG signal analysis indicates that all the monitored ECG parameters are within normal ranges. However, the SVM classification model identifies a diagnosis (sinus bradycardia) as tagged in the PTB-XL database, requiring further examination in light of other potential patients’ conditions (Figure 9).

- Male of age 59 years
- Ground truth:Rythm: ventricular tachycardia,Standard ECG analysis:QRS complex: 107 ms in the normal range (76–114 ms),PQ interval: 143 ms in the normal range (120–206 ms),QT interval: 433 ms in the normal range (349–458 ms),Heart rate: 74 bpm in the normal range (52–94 bpm),Conclusion: all selected parameters are adequate to a 59-year-old male.SVM classification:Rythm: sinus tachycardia,Conclusion: a diagnosis, sinus tachycardia, has been identified in regard to the heart rhythm; however, the actual diagnosis is ventricular tachycardia. This discrepancy arises because the accurate diagnosis was not included in the training dataset, yet the classification model still managed to successfully detect the condition tachycardia.Overall conclusion:Standard ECG signal analysis indicates that all the monitored ECG parameters are within normal ranges. However, the SVM classification model identifies a diagnosis (sinus tachycardia), requiring further examination in light of other potential patients’ conditions (Figure 10).

7.3. Discussion on Results
7.4. Computational Performance and Real-Time Feasibility
7.5. Limitations and Potential Biases
8. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Appendix A
| Diagnostic Category (Class) | Diagnosis (Label) | Number of Subjects |
|---|---|---|
| Rhythm | Sinus rhythm | 143 |
| Sinus tachycardia | 4 | |
| Sinus bradycardia | 25 | |
| Sinus arrhythmia | 8 | |
| Irregular sinus rhythm | 2 | |
| Atrial fibrillation | 18 | |
| Atrial flutter, typical | 3 | |
| Electric axis of the heart | Normal | 75 |
| Left axis deviation | 66 | |
| Vertical | 26 | |
| Horizontal | 20 | |
| Right axis deviation | 3 | |
| None (pacemaker) | 10 | |
| Conduction abnormalities | Sinoatrial blockade, undetermined | 1 |
| I degree AV block | 10 | |
| III degree AV-block | 5 | |
| Incomplete right bundle branch block | 29 | |
| Incomplete left bundle branch block | 6 | |
| Left anterior hemiblock | 16 | |
| Complete right bundle branch block | 4 | |
| Complete left bundle branch block | 4 | |
| Extrasystole | Non-specific intraventricular conduction delay | 4 |
| Atrial extrasystole: undetermined | 2 | |
| Atrial extrasystole: low atrial | 1 | |
| Atrial extrasystole: left atrial | 2 | |
| Atrial extrasystole: SA-nodal extrasystole | 3 | |
| Atrial extrasystole, type: single PAC | 4 | |
| Atrial extrasystole, type: bigemini | 1 | |
| Atrial extrasystole, type: quadrigemini | 1 | |
| Atrial extrasystole, type: allorhythmic pattern | 1 | |
| Ventricular extrasystole, morphology: polymorphic | 2 | |
| Ventricular extrasystole, localisation: RVOT, anterior wall | 3 | |
| Ventricular extrasystole, localisation: RVOT, antero-septal part | 1 | |
| Ventricular extrasystole, localisation: IVS, middle part | 1 | |
| Ventricular extrasystole, localisation: LVOT, LVS | 2 | |
| Ventricular extrasystole, localisation: LV, undefined | 1 | |
| Ventricular extrasystole, type: single PVC | 6 | |
| Ventricular extrasystole, type: intercalary PVC | 2 | |
| Ventricular extrasystole, type: couplet | 2 | |
| Hypertrophies | Right atrial hypertrophy | 1 |
| Left atrial hypertrophy | 102 | |
| Right atrial overload | 17 | |
| Left atrial overload | 11 | |
| Left ventricular hypertrophy | 108 | |
| Right ventricular hypertrophy | 3 | |
| Left ventricular overload | 11 | |
| Cardiac pacing | UNIpolar atrial pacing | 1 |
| UNIpolar ventricular pacing | 6 | |
| BIpolar ventricular pacing | 2 | |
| Biventricular pacing | 1 | |
| P-synchrony | 2 | |
| Ischemia | STEMI: anterior wall | 8 |
| STEMI: lateral wall | 7 | |
| STEMI: septal | 8 | |
| STEMI: inferior wall | 1 | |
| STEMI: apical | 5 | |
| Ischemia: anterior wall | 5 | |
| Ischemia: lateral wall | 8 | |
| Ischemia: septal | 4 | |
| Ischemia: inferior wall | 10 | |
| Ischemia: posterior wall | 2 | |
| Ischemia: apical | 6 | |
| Scar formation: lateral wall | 3 | |
| Scar formation: septal | 9 | |
| Scar formation: inferior wall | 3 | |
| Scar formation: posterior wall | 6 | |
| Scar formation: apical | 5 | |
| Undefined ischemia/scar/supp.NSTEMI: anterior wall | 12 | |
| Undefined ischemia/scar/supp.NSTEMI: lateral wall | 16 | |
| Undefined ischemia/scar/supp.NSTEMI: septal | 5 | |
| Undefined ischemia/scar/supp.NSTEMI: inferior wall | 3 | |
| Undefined ischemia/scar/supp.NSTEMI: posterior wall | 4 | |
| Undefined ischemia/scar/supp.NSTEMI: apical | 11 | |
| Non-specific repolarisation abnormalities | Anterior wall | 18 |
| Lateral wall | 13 | |
| Septal | 15 | |
| Inferior wall | 19 | |
| Posterior wall | 9 | |
| Arpical | 11 | |
| Other states | Early repolarization syndrome | 9 |
| Name | Author (with Citation) |
|---|---|
| Open_ECG | Said BOURZEG [42] |
| An Online Algorithm for R, S and T Wave Detection | Hooman Sedghamiz [43] |
| Complete Pan Tompkins Implementation ECG QRS Detector | Hooman Sedghamiz [44] |
| ECG P QRS T Wave Detecting Matlab Code | Nima Aalizade [45] |
| Visualization and Analysis of an Electrocardiogram Signal | Reyes-Aldasoro, C.C. [46] |
| BioSigKit a Toolkit for Bio-Signal Analysis | Hooman Sedghamiz [47] |
| ecg-kit | Marianux [48] |
| ECG Simulation Using MATLAB | Karthik Raviprakash [49] |
| ECG Waveform Simulator | Neil Forcier [50] |
| ECG Signal Simulation and Analysis | Ardavan Rahimian [51] |
| ECG Class for Heart Rate Variability Analysis | David OK [52] |
| ECG Compression | Mehdi Nasri [53] |
| ECG Signal compression | Ashish Meshram [54] |
| BEADS Baseline Estimation And Denoising with Sparsity | Laurent Duval [55] |
| ECG Beat Calculation | Arun Aniyan [56] |
| Calculating Beat Rate of Heart by DWT | Ehsan Mirrahimi [57] |
| ECG_Analyzer | Alessandro Mazza [58] |
| ECG QRS Detection (Heart Beat In One Minute) | D.K. Ravish [59] |
| Simulink Model for Fetal ECG Extraction (HDL Compatible Algorithm) | Igal [60] |
| Calculate Heart Rate from Electrocardiogram Data | Heather Gorr [61] |
| R-peak Detection using DWT and Classification of Arrhythmia using Bayesian Classifier | Selva [62] |
| ECG QRS Detection | Harini [63] |
| ECG Preprocessing, Segmentation and Obtaining the Mean P-QRS-T Fragment | Mahmoud Bassiouni [64] |
| ECG Signal PQRST Peak Detection Toolbox | Rohan Sanghavi [65] |
| ECG Signal Analysis Using Heart Waves | Mohamed Irfan [66] |
| Biosignal-Specific Processing (Bio-SP) Tool | Sarah Ostadabbas [67] |
References
- Goldberger, A.L. Goldberger’s Clinical Electrocardiography, 10th ed.; Elsevier: Philadelphia, PA, USA, 2024. [Google Scholar]
- Wimmer, N.J.; Scirica, B.M.; Stone, P.H. The Clinical Significance of Continuous ECG (Ambulatory ECG or Holter) Monitoring of the ST-Segment to Evaluate Ischemia: A Review. Prog. Cardiovasc. Dis. 2013, 56, 195–202. [Google Scholar] [CrossRef]
- Xiao, R. The role of telemetry monitoring: From diagnosing arrhythmia to predictive models of patient instability. J. Electrocardiol. 2025, 89, 153861. [Google Scholar] [CrossRef] [PubMed]
- Pan, J.; Tompkins, W.J. A Real-Time QRS Detection Algorithm. IEEE Trans. Biomed. Eng. 1985, BME-32, 230–236. [Google Scholar] [CrossRef] [PubMed]
- Rao, K.D. Discrete Cosine and Sine Transforms: General Properties, Fast Algorithms and Integer Approximations; Birkhäuser, Part of Springer Nature: Cham, Switzerland, 2018; ISBN 978-3-319-68675-2. [Google Scholar]
- Xu, H.; An, B.; He, X. Filter design for ECG signal processing. Int. J. Front. Eng. Technol. 2022, 4, 42–51. [Google Scholar] [CrossRef]
- Anbalagan, T.; Nath, M.K.; Vijayalakshmi, D.; Anbalagan, A. Analysis of various techniques for ECG signal in healthcare, past, present, and future. Biomed. Eng. Adv. 2023, 6, 100089. [Google Scholar] [CrossRef]
- Ardeti, V.A.; Kolluru, V.R.; Varghese, G.T.; Patjoshi, R.K. An overview on state-of-the-art electrocardiogram signal processing methods: Traditional to AI-based approaches. Expert Syst. Appl. 2023, 217, 119561. [Google Scholar] [CrossRef]
- Liu, X.; Wang, H.; Li, Z.; Qin, L. Deep learning in ECG diagnosis: A review. Knowl.-Based Syst. 2021, 227, 107187. [Google Scholar] [CrossRef]
- Rajpurkar, P.; Hannun, A.Y.; Haghpanahi, M.; Bourn, C.; Ng, A.Y. Cardiologist-level arrhythmia detection with convolutional neural networks. arXiv 2017, arXiv:1707.01836. [Google Scholar] [CrossRef]
- Wang, J.; Li, W. Atrial Fibrillation Detection and ECG Classification based on CNN-BiLSTM. arXiv 2020, arXiv:2011.06187. [Google Scholar] [CrossRef]
- Zhao, Q.; Zhang, L. ECG feature extraction and classification using wavelet transform and support vector machines. In Proceedings of the 2005 International Conference on Neural Networks and Brain, (ICNN&B 2005), Beijing, China, 13–15 October 2005; Volumes 1–3, pp. 1089–1092. [Google Scholar]
- Ubeyli, E.D. ECG beats classification using multiclass support vector machines with error correcting output codes. Digit. Signal Process. 2007, 17, 675–684. [Google Scholar] [CrossRef]
- Polat, K.; Gunes, S. Detection of ECG Arrhythmia using a differential expert system approach based on principal component analysis and least square support vector machine. Appl. Math. Comput. 2007, 186, 898–906. [Google Scholar] [CrossRef]
- Moavenian, M.; Khorrami, H. A qualitative comparison of Artificial Neural Networks and Support Vector Machines in ECG arrhythmias classification. Expert Syst. Appl. 2010, 37, 3088–3093. [Google Scholar] [CrossRef]
- Dohare, A.K.; Kumar, V.; Kumar, R. Detection of myocardial infarction in 12 lead ECG using support vector machine. Appl. Soft Comput. 2018, 64, 138–147. [Google Scholar] [CrossRef]
- Moody, G.B.; Mark, R.G. The impact of the MIT-BIH Arrhythmia Database. IEEE Eng. Med. Biol. Mag. 2001, 20, 45–50. [Google Scholar] [CrossRef]
- Taddei, A.; Distante, G.; Emdin, M.; Pisani, P.; Moody, G.B.; Zeelenberg, C.; Marchesi, C. The European ST-T Database: Standard for evaluating systems for the analysis of ST-T changes in ambulatory electrocardiography. Eur. Heart J. 1992, 13, 1164–1172. [Google Scholar] [CrossRef]
- Laguna, P.; Mark, R.G.; Goldberg, A.; Moody, G.B. A Database for Evaluation of Algorithms for Measurement of QT and Other Waveform Intervals in the ECG. Comput. Cardiol. 1997, 24, 673–676. [Google Scholar] [CrossRef]
- Wagner, P.; Strodthoff, N.; Bousseljot, R.D.; Kreiseler, D.; Lunze, F.I.; Samek, W.; Schaeffter, T. PTB-XL, a large publicly available electrocardiography dataset. Sci. Data 2020, 7, 154. [Google Scholar] [CrossRef]
- Kalyakulina, A.I.; Yusipov, I.I.; Moskalenko, V.A.; Nikolskiy, A.V.; Kosonogov, K.A.; Osipov, G.V.; Ivanchenko, M.V. LUDB: A New Open-Access Validation Tool for Electrocardiogram Delineation Algorithms. IEEE Access 2020, 8, 186181–186190. [Google Scholar] [CrossRef]
- Rijnbeek, P.R.; Van Herpen, G.; Bots, M.L.; Man, S.; Verweij, N.; Hofman, A.; Kors, J.A. Normal values of the electrocardiogram for ages 16–90 years. J. Electrocardiol. 2014, 47, 914–921. [Google Scholar] [CrossRef]
- Fye, W. A History of the origin, evolution, and impact of electrocardiography. Am. J. Cardiol. 1994, 73, 937–949. [Google Scholar] [CrossRef]
- Lau, J.K.; Lowres, N.; Neubeck, L.; Brieger, D.B.; Sy, R.W.; Galloway, C.D.; Freedman, S.B. iPhone ECG application for community screening to detect silent atrial fibrillation: A novel technology to prevent stroke. Int. J. Cardiol. 2013, 165, 193–194. [Google Scholar] [CrossRef]
- Hampton, J.; Hampton, J. The ECG Made Easy, 9th ed.; Elsevier: Philadelphia, PA, USA, 2019. [Google Scholar]
- Roberts-Thomson, K.; Lau, D.; Sanders, P. The diagnosis and management of ventricular arrhythmias. Nat. Rev. Cardiol. 2011, 8, 311–321. [Google Scholar] [CrossRef]
- Kalyakulina, A.; Yusipov, I.; Moskalenko, V.; Nikolskiy, A.; Kosonogov, K.; Zolotykh, N.; Ivanchenko, M. Lobachevsky University Electrocardiography Database (version 1.0.1). PhysioNet 2021. [Google Scholar] [CrossRef]
- Goldberger, A.L.; Amaral, L.A.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 2000, 23, 215–220. [Google Scholar] [CrossRef]
- Wagner, P.; Strodthoff, N.; Bousseljot, R.; Samek, W.; Schaeffter, T. PTB-XL, a large publicly available electrocardiography dataset (version 1.0.3). PhysioNet 2022. [Google Scholar] [CrossRef]
- Moody, G.B.; Mark, R.G. MIT-BIH Arrhythmia Database (version 1.0.0). PhysioNet 2005. Available online: https://physionet.org/content/mitdb/1.0.0/ (accessed on 13 August 2025).
- MathWorks. MATLAB Coder Documentation. Documentation for MATLAB Coder, Release R2025b. 2025. Available online: https://www.mathworks.com/help/coder/index.html (accessed on 16 October 2025).
- MathWorks. Real-Time ECG QRS Detection on ARM Cortex-M Processor. Available online: https://www.mathworks.com/help/ecoder/armcortexm/ref/real-time-ecg-qrs-detection-on-arm-cortex-m-processor.html (accessed on 16 October 2025).
- MathWorks. VivaQuant Accelerates Development and Validation of Embedded Device for Ambulatory ECG Sensing. Available online: https://www.mathworks.com/company/user_stories/vivaquant-accelerates-development-and-validation-of-embedded-device-for-ambulatory-ecg-sensing.html (accessed on 16 October 2025).
- MathWorks. IDNEO Develops Embedded Computer Vision and Machine Learning Algorithms for Interpreting Blood Type Results. Customer Story. Available online: https://www.mathworks.com/company/user_stories/idneo-develops-embedded-computer-vision-and-machine-learning-algorithms-for-interpreting-blood-type-results.html (accessed on 16 October 2025).
- Peimankar, A.; Puthusserypady, S. DENS-ECG: A deep learning approach for ECG signal delineation. Expert Syst. Appl. 2021, 165, 113911. [Google Scholar] [CrossRef]
- Ekenberg, L.F.; Høfsten, D.E.; Rasmussen, S.M.; Mølgaard, J.; Hasbak, P.; Sørensen, H.B.D.; Meyhoff, C.S.; Aasvang, E.K. Wireless Single-Lead versus Standard 12-Lead ECG, for ST-Segment Deviation during Adenosine Cardiac Stress Scintigraphy. Sensors 2023, 23, 2962. [Google Scholar] [CrossRef]
- Attia, Z.I.; Kapa, S.; Lopez-Jimenez, F.; McKie, P.M.; Ladewig, D.J.; Satam, G.; Pellikka, P.A.; Enriquez-Sarano, M.; Noseworthy, P.A.; Munger, T.M.; et al. Screening for cardiac contractile dysfunction using an artificial intelligence–enabled electrocardiogram. Nat. Med. 2019, 25, 70–74. [Google Scholar] [CrossRef] [PubMed]
- Thygesen, K.; Alpert, J.S.; Jaffe, A.S.; Chaitman, B.R.; Bax, J.J.; Morrow, D.A.; White, H.D. Fourth Universal Definition of Myocardial Infarction (2018). Circulation 2018, 138, e618–e651. [Google Scholar] [CrossRef]
- Lenis, G.; Pilia, N.; Bailón, R.; Sarro, E.; Laguna, P. Comparison of Baseline Wander Removal Techniques Considering the Preservation of ST Changes in the Ischemic ECG: A Simulation Study. Comput. Math. Methods Med. 2017, 2017, 9295029. [Google Scholar] [CrossRef]
- Rahman, S.; Karmakar, C.; Natgunanathan, I.; Yearwood, J.; Palaniswami, M. Robustness of electrocardiogram signal quality indices. J. R. Soc. Interface 2022, 19, 20220012. [Google Scholar] [CrossRef]
- Zhou, F.; Fang, D. Classification of multi-lead ECG based on multiple scales and hierarchical feature convolutional neural networks. Sci. Rep. 2025, 15, 16418. [Google Scholar] [CrossRef]
- Bourzeg, S. Open_ECG: ECG .dat File Reader. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/49822 (accessed on 13 August 2025).
- Sedghamiz, H. An Online Algorithm for R, S and TWave Detection. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/45404 (accessed on 13 August 2025).
- Sedghamiz, H. Complete Pan Tompkins Implementation ECG QRS Detector. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/45840 (accessed on 13 August 2025).
- Aalizade, N. ECG P QRS T Wave Detecting Matlab Code. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/66098 (accessed on 13 August 2025).
- Reyes-Aldasoro, C.C. Visualization and Analysis of an Electrocardiogram Signal. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/68246-visualization-and-analysis-of-an-electrocardiogram-signal (accessed on 13 August 2025).
- Sedghamiz, H. BioSigKit: A Matlab Toolbox and Interface for Analysis of BioSignals. J. Open Source Softw. 2018, 3, 671. [Google Scholar] [CrossRef]
- Marianux. Ecg-Kit. MATLAB Central File Exchange/GitHub. 2025. Available online: https://github.com/marianux/ecg-kit (accessed on 13 August 2025).
- Raviprakash, K. ECG Simulation Using MATLAB. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/10858-ecg-simulation-using-matlab (accessed on 13 August 2025).
- Forcier, N. ECGWaveform Simulator. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/33247-ecg-waveform-simulator (accessed on 13 August 2025).
- Rahimian, A. ECG Signal Simulation and Analysis. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/128844-ecg-signal-simulation-and-analysis (accessed on 13 August 2025).
- OK, D. ECG Class for Heart Rate Variability Analysis. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/84692-ecg-class-for-heart-rate-variability-analysis (accessed on 13 August 2025).
- Nasri, M. ECG Compression. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/3657-ecg-compression (accessed on 13 August 2025).
- Meshram, A. ECG Signal Compression. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/43451-ecg-signal-compression (accessed on 13 August 2025).
- Duval, L. BEADS Baseline Estimation and Denoising with Sparsity. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/49974-beads-baseline-estimation-and-denoising-with-sparsity (accessed on 13 August 2025).
- Aniyan, A. ECG Beat Calculation. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/24628-ecg-beat-calculation (accessed on 13 August 2025).
- Mirrahimi, E. Calculating Beat Rate of Heart by DWT. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/17115-calculating-beat-rate-of-heart-by-dwt (accessed on 13 August 2025).
- Mazza, A. ECG_Analyzer. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/155087-ecg_analyzer (accessed on 13 August 2025).
- Ravish, D.D. Ecg Qrs Detection (Heart Beat in One Minute). MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/31780-ecg-qrs-detection-heart-beat-in-one-minute (accessed on 13 August 2025).
- Igal. Simulink Model for Fetal ECG Extraction (HDL Compatible Algorithm). MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/35328-simulink-model-for-fetal-ecg-extraction-hdl-compatible-algorithm (accessed on 13 August 2025).
- Heather Gorr, P. Calculate Heart Rate from Electrocardiogram Data. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/73049-calculate-heart-rate-from-electrocardiogram-data (accessed on 13 August 2025).
- Selva. R-Peak Detection Using DWT and Classification of Arrhythmia Using Bayesian Classifier. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/32214-r-peak-detection-using-dwt-and-classification-of-arrhythmia-using-bayesian-classifier (accessed on 13 August 2025).
- Harini. ECG QRS Detection. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/57836 (accessed on 13 August 2025).
- Bassiouni, M. ECG Preprocessing, Segmentation and Obtaining the Mean P-QRS-T Fragment. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/66623 (accessed on 27 May 2025).
- Sanghavi, R. Ecg Signal Pqrst Peak Detection Toolbox. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/73850 (accessed on 12 August 2025).
- Irfan, M. Ecg Signal Analysis Using Heart Waves. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/166056 (accessed on 6 August 2025).
- Ostadabbas, S. Biosignal-Specific Processing (Bio-SP) Tool. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/64013 (accessed on 13 August 2025).




| Parameter | Sex | 16–19 | 20–29 | 30–39 | 40–49 | 50–59 | 60–69 | 70–79 | 80–89 |
|---|---|---|---|---|---|---|---|---|---|
| QRS (ms) | Male | 100 (82,126) | 100 (80,126) | 100 (78,124) | 100 (78,122) | 100 (80,124) | 100 (80,124) | 101 (80,131) | 98 (70,136) |
| Female | 92 (74,112) | 90 (76,110) | 92 (74,114) | 90 (76,114) | 92 (76,114) | 92 (76,115) | 92 (74,114) | 92 (72,118) | |
| PQ (ms) | Male | 148 (118,200) | 150 (118,196) | 152 (118,198) | 152 (115,200) | 160 (124,206) | 164 (126,220) | 164 (129,228) | 172 (122,290) |
| Female | 144 (112,190) | 144 (110,190) | 146 (114,196) | 148 (112,200) | 156 (120,206) | 158 (120,206) | 162 (121,210) | 170 (125,235) | |
| QT (ms) | Male | 378 (332,452) | 394 (342,454) | 396 (344,454) | 394 (342,458) | 396 (342,458) | 398 (346,454) | 398 (336,458) | 395 (334,476) |
| Female | 390 (337,455) | 394 (340,456) | 400 (346,460) | 396 (350,458) | 398 (349,458) | 396 (351,454) | 394 (342,454) | 394 (332,461) | |
| Heart rate (bpm) | Male | 73 (49,107) | 65 (45,94) | 65 (46,95) | 66 (47,95) | 67 (48,94) | 67 (48,95) | 67 (50,99) | 74 (40,97) |
| Female | 72 (47,105) | 67 (48,98) | 66 (47,95) | 67 (47,90) | 69 (52,94) | 71 (53,94) | 72 (55,98) | 72 (50,102) |
| ID | Sex | Age | Rhythms | Electric Axis of the Heart | Conduction Abnormalities | Extrasystolies | Hypertrophies | Ischemia | Non-Specific Repolarization Abnormalities |
|---|---|---|---|---|---|---|---|---|---|
| 7 | M | 50 | Sinus rhythm | Electric axis of the heart: horizontal | Atrial extrasystole, type: single pac Atrial extrasystole: sa-nodal extrasystole | Left atrial hypertrophy Right atrial overload Left ventricular hypertrophy | Stemi: lateral wall Stemi: anterior wall Stemi: septal Stemi: apical | ||
| 22 | M | 66 | Sinus arrhythmia | Electric axis of the heart: horizontal | Incomplete right bundle branch block | Atrial extrasystole: undefined | Left atrial hypertrophy | Non-specific repolarization abnormalities: lateral wall Non-specific repolarisation abnormalities: anterior wall | |
| 38 | F | 59 | Atrial fibrillation | Electric axis of the heart: left axis deviation | Ventricular extrasystole, localisation: rvot, anterior wall Ventricular extrasystole, type: intercalary pvc Ventricular extrasystole, type: single pvc | Left ventricular overload Left ventricular hypertrophy | Ischemia: apical Ischemia: lateral wall | ||
| 85 | F | 51 | Sinus rhythm | Electric axis of the heart: horizontal | Incomplete right bundle branch block | Left atrial hypertrophy | Non-specific repolarization abnormalities: anterior wall Non-specific repolarisation abnormalities: apical Non-specific repolarisation abnormalities: inferior wall Non-specific repolarisation abnormalities: septal |
| Method | Accuracy | Dataset Size | Computational Speed | Strengths | Weaknesses |
|---|---|---|---|---|---|
| Wavelet + kNN | 75–88% | Small | Fast | — low data requirements — interpretable results | — limited robustness — limited generalisation |
| SVM | 80–90% | Small/Medium | Fast | — effective on small datasets — interpretable kernel space | — limited scalability — poor temporal modelling |
| RNN/LSTM | 88–95% | Medium/Large | Slow | — models temporal dependencies effectively | — training instability — limited for long sequences |
| CNN | 90–97% | Large | Medium | — captures morphological ECG features — robust to noise | — requires large labelled datasets — overfitting risk |
| Transformer:ECG-ViT or ECGformer | 92–98% | Large | Moderate/Slow | — captures long-range dependencies — state-of-the-art accuracy | — high computational cost — limited interpretability |
| CNN-LSTM | 94–98% | Large | Medium | — combines spatial and temporal features — strong generalisation | — complex architecture — expensive training |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Jandera, A.; Petryk, Y.; Muzelak, M.; Skovranek, T. ECG Signal Analysis and Abnormality Detection Application. Algorithms 2025, 18, 689. https://doi.org/10.3390/a18110689
Jandera A, Petryk Y, Muzelak M, Skovranek T. ECG Signal Analysis and Abnormality Detection Application. Algorithms. 2025; 18(11):689. https://doi.org/10.3390/a18110689
Chicago/Turabian StyleJandera, Ales, Yuliia Petryk, Martin Muzelak, and Tomas Skovranek. 2025. "ECG Signal Analysis and Abnormality Detection Application" Algorithms 18, no. 11: 689. https://doi.org/10.3390/a18110689
APA StyleJandera, A., Petryk, Y., Muzelak, M., & Skovranek, T. (2025). ECG Signal Analysis and Abnormality Detection Application. Algorithms, 18(11), 689. https://doi.org/10.3390/a18110689

