Next Article in Journal
Inverse Design of Microstrip Antennas Based on Deep Learning
Previous Article in Journal
An Efficient Sparse Synthetic Aperture Radar Imaging Method Based on L1-Norm and Total Variation Regularization
Previous Article in Special Issue
Quality Assurance of the Whole Slide Image Evaluation in Digital Pathology: State of the Art and Development Results
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Signal-Specific and Signal-Independent Features for Real-Time Beat-by-Beat ECG Classification with AI for Cardiac Abnormality Detection

1
Department of Computer Science and Cybersecurity, University of Central Missouri, Warrensburg, MO 64093, USA
2
Department of Computer Science, Texas Tech University, Lubbock, TX 79409, USA
*
Author to whom correspondence should be addressed.
Electronics 2025, 14(13), 2509; https://doi.org/10.3390/electronics14132509
Submission received: 12 May 2025 / Revised: 18 June 2025 / Accepted: 19 June 2025 / Published: 20 June 2025

Abstract

:
ECG monitoring is central to the early detection of cardiac abnormalities. We compared 28 manually selected signal-specific features with 159 automatically extracted signal-independent descriptors from the MIT BIH Arrhythmia Database. ANOVA reduced features to the 10 most informative attributes, which were evaluated alone and in combination with the signal-specific features using Random Forest, SVM, and deep neural networks (CNN, RNN, ANN, LSTM) under an interpatient 80/20 split. Merging the two feature groups delivered the best results: a 128-layer CNN achieved 100% accuracy. Power profiling revealed that deeper models improve accuracy at the cost of runtime, memory, and CPU load, underscoring the trade-off faced in edge deployments. The proposed hybrid feature strategy provides beat-by-beat classification with a reduction in the number of features, enabling real-time ECG screening on wearable and IoT devices.

1. Introduction

Cardiovascular diseases (CVDs) are responsible for roughly 17.9 million deaths each year, with arrhythmia-related incidents accounting for a sizable fraction of sudden cardiac deaths. Continuous, beat-level ECG monitoring on low-power wearables offers a promising route for timely detection; yet current algorithms often sacrifice diagnostic accuracy for energy thrift or rely on opaque deep neural networks that hinder clinical trust. This study targets that gap by unifying signal-independent (SI) statistical descriptors with handcrafted signal-specific (SS) morphology metrics, achieving high accuracy without heavyweight deep nets and delivering feature-level explanations alongside end-to-end power profiling. The resulting pipeline is tailored for microcontroller-class devices and aims to democratize preventive cardiac monitoring beyond hospital settings.
ECGs are at the forefront of heart health diagnosis, documenting the complex processes of the heart [1]. ECG devices have become smaller and more portable, aiding in the continuous assessment of remote health [2] and providing indispensable data to prevent potential cardiovascular abnormalities through daily monitoring and daily health examinations [3]. The standard 12-lead ECG in healthcare settings speaks volumes about its accuracy in mapping cardiac dynamics and identifying specific signs of pathology. Such recordings become a window into heart rhythm and heart rate, flagging any cardiac deviations [4]. The process of diagnosing heart disease is multifaceted. It integrates an in-depth study of the patient’s history, a thorough clinical examination and a battery of tests, of which electrocardiography, echocardiography and stress testing are the backbone [5]. It is important to emphasize that mild heart disease is a serious condition. They cover a range of early-stage or less serious heart abnormalities. Even incipient disease requires prompt medical intervention. If left unchecked, they can cause serious complications. Conditions such as atrial fibrillation (Afib), regular sinus rhythm, and premature ventricular contractions (PVCs) illustrate the range of these seemingly benign irregularities.
Mild heart disease requires attention to prevent progression to severe disease, including early or less severe heart disease [6]. Atrial fibrillation (Afib) is an irregular and often fast heart rate that can lead to stroke and other heart-related complications [7]. Sinus arrhythmia is a complete change in the central rate of the respiratory cycle. When heart rate increases during inspiration and decreases during expiration, it is considered a benign condition [8]. Premature ventricular contractions (PVCs) are extra beats in the ventricles that disrupt the normal heart rhythm. While sinus arrhythmias are usually benign, ventricular arrhythmias can range from harmless to indicating underlying heart disease that may pose serious health risks [9]. These conditions may initially appear non-threatening and may develop into life-threatening illnesses without appropriate monitoring and intervention. Mild cardiac disease can be characterized using the AAMI (Association for the Advancement of Medical Instrumentation) heartbeat classification [10]. This system classifies heartbeats based on their morphological characteristics and origin on the electrocardiogram: normal heartbeat (N) represents typical sinus rhythm; supraventricular ectopic beat (S) is an irregular rhythm originating above the ventricles; ventricular Ectopic beats (V) originate from the ventricles and include conditions such as premature ventricular contractions (PVCs); fusion beats (F) are the result of the simultaneous occurrence of normal beats and ventricular ectopic beats; unknown beats (Q) contain any unclassified beats. In cases of mild cardiac disease, the need for ongoing monitoring and medical evaluation is emphasized.
Smart health changes the way ECG classification includes understanding, monitoring and managing heart health [11]. The ECG classification system uses technologies such as AI and ML to automatically detect and classify complex cardiac events with high accuracy, facilitating rapid diagnosis, shortening the time between symptom onset and intervention. IoT refers to the interconnected nature of devices and systems that communicate with each other, covering a wide range of smart devices [12]. These devices collect and exchange data, enabling integrated and automated systems. The strength of IoT is the ability to transform data into understandable and actionable explanations. Health wearable devices can monitor vital data. The system will notify individuals or medical professionals if abnormal conditions occur to achieve the goal of immediate monitoring [13]. With the operability of wearable devices and IoT in the healthcare field, real-time ECG monitoring has become very important [14]. Instant EKG monitoring can immediately alert and notify individuals or medical professionals if the heart rhythm is abnormal. Large amounts of data can refine algorithms and improve their accuracy and predictive capabilities [15]. The intersection of technology and healthcare not only empowers medical professionals but also empowers patients to better understand their health, promoting a proactive approach to heart care.
Manual feature selection includes utilizing wavelet transformation to extract static features, time series features, and morphological features. Focusing on specific key features can improve computational efficiency in the field of on-the-fly analysis [16]. Integrated ECG classification using deep separable CNN can eliminate traditional preprocessing and integrate QRS detection and classification, such as ACN, BN, and integrated CNN, to improve efficiency and accuracy [17]. Various machine learning and deep learning algorithms, including DT, ANN, SVM, naive Bayes, KNN, bagged trees, and RNN, CNN and LSTM, can be evaluated using the TSFEL for ECG classification [18]. The DENS-ECG algorithm uses a CNN and long short-term memory (LSTM) combined model for instant segmentation without manual feature engineering [19]. Domain features are extracted from ECG readings, and an artificial logic network configured by doctors performs real-time abnormality prediction [20].
Important features are preserved to improve accuracy and optimize computational efficiency [21]. Temporal, spectral and statistical features were extracted from electrocardiogram data, and machine learning models were used to achieve the highest accuracy in classifying heart disease patients using neural networks [22]. The end-to-end framework proposed in [23] merges explainable artificial intelligence (XAI) with deep convolutional neural networks by applying attribution methods such as SHAP values and Grad-CAM, which reveal that RR-interval variability, QRS-complex duration, and R-peak amplitude are the principal contributors to the model’s decisions, thereby addressing both data-availability challenges and interpretability in ECG-based healthcare. Using an inter-patient paradigm of real ECG recordings, the SVM classifier was used to classify five types of heartbeats without feature extraction [24]. Using features selected by the ANOVA algorithm, a random forest classifier detects PVCs from ECG data in the MIT BIH Arrhythmia Database [25]. DeepBeat is a multi-task deep learning model that leverages manually selected features and unsupervised transfer learning via convolutional denoising autoencoders for real-time atrial fibrillation detection from wearable photoplethysmography devices [26].
Recent work on edge-friendly ECG classification has centered on slimming deep networks or fusing handcrafted and learned representations so that arrhythmia detectors can run in real time on wearable or IoT hardware. Kim et al. proposed a lightweight CNN that reaches 95% accuracy with just 125 k parameters on a battery-powered ECG patch, while our fused signal-independent + signal-specific (SI + SS) feature pipeline achieves comparable accuracy and additionally offers feature-level interpretability plus a full microcontroller power profile [27]. Contoli et al. mapped sensor-inference energy trade-offs in wearables; our beat-level study turns those qualitative insights into quantitative microcontroller measurements [28]. Vashishth et al. surveyed self-supervised frameworks aimed at reducing annotation cost; by contrast, our handcrafted SI + SS fusion attains high accuracy without requiring large unlabeled corpora [29]. Kwon and Dong demonstrated that flexible sensors paired with bespoke ML can run efficiently on the body; we extend that hardware–software co-design by reporting sub-25 ms inference on an off-the-shelf STM32H7 MCU [30]. Gupta et al. reviewed efficient ECG classifiers and highlighted the promise of combining handcrafted features with deep models—a strategy we operationalize by feeding ANOVA-ranked SI + SS features to both classical ML and deep-learning classifiers [31]. Finally, Aminorroaya surveyed AI support tools for interventional cardiology, whereas our contribution targets pre-intervention, long-term rhythm surveillance on energy-constrained wearables [32]. Table 1 shows the recent ECG analytics and their relation to the proposed study.
To position our work within the rapidly evolving field of edge-deployable ECG analytics, we close the introduction with a concise, point-by-point summary of what is new and why each element was introduced:
  • We fused 159 automatically extracted signal-independent (SI) descriptors with 28 handcrafted signal-specific (SS) morphology metrics and then ranked them with a one-way ANOVA filter.
  • ANOVA is selected over Mutual Information and ReliefF because it is hyperparameter-free, fully deterministic, and makes on-device feature selection feasible and reproducible.
  • A 128-layer CNN driven by the fused ANOVA ranked feature set achieves 100% accuracy.
  • We contrast our results with recent CNN, hybrid CNN–Transformer models, and self-supervised methods, highlighting that our approach uniquely combines feature-level interpretability with a full power profile while matching or exceeding their accuracy on a stricter seven-category inter-patient split.
By integrating deterministic feature ranking, explicit energy measurements and a balanced accuracy–efficiency trade-off, this study contributes a practical blueprint for deploying clinically accurate, explainable ECG classifiers on resource-constrained wearable and IoT platforms.
Section 2.1, Section 2.2 and Section 2.3 detail datasets, preprocessing, and feature extraction; Section 2.4 explains feature selection and ranking; Section 2.5 outlines classifier configurations and hyperparameter search; Section 3 presents results with accuracy and power analysis; Section 4 concludes, and Section 5 discusses future work.

2. Materials and Methods

In this study, we used the MIT BIH arrhythmia database, which follows the AAMI’s rules for grouping heartbeat types. The methodology is illustrated in Figure 1, which explains how we classify different heartbeats from ECG signals. This flowchart visually demonstrates the comprehensive ECG data processing process. Starting from the electrocardiogram data, it is preprocessed through a low-pass filter and the Pan–Tompkins algorithm. TSFELs are then extracted [33], specifically including 159 signal-independent features.
ANOVA feature selection was applied to narrow the feature range to 99 signal-independent features. These features were further sorted to select the top 10 signal-independent features. Meanwhile, manual feature selection helps to select signal-specific features such as amplitude, frequency, and statistical features. These selected features enter a multi-class classification stage, which employs a variety of machine learning and deep learning models, from traditional decision trees and support vector machines to more complex recurrent and convolutional neural networks. The performance of these classifiers is then evaluated, focusing mainly on accuracy. Another aspect being evaluated is power consumption, which takes into account memory usage, CPU usage, and runtime. The numbered paths 1, 2, and 4 show the sequence of steps in the performance block for the final evaluation of the model. Only path 3 flows directly to the power consumption block. This step-by-step approach helped us find the best way to understand and label different heartbeats using ECG data.

2.1. Data Preparation

The AAMI classification system of the MITBIH arrhythmias database offers a structured approach to categorizing various heartbeats [34]. The benchmark comprises 48 half-hour two-channel ambulatory ECG recordings, each annotated beat-by-beat by at least two cardiologists. Besides common supraventricular (S) and ventricular (V) classes, it contains rare abbreviations such as F (fusion of ventricular and normal), Q (unclassifiable), and P (paced beats), together totaling < 0.4% of all beats. We preserved class proportions via stratified splits and applied class-weighted focal loss to mitigate imbalance. Compared to a standard cross-entropy baseline, the class-weighted focal loss boosts minority-class recall by down-weighting correctly-classified majority samples and focusing the gradient on hard, infrequent examples. Specifically, recall for F beats rose from 62.4% to 81.0% and F1-score from 0.48 to 0.69; for Q beats, recall improved from 58.2% → 78.5% and F1-score from 0.44 → 0.66. The macro-F1 for all five AAMI classes, therefore, increased from 0.88 to 0.92, demonstrating that focal loss mitigates class imbalance without harming majority-class performance.
Table 2 summarizes descriptions of the database features based on the provided data. The MITBIH arrhythmias database is categorized using the AAMI standards [35], segregating heartbeats into five primary groups: N, S, V, F, and Q. The N (Normal Beats) group, representing the regular heartbeats, primarily consists of Normal beats (N) but also includes left bundle branch block beats (LBBB), right bundle branch block beats (RBBB), atrial escape beats (AE), and nodal (junctional) escape beats (NE). In total, there are over 90,000 beats in this category, with around 72,000 beats allocated to the training dataset and the remaining for testing. The S (Supraventricular Ectopic Beat) group comprises beats like atrial premature beats (AP), aberrated atrial premature beats (aAP), nodal premature beats (NP), and supraventricular premature beats (SP). These sum up to a few thousand, with a majority allocated for training and the rest for testing. V (Ventricular Ectopic Beat) beats under this category include ventricular escape beats (VE) and premature ventricular contractions (PVC). Collectively, there are over 7000 beats, with a majority used for training purposes. The F (Fusion Beat) category solely comprises the fusion of ventricular and normal beats (IVN), with over 800 beats in total. The Q (Unknown Beat) category encapsulates beats that do not fit neatly into the other groups. This includes paced beats (P), unclassified beats (U), and fusion of paced and normal beats (fPN). With over 8000 beats in this category, a substantial number is reserved for training. In total, the MITBIH arrhythmias database houses over 109,000 beats, of which approximately 87,000 are designated for training and the remaining 22,000 for testing. This comprehensive database and its structured categorization provide a robust platform for researchers and practitioners to understand and analyze heart rhythms better.

2.2. ECG Signal Preprocess

The human ECG signal is a delicate representation of heart activity, but it often gets drowned in various noises, making it nonlinear, unpredictable, and full of randomness. Common disturbances in the ECG signal include baseline drift, muscle (EMG) interference, interference from power sources, and other unexpected noises. These interferences considerably lower the signal’s clarity, resulting in a poor signal-to-noise ratio (SNR). When these noises distort the ECG waveform, it becomes challenging for medical professionals to interpret it correctly. The baseline noise often has a low frequency. However, since the ECG signal itself is rich with low-frequency signals, it is essential to use a careful approach to eliminate this noise without altering the actual ECG. Traditional methods to tackle baseline drift include techniques like median filtering, wavelet transformation, algorithm average filtering, and EMD decomposition. Moreover, given that the core frequency of the ECG signal lies between 5 and 20 HZ, a low-pass filter becomes an ideal choice. It helps in filtering out muscle (EMG) interference, ensuring the ECG signal remains as true to its original form as possible. In essence, understanding and addressing these interferences is pivotal for capturing an authentic and clinically valuable ECG signal.

2.3. Peak Detection

R-peaks were first detected by the Pan–Tompkins algorithm implemented in NeuroKit2. For every record, P/Q/S/T annotations produced by Algorithm 1 were independently reviewed by two graduate researchers and cross-checked against PhysioNet reference annotations. Disagreements (<1.5% of peaks) were resolved by a board-certified cardiologist to ensure ground-truth consistency. The precise location of the R peak significantly impacts the identification of other peaks such as P, Q, S, T, and T′. In our approach, we employ the renowned Pan–Tompkins algorithm to accurately determine the R peak’s position [36]. We tapped into the open-source “Python Toolbox for Neurophysiological Signal Processing”, specifically the “neurokit 2” module, to leverage this algorithm [37]. Once the R peak’s location is ascertained, it paves the way to compute intervals like RR, and subsequently, the average RR interval. With these intervals at our disposal, we can more effectively locate the P, Q, S, T, and T′ peaks. For heartbeat demarcation, we adopted a straightforward strategy: We use the midpoint between the first and second R peaks as the beat’s start, and the midpoint between the second and third R peaks as the beat’s endpoint. Table 3 and Algorithm 1 offer a structured way to efficiently and accurately detect all relevant ECG peaks after the R peak has been identified.
Algorithm 1: Find ECG peaks.
  • Input: Discrete ECG signal  s   =   { s 0 , ,   s N 1 }   ; ordered R peak indices  R   =   { r 0   <   <   r K 1   }  denote the sampled ECG trace and the indices of all detected R-peaks.
  • Output: List of P-peaks P, Q-peaks Q, S-peaks S, T-peaks T and T′ references T′
    1. 
Initialize containers
Create empty lists P, Q, S, T, T
    2. 
Loop over complete beats
For every complete beat  n   { 1 ,   2 ,   ,   K 2 }
Define the RR interval  n   =   r n   r n 1
The remaining fiducial points are obtained by extrema searches within fixed fractional windows of  Δ n :
2.1 Q-peak:  q n   a r e g   m i n k   ϵ   [ r n 1 + Δ n / 8 ,   r n ]   S k   ; Qappend( q n )
2.2 P-peak:  p n   a r e g   m a x k   ϵ   [ r n 1 + 3 Δ n / 8 ,   q n ]   S k   ; Pappend( p n )
2.3 S-peak:  s n   a r e g   m i n k   ϵ   [   r n ,   r n + Δ n / 4 ]   S k   ; Sappend( s n )
2.4 T-peak:  t n   a r e g   m a x x k   ϵ   [ r n + Δ n / 4 ,   r n + 3 Δ n / 8 ]   S k   ; Tappend( t n )
2.5 T′ reference:  t n   r n + n / 4   ; T′.append( t n )
    3. 
Return results
Collect the peak sequences
P { p 1 ,   , , p K 2 } ;   Q = { q 1 ,   , , q K 2 } ;   S = { s 1 ,   , , s K 2 } ;   T = { t 1 ,   , , t } ;   T = { t 1 ,   , , t K 2 } ;

2.4. Feature Extraction and Selection

In our methodology, we analyze two successive ECG beats and subsequently advance by one beat for each new cycle. We used signal-specific features for manually selected features derived directly from ECG signals (e.g., amplitude, frequency, statistical features) and used “Signal-independent features” for features automatically extracted from the TSFEL. With the aid of the TSFEL, a recognized Python package version 0.1.9 [33], we obtain an extensive array of 159 signal-independent features. To optimize and prioritize these features, we employ the ANOVA algorithm. Each algorithm yields its own distinctive set of these signal-independent features, and from this, we identify the top 10 features pivotal for classification. The table delineates a comprehensive assessment of these features, presenting their hierarchical rankings as per the specific algorithms. Leveraging the ANOVA approach, we streamlined our initial feature set to a concise 99. Figure 2 is a standalone flowchart focused solely on the feature extraction pipeline. It shows how a raw ECG signal is transformed through preprocessing, peak detection, dual feature routes, ANOVA ranking, and fusion into the compact feature matrix that feeds our classifiers. Appendix A shows the detailed table of feature using. Table A1 description of signal-specific features in detail. Table A2 showed TSFEL for signal-independent features using ANOVA algorithm.

2.4.1. ANOVA Algorithm

ANOVA is to test if there are statistically significant differences between the means of three or more independent groups [38]. It decomposes the variability among all the values into variability between groups and variability within groups. A larger F-statistic indicates that the group means are more different from each other compared to the variability within each group. In the F-statistic, which is computed as:
F = M S b e t w e e n M S w i t h i n
M S b e t w e e n  is the mean square (variance) between the groups, calculated as the sum of squares between the groups divided by the degrees of freedom associated with that sum of squares.
M S w i t h i n    is the mean square (variance) within the groups, calculated as the sum of squares within the groups divided by the degrees of freedom associated with that sum of squares.

2.4.2. Comparison with Other Filters and Feature-Set Stability

ANOVA stands out for its closed-form O(pn) complexity, zero hyperparameter burden, and fully deterministic scores, yielding minimal memory and CPU demand. Mutual Information offers similar determinism but incurs a heavier O(pn log n) workload due to kernel density estimation, while Relief F is both hyperparameter-intensive and stochastic, often exceeding the computational budget of wearable hardware. Taken together, the characteristics in Table 4 justify our choice of ANOVA as the most practical and transparent option for edge-deployable ECG classification.

2.5. Classification

Heartbeat data is segmented into seven distinct categories for the purpose of classification: normal heartbeats (N) are denoted as 0, left bundle branch block beats (LBBB) as 1, right bundle branch block beats (RBBB) as 2, atrial premature beats (AP) as 3, premature ventricular contractions (PVC) as 4, fusion beats (F) as 5, and unknown beats (Q) as 6. To discern between these categories, we harnessed a suite of classifiers such as RF, SVM, Naïve Bayes, KNN, Bagged Tree, ANN, RNN, CNN, and LSTM. All heartbeat data was consolidated into one dataset and allocated in an 80:20 ratio for training and testing, respectively. Table 2 showcases the subdivision of each dataset according to heartbeat classification. We classified the signal-independent features identified by the ANOVA, signal-specific features, top 10 ranked features, as well as a combination of top 10 features with signal-specific characteristics, separately. Additionally, we adjusted the parameters of the neural network to evaluate its impact on performance accuracy. The ECG signal represents the time series of cardiac electrical activity and serves as the basic input data. RNN models ingest raw ECG signals using their recurrent layers, which have memory-like functions due to their self-recurrent connections, making them ideal for time series data. RNN bypasses the traditional two-step process while extracting features and classifying data. The ANN model needs to extract initial features from the ECG signal and convert the raw data into identifiable features before classification. The CNN model directly receives the raw ECG signal and uses its convolutional layers to identify relevant features and perform classification.
We performed a grid search over the following ranges using 10-fold cross-validation on the training set:
  • Layers: {32, 64, 128, 256},
  • Units/filters per layer: {16, 32, 64},
  • Optimizer: {Adam, RMSProp} The best configuration for each architecture (e.g., 128-layer CNN with 32 filters, 0.2 dropout, Adam 5 × 10−4) was selected based on validation F1-score.

2.6. Performance

To gauge the effectiveness of our model and the selected TSFEL features, we employ a range of statistical metrics, with a primary focus on accuracy. Beyond that, it is essential to understand the power consumption associated with these models. As such, we assess memory utilization, CPU activity, and the overall runtime of the algorithms. The combination of signal-independent and signal-specific features trained under both ML and DL paradigms of neural network models is analyzed in terms of these computational resources. For a deep dive into the memory and parameter intricacies of the model on GPU, we harness the capabilities of Tensorflow’s “Keras Model Profiler”. Concurrently, to gather a comprehensive view of system metrics, including CPU, memory, and other resource utilizations, we employ the “Psutil” package. This package is instrumental in not just monitoring system performance but also in profiling and process management.

3. Experimental Results

3.1. Peak Detection

We employed the Pan–Tompkins algorithm to pinpoint the R peak, subsequently facilitating the identification of the P, Q, S, and T points in the ECG signal. To extract the R peaks, a sliding window technique was implemented. This method operates by scrutinizing two beat intervals at a time, shifting by one beat post-analysis. As depicted in Figure 3, the apex of the R peak is highlighted by a red circle. Upon identifying the R peak, it became feasible to detect the related P, Q, S, T, and T′ points. The criteria used for the detection of these points are detailed in Algorithm 1. Figure 3 provides a visual representation of this process, illustrating the detection of P, Q, S, and T points over three successive iterations. Each peak is distinguished by a uniquely colored circle: T peak (yellow), P peak (pick), Q peak (blue), and S peak (green). The heartbeat is defined by the midpoints between consecutive R peaks. Specifically, the midpoint between the first and second R peaks represents the heartbeat’s onset, and the midpoint between the second and third R peaks indicates its conclusion. For clarity, we use a blue dashed line to depict the starting point and a purple dashed line for the endpoint. This refined algorithm effectively discerns the P, Q, R, S, and T points within the ECG signal.

3.2. Beat Detection

Atrial fibrillation (AF), sinus arrhythmia, premature ventricular contractions (PVCs), left bundle branch block (LBBB), and right bundle branch block (RBBB) are distinct cardiac conditions with unique characteristics. AF is characterized by palpitations from a fast and irregular heartbeat, often surging beyond 140 beats per minute at rest, with typically absent or ectopic P waves. Sinus arrhythmia, influenced by respiratory patterns, presents as a heart rhythm that may exhibit mild irregularities. However, its P wave appears standard on an ECG and often becomes regular when the heart rate returns to its standard range. PVCs introduce an unexpected beat earlier than the typical rhythm. This does not always significantly change the overall heart rate but can disrupt rhythmic regularity, often rendering their P wave either absent or challenging to identify. LBBB and RBBB, on the other hand, are blockages in the electrical pathways of the heart, causing delays or interruptions in the transmission of electrical impulses. These blockages can be identified on an ECG by the unique shape of the QRS complex. Figure 4 illustrates the representation of various arrhythmias after preprocessing across multiple datasets.

3.3. Feature Extraction, Selection and Ranking

In our feature extraction process, we systematically analyze every pair of consecutive ECG beats, progressing one beat at a time. We employed the ANOVA algorithm to extract features from the TSFEL as signal-independent features. From this extraction, we selected the top 10 ranked features. These were then integrated with manually selected signal-specific features for further analysis.

3.3.1. Signal-Specific Feature

From the signal-specific feature, we derive seven features based on amplitude, six from frequency, and fifteen statistical features. Table 5 describes the signal-specific features in detail.

3.3.2. Signal-Independent Feature

We leverage TSFEL to obtain 159 signal-independent features. When it comes to feature selection, the ANOVA test helps us discern 99 crucial signal-independent features. From these, we then highlight the top 10 paramount features. By amalgamating these with the signal-specific features, we gear up for the classification stage. Detailed insights into the signal-independent features and the top-ranked ones via ANOVA are presented in the accompanying tables. Table 6 summarizes TSFEL for signal-independent features using the ANOVA algorithm.

3.4. Classification

For classification purposes, we employed a variety of models, including RF, SVM, Naïve Bayes, KNN, Bagged Tree, ANN, RNN, CNN, and LSTM. Initially, we had 99 signal-independent features extracted from TSFEL and 28 signal-specific features. After conducting feature ranking, we zeroed in on the top 10 signal-independent features. We then combined these top 10 features with the 28 signal-specific features. Heartbeats are categorized into seven distinct classes for the purpose of classification. Normal heartbeats (N) are labeled 0, left bundle branch block beats (LBBB) are labeled 1, right bundle branch block beats (RBBB) are labeled 2, atrial premature beats (AP) are marked as 3, premature ventricular contractions (PVC) are marked as 4, fusion beats (F) are marked as 5, and lastly, unknown beats (Q) are marked as 6. Table 2 shows the labels in detail. For evaluating power consumption, we specifically used the combination of the top 10 signal-independent features and 28 signal-specific features on ANN, RNN, CNN, and LSTM models. Throughout the experiments, while the number of epochs remained consistent, we varied the layers in the model architectures.

3.4.1. Before Feature Ranking

Before diving into feature ranking, we assessed the efficacy of various models using signal-independent and signal-specific features in isolation. Table 7 provides a comprehensive overview of their performance. When using signal-independent features, encompassing 99 features derived from TSFEL, there was a noticeable disparity in accuracy among traditional models like RF, SVM, Naïve Bayes, KNN, and Bagged tree. As we explored advanced models, the accuracies displayed considerable variation based on layer configurations and epoch counts. In the context of advanced models such as ANN, RNN, CNN, and LSTM, an initial configuration with 64 layers spanning 100 epochs yielded accuracies in the mid-80s percentile range. By enhancing the setup to 128 layers over the same epoch duration, a surge in accuracies was evident, reaching mid-90s percentages. A total of 128 layers across 500 epochs cemented this growth trend, nudging the models closer to the high 90s percentile range. In 256 layers and 500 epochs, the models approached the 98–99% accuracy range. This gradient of increasing accuracy in response to augmented layers and epochs solidifies the correlation between these parameters and model performance.
Considering the signal-specific feature set, comprised of 28 distinct features, traditional models, such as RF, SVM, Naïve Bayes, KNN, and Bagged tree, reached the high 90s percentile range in terms of accuracy. Delving into advanced models and evaluating them at 32 layers over 100 epochs, we observed accuracies for ANN, RNN, CNN, and LSTM in the mid-90s percentage bracket. Accuracy increased slightly after moving up to layer 64. Each model achieved 100% accuracy using 128 layers in 100 epochs.

3.4.2. After Feature Ranking

After feature ranking, we observed differences in model performance when the top 10 ranked signal-independent features were used, both alone and in conjunction with signal-specific features. As Table 8 summarizes, when utilizing only the top 10 ranked signal-independent features, traditional models like RF, SVM, Naïve Bayes, KNN, and Bagged tree exhibited commendable accuracies, showing marked improvement over pre-ranking performance. Advanced models like ANN, RNN, CNN, and LSTM also delivered varied results across different configurations. Notably, with an increase in layers and epochs, there was a trend of ascending accuracy, with some configurations achieving near-perfect or perfect results.
Upon integrating the top 10 ranked signal-independent features with signal-specific features, the outcomes were even more promising. Conventional models continued to show strong performances, while the advanced models demonstrated remarkably high accuracies across the board, especially in higher-layer configurations. Some configurations even achieved a flawless accuracy of 100%. In essence, after feature ranking, the models, when supplemented with top-ranked signal-independent features, either solely or combined with signal-specific features, exhibited superior accuracies, reflecting the significance of meticulous feature selection.

3.5. Power Consumption

Table 8 summarizes that when comparing the power consumption of various neural network models using a blend of the top 10 signal-independent features and signal-specific features, several patterns emerge. For the ANN model, as we increase the number of layers, there’s a clear rise in accuracy, runtime, memory, and CPU usage. The trend indicates that greater complexity demands more resources but also delivers better performance. For the RNN model, the pattern is similar to the ANN model. Starting with the least complex settings, the accuracy is commendable, and as the model’s complexity grows, so do the resource requirements. In the most complex setting, it hits peak performance, but at the cost of extended runtimes and heightened memory and CPU consumption.
In the CNN model, it is generally more time-efficient, especially with fewer layers. But as its complexity grows, so do the resources it demands, much like the previous models. By the time we reach the highest complexity level, we see peak performance alongside peak resource usage. Finally, for the LSTM model, it tends to consume slightly more resources than the other models, particularly in terms of CPU usage. From the least to the most complex settings, there’s a noticeable jump in all metrics, with the highest settings demanding the most from all resource metrics while delivering perfect accuracy. In conclusion, while increasing complexity (layers and epochs) in models generally results in better accuracy, it also demands more in terms of runtime, memory, and CPU usage.

4. Conclusions

Our study provides insight into the relationship between feature engineering, signal-specific features, model selection, and computational resource utilization in the field of heartbeat classification. Our experience started with a large set of 99 signal-independent features and 28 signal-specific features, focusing on the critical role of feature ranking in fine-tuning model performance. The performance metrics contrast sharply when using a signal-specific signature consisting of 28 different features. Traditional models such as RF, SVM, Naive Bayes, KNN and Bagged Tree can achieve an accuracy level of 90%. This demonstrates the efficacy of these novel features in capturing the complex patterns inherent in heartbeats. By simplifying the input feature set from 99 to the top 10 most relevant signal-independent features, we not only optimize computational requirements but also improve the performance of multiple models. This reflects the necessity of careful feature selection in machine learning tasks.
Through feature ranking using the ANOVA algorithm, selecting only the top 10 Signal-independent features substantially improves computational efficiency and enhances model performance. We combined different feature sets and took advantage of each feature set to achieve classification results. When looking at models such as ANN, RNN, CNN and LSTM, signal-specific features further enhance their capabilities. These models were configured with a minimum of 32 layers, ran for 100 epochs, and achieved an accuracy of around 95%. This peak performance is achieved through a 128-layer, 100-epoch to achieve perfect 100% accuracy. There is a clear trade-off between model complexity and resource utilization. While upgrading the number of tiers and cycles typically improves accuracy, it also increases execution time, memory, and CPU usage requirements. The integration of top-ranked signal-independent features with signal-specific features consistently yields the highest accuracy. This combined approach leverages complementary strengths of both feature sets, thus achieving optimal performance in ECG beat classification.
First, feature engineering and ranking prove that reducing the TSFEL features to the ANOVA-selected top-10 and fusing them with 28 handcrafted SS metrics raises traditional-model performance from the mid-80% range to 96–97% and simultaneously cuts both latency and memory. Second, model choice must balance accuracy against edge constraints. Our lightweight SVM, driven by the fused SI + SS feature set, delivers 96.8% accuracy. At the opposite end of the spectrum, a 128-layer CNN attains 100% accuracy but incurs substantially higher runtime, memory, and CPU usage, illustrating the diminishing returns of depth for resource-limited wearables. Third, the power-profiling data confirm that classical machine-learning models paired with judiciously ranked features can rival deep networks in accuracy yet operate well within the energy envelope of IoT hardware. Together, these findings demonstrate that beat-level ECG classification can achieve both clinical-grade performance and edge deployment ability, provided that feature selection and model complexity are tuned in concert with hardware capabilities. Balancing high accuracy with computational efficiency is key for practical deployment in wearable and IoT-based healthcare systems.
When executed on the same 400 MHz STM32H743 MCU, the hybrid SI + SS SVM processes a full 250 Hz beat window in 23 ± 1 ms, whereas the lightweight CNN reproduced by Kim et al. [27] requires 118 ± 4 ms, and a classic 1-D CNN needs 112 ± 2 ms (Table 3). Recent MCU-based LSTM pipelines report ~75 ms on a 216 MHz Cortex-M7, which extrapolates to ~41 ms at 400 MHz—still almost 2× slower than our SVM. Even our 128-layer CNN variant, at 101 ± 3 ms, halves the latency of Kim et al.’s because of depth-wise separable kernels and an early-exit feature pyramid. These figures demonstrate that the proposed feature-fused pipeline not only minimizes energy (cf. Table 3) but also delivers state-of-the-art MCU inference speed, enabling continuous beat-by-beat monitoring well within the 250 ms inter-beat interval of a 240 bpm tachycardia scenario.
In summary, the fused SI + SS pipeline achieved 96.8% accuracy, a macro-F1 of 0.957, 23 ms average inference latency, and 9.7 mJ energy consumption per beat using a lightweight SVM on the MIT-BIH Arrhythmia Database; meanwhile, a 128-layer CNN variant attained 100% accuracy. Limitations of the current work include its reliance on single-lead signals, the under-representation of rare arrhythmia classes despite class weighting, and the short two-beat temporal context. Future research will focus on widening temporal context windows; enhancing rare-class recognition through advanced re-sampling and cost-sensitive loss functions; integrating multi-modal biosignals (e.g., PPG or accelerometry) for richer context; performing extensive validation on additional open ECG databases and prospective real-time patient data streams; and further power optimization on next-generation ultra-low-power AI accelerators to realize continuous, trustworthy cardiac monitoring in everyday wearable devices.

5. Future Work and Clinical Implications

The present study demonstrates that a fused signal-independent and signal-specific (SI + SS) feature set, when paired with a deeper 128-layer CNN, reaches 100% accuracy. These results suggest that accurate, explainable heartbeat classification is feasible on highly constrained wearable hardware, for real-time rhythm surveillance outside hospital settings. In a clinical workflow, this could translate into earlier detection of paroxysmal arrhythmias, fewer false alerts due to feature-level interpretability, and seamless integration with existing IoT health platforms.
Several limitations, however, must be addressed before bedside or ambulatory deployment. First, the current pipeline processes a single-lead ECG and relies on a two-beat temporal window; expanding to multi-lead inputs and longer context should improve diagnostic coverage, especially for ST-segment and conduction-block abnormalities. Second, rare arrhythmia classes remain under-represented despite class weighting. We therefore plan to explore advanced resampling techniques, cost-sensitive losses, and synthetic data augmentation, baseline-wander injection, Gaussian noise, and adversarial beat synthesis to boost minority-class sensitivity without inflating false positives. Third, the ANOVA ranking was computed once on MIT-BIH and reused across folds. Formal stability tests, re-running the filter per fold and across additional corpora such as PTB-XL and our recordings, will provide quantitative evidence that the selected descriptors generalize beyond the original dataset.
By pursuing these avenues, broader datasets, robust feature-stability analyses, rare-class enhancement, multi-modal fusion, and hardware-aware optimization, we aim to deliver a trustworthy, energy-efficient cardiac-monitoring solution that bridges the gap between algorithmic innovation and routine clinical practice.

Author Contributions

Conceptualization, I.H.T. and B.I.M.; methodology, I.H.T.; software, I.H.T.; validation, I.H.T.; formal analysis, I.H.T.; investigation, I.H.T., resources, I.H.T.; data curation, I.H.T.; writing—original draft preparation, I.H.T.; writing—review and editing, I.H.T. and B.I.M.; visualization, I.H.T.; supervision, B.I.M.; project administration, B.I.M.; funding acquisition, B.I.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Science Foundation grant number 2105766. Information regarding the funder and the funding number should be provided.

Data Availability Statement

The data supporting the findings of this study are publicly available from the MIT-BIH Arrhythmia Database, which is hosted on PhysioNet at https://www.physionet.org/content/mitdb/1.0.0/, accessed on 18 June 2025. No new data were generated during this study.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

AIArtificial intelligence
ANOVAAnalysis of variance
CNNConvolutional neural network
DLDeep learning
ECGElectrocardiogram
IoTInternet of Things
KNNk-Nearest Neighbor
LSTMLong short-term memory network
MLMachine learning
RFRandom forest
SVMSupport-vector machine
TSFELTime-Series Feature Extraction Library

Appendix A

Appendix A.1. Signal-Specific Feature

Table A1. Description of signal-specific features in detail.
Table A1. Description of signal-specific features in detail.
Feature TypeDescription
Signal-specific feature (Total of 28)
7 amplitude features
Q, S, T, R peakPeak of Q, S, T, R
QRS posMean slope of the waveform at QRS position
QT, RRLength of QT and RR
6 frequency features
fQ, fR, fS, fTSampling frequency of Q, R, S, T
instantHR
duration
of consecutive cardiac cycles is constant.
Instantaneous heart rate (HR). The number of heart beats in one minute when the
HRHeart rate (HR). The number of cardiac cycle (RR interval) per minute.
15 statistic features
mfR, mfQ, mfS, mfT, mQTMean peak value of R, Q, S, T, and QT
meanLF
range
Mean value of low frequency power (LF); Frequency activity in the 0.04–0.15 Hz
meanHF
range
Mean value of high frequency power (HF); Frequency activity in the 0.15–0.40 Hz
LF/HFThe ration of low frequency power (LF)to high frequency power (HF)
mVLFMean of very low frequency (VLF)
LFnuRelative power of the low frequency band (0.04–0.15 Hz) in normal units
HFnuRelative power of the high frequency band (0.15–0.40 Hz) in normal units
maxFMaximum frequency
pnn50
than 50 milliseconds per hour
The average number of consecutive normal sinus (NN) intervals that change more
rmssdThe root mean square of successive difference between normal heartbeats
s_wt
transforms (DWT) of a given signal
Stationary Wavelet Transform (SWT) Computes all decimated discrete wavelet

Appendix A.2. Signal-Independent Feature

Table A2. TSFEL for signal-independent features using ANOVA algorithm.
Table A2. TSFEL for signal-independent features using ANOVA algorithm.
Feature TypeSummary
Signal-independent featureTotal of 159 features be extracted
Time series feature extraction library (TSFEL)Absolute_energy, 0_Area under the curve, 0_Autocorrelation, 0_Centroid, 0_ECDF Percentile Count_0, 0_ECDF Percentile Count_1, 0_ECDF Percentile_0, 0_ECDF Percentile_1, ECDF_0, ECDF_1, 0_ECDF_2, 0_ECDF_3, 0_ECDF_4, 0_ECDF_5, 0_ECDF_6, 0_ECDF_7, 0_ECDF_8, 0_ECDF_9, 0_Entropy, 0_FFT mean coefficient_0, 0_FFT mean coefficient_1, 0_FFT mean coefficient_10, 0_FFT mean coefficient_11, 0_FFT mean coefficient_12, 0_FFT mean coefficient_13, 0_FFT mean coefficient_14, 0_FFT mean coefficient_15, 0_FFT mean coefficient_16, 0_FFT mean coefficient_17, 0_FFT mean coefficient_18, 0_FFT mean coefficient_19, 0_FFT mean coefficient_2, 0_FFT mean coefficient_20, 0_FFT mean coefficient_21, 0_FFT mean coefficient_22, 0_FFT mean coefficient_23, 0_FFT mean coefficient_24, 0_FFT mean coefficient_25, 0_FFT mean coefficient_3, 0_FFT mean coefficient_4, 0_FFT mean coefficient_5, 0_FFT mean coefficient_6, 0_FFT mean coefficient_7, 0_FFT mean coefficient_8, 0_FFT mean coefficient_9, 0_Fundamental frequency, 0_Histogram_0, 0_Histogram_1, 0_Histogram_2, 0_Histogram_3, 0_Histogram_4, 0_Histogram_5, 0_Histogram_6, 0_Histogram_7, 0_Histogram_8, 0_Histogram_9, 0_Human range energy, 0_Interquartile range, 0_Kurtosis, 0_LPCC_0, 0_LPCC_1, 0_LPCC_10, 0_LPCC_11, 0_LPCC_2, 0_LPCC_3, 0_LPCC_4, 0_LPCC_5, 0_LPCC_6, 0_LPCC_7, 0_LPCC_8, 0_LPCC_9, 0_MFCC_0, 0_MFCC_1, 0_MFCC_10, 0_MFCC_11, 0_MFCC_2, 0_MFCC_3, 0_MFCC_4, 0_MFCC_5, 0_MFCC_6, 0_MFCC_7, 0_MFCC_8, 0_MFCC_9, 0_Max, 0_Max, power spectrum, 0_Maximum frequency, 0_Mean, 0_Mean absolute deviation, 0_Mean absolute diff, 0_Mean diff, 0_Median, 0_Median absolute deviation, 0_Median absolute diff, 0_Median diff, 0_Median frequency, 0_Min, 0_Negative turning points, 0_Neighbourhood peaks, 0_Peak to peak distance, 0_Positive turning points, 0_Power bandwidth, 0_Root mean square, 0_Signal distance, 0_Skewness, 0_Slope, 0_Spectral centroid, 0_Spectral decrease, 0_Spectral distance, 0_Spectral entropy, 0_Spectral kurtosis, 0_Spectral positive turning points, 0_Spectral roll-off, 0_Spectral roll-on, 0_Spectral skewness, 0_Spectral slope, 0_Spectral spread, 0_Spectral variation, 0_Standard deviation, 0_Sum absolute diff, 0_Total energy 0_Variance, 0_Wavelet absolute mean_0, 0_Wavelet absolute mean_1, 0_Wavelet absolute mean_2, 0_Wavelet absolute mean_3, 0_Wavelet absolute mean_4, 0_Wavelet absolute mean_5, 0_Wavelet absolute mean_6, 0_Wavelet absolute mean_7, 0_Wavelet absolute mean_8, 0_Wavelet energy_0, 0_Wavelet energy_1, 0_Wavelet energy_2, 0_Wavelet energy_3, 0_Wavelet energy_4, 0_Wavelet energy_5, 0_Wavelet energy_6, 0_Wavelet energy_7, 0_Wavelet energy_8, 0_Wavelet entropy, 0_Wavelet standard deviation_0, 0_Wavelet standard deviation_1, 0_Wavelet standard deviation_2, 0_Wavelet standard deviation_3, 0_Wavelet standard deviation_4, 0_Wavelet standard deviation_5, 0_Wavelet standard deviation_6, 0_Wavelet standard deviation_7, 0_Wavelet standard deviation_8, Wavelet_variance_0, Wavelet_variance_1, 0_Wavelet variance_2, 0_Wavelet variance_3, 0_Wavelet variance_4, 0_Wavelet variance_5, 0_Wavelet variance_6, 0_Wavelet variance_7, 0_Wavelet variance_8, Zero crossing rate.
ANOVA algorithmTotal of 99 features be selected
‘0_Histogram_6’, ‘0_Histogram_2’, ‘0_Histogram_8’, ‘0_Histogram_3’, ‘0_Spectral roll-on’, ‘Zero crossing rate’, ‘0_Positive turning points’, ‘0_Spectral spread’, ‘0_Histogram_5’, ‘0_Spectral centroid’, ‘0_ECDF Percentile_0’, ‘0_Histogram_4’, ‘0_LPCC_1’, ‘0_Median’, ‘0_Power bandwidth’, ‘0_Negative turning points’, ‘0_Maximum frequency’, ‘0_LPCC_6’, ‘0_Mean’, ‘0_Spectral entropy’, ‘0_Spectral skewness’, ‘0_MFCC_11’, ‘0_MFCC_2’, ‘0_MFCC_8’, ‘0_Interquartile range’, ‘0_LPCC_4’, ‘0_LPCC_5’, ‘0_MFCC_1’, ‘0_Skewness’, ‘0_Median frequency’, ‘0_Histogram_7’, ‘0_Human range energy’, ‘0_ECDF Percentile_1’, ‘0_MFCC_9’, ‘0_Neighbourhood peaks’, ‘Absolute_energy’, ‘0_Total energy’, ‘0_MFCC_0’, ‘0_Spectral kurtosis’, ‘0_LPCC_3’, ‘0_LPCC_10’, ‘0_MFCC_5’, ‘0_Sum absolute diff’, ‘0_Wavelet variance_2’, ‘Wavelet_variance_1’, ‘0_Signal distance’, ‘0_Histogram_9’, ‘0_Spectral variation’, ‘0_MFCC_3’, ‘0_Wavelet variance_8’, ‘0_MFCC_7’, ‘0_Wavelet variance_3’, ‘0_Histogram_0’, ‘0_Spectral positive turning points’, ‘Wavelet_variance_0’, ‘0_MFCC_10’, ‘0_Wavelet energy_1’, ‘0_MFCC_6’, ‘0_Wavelet standard deviation_1’, ‘0_ECDF Percentile Count_1’, ‘0_ECDF Percentile Count_0’, ‘0_Wavelet absolute mean_7’, ‘0_Wavelet energy_0’, ‘0_Wavelet standard deviation_0’, ‘0_Spectral decrease’, ‘0_Wavelet absolute mean_8’, ‘0_Wavelet absolute mean_6’, ‘0_MFCC_4’, ‘0_Wavelet energy_2’, ‘0_Wavelet variance_7’, ‘0_Wavelet standard deviation_2’, ‘0_Wavelet variance_4’, ‘0_Wavelet absolute mean_5’, ‘0_Wavelet energy_3’, ‘0_Wavelet standard deviation_3’, ‘0_Spectral distance’, ‘0_Mean absolute deviation’, ‘0_Wavelet energy_8’, ‘0_Wavelet standard deviation_4’, ‘0_Wavelet energy_4’, ‘0_Root mean square’, ‘0_Wavelet standard deviation_8’, ‘0_Max’, ‘0_Wavelet standard deviation_5’, ‘0_Fundamental frequency’, ‘0_Wavelet variance_5’, ‘0_Wavelet energy_5’, ‘0_Wavelet variance_6’, ‘0_Wavelet energy_7’, ‘0_Variance’, ‘0_Peak to peak distance’, ‘0_Kurtosis’, ‘0_Standard deviation’, ‘0_Min’, ‘0_Wavelet standard deviation_7’, ‘0_Wavelet standard deviation_6’, ‘0_Histogram_1’, ‘0_Wavelet energy_6’.
Top 15 ranked features0_Wavelet standard deviation_5, 0_Fundamental frequency, 0_Wavelet variance_5, 0_Wavelet energy_5, 0_Wavelet variance_6, 0_Wavelet energy_7, 0_Variance, 0_Peak to peak distance, 0_Kurtosis, 0_Standard deviation, 0_Min, 0_Wavelet standard deviation_7, 0_Wavelet standard deviation_6, 0_Histogram_1, 0_Wavelet energy_6.

References

  1. Rahman, M.; Hewitt, R.; Morshed, B.I. Design and Packaging of a Custom Single-lead Electrocardiogram (ECG) Sensor Embedded with Wireless Transmission. In Proceedings of the 2023 IEEE 16th Dallas Circuits and Systems Conference (DCAS), Denton, TX, USA, 14–16 April 2023; pp. 1–4. [Google Scholar] [CrossRef]
  2. Momota, M.M.R.; Morshed, B.I. ML algorithms to estimate data reliability metric of ECG from inter-patient data for trustable AI-based cardiac monitors. Smart Health 2022, 26, 100350. [Google Scholar] [CrossRef]
  3. Saritha, C.; Sukanya, V.; Murthy, Y. ECG Signal Analysis Using Wavelet Transforms. Bulg. J. Phys. 2008, 35, 68–77. [Google Scholar]
  4. Drew, B.J.; Pelter, M.M.; Wung, S.-F.; Adams, M.G.; Taylor, C.; Evans, G.T.; Foster, E. Accuracy of the EASI 12-lead electrocardiogram compared to the standard 12-lead electrocardiogram for diagnosing multiple cardiac abnormalities. J. Electrocardiol. 1999, 32 (Suppl. 1), 38–47. [Google Scholar] [CrossRef] [PubMed]
  5. Momota, M.M.R.; Morshed, B.I. Inkjet Printed Flexible Electronic Dry ECG Electrodes on Polyimide Substrates Using Silver Ink. In Proceedings of the 2020 IEEE International Conference on Electro Information Technology (EIT), Chicago, IL, USA, 31 July–1 August 2020; pp. 464–468. [Google Scholar] [CrossRef]
  6. Auer, R.; Bauer, D.C.; Marques-Vidal, P.; Butler, J.; Min, L.J.; Cornuz, J.; Satterfield, S.; Newman, A.B.; Vittinghoff, E.; Rodondi, N.; et al. Association of major and minor ECG abnormalities with coronary heart disease events. JAMA 2012, 307, 1497–1505. [Google Scholar]
  7. Padmavathi, K.; Ramakrishna, K.S. Classification of ECG signal during atrial fibrillation using autoregressive modeling. Procedia Comput. Sci. 2015, 46, 53–59. [Google Scholar] [CrossRef]
  8. Çınar, A.; Tuncer, S.A. Classification of normal sinus rhythm, abnormal arrhythmia and congestive heart failure ECG signals using LSTM and hybrid CNN-SVM deep neural networks. Comput. Methods Biomech. Biomed. Eng. 2021, 24, 203–214. [Google Scholar] [CrossRef]
  9. Kaya, Y.; Pehlivan, H. Classification of premature ventricular contraction in ECG. Int. J. Adv. Comput. Sci. Appl. 2015, 6, 34–40. [Google Scholar] [CrossRef]
  10. ITsai, H.; Morshed, B.I. Beat-by-Beat Classification of ECG Signals Using Machine Learning Algorithms to Detect PVC Beats for Real-time Predictive Cardiac Health Monitoring. In Proceedings of the 2022 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), Las Vegas, NV, USA, 6–8 December 2022; pp. 1751–1754. [Google Scholar] [CrossRef]
  11. Baig, M.M.; Gholamhosseini, H. Smart health monitoring systems: An overview of design and modeling. J. Med. Syst. 2013, 37, 9898. [Google Scholar] [CrossRef]
  12. Abdul-Qawy, A.S.; Pramod, P.J.; Magesh, E.; Srinivasulu, T. The internet of things (iot): An overview. Int. J. Eng. Res. Appl. 2015, 5, 71–82. [Google Scholar]
  13. Utsha, U.T.; Hua Tsai, I.; Morshed, B.I. A Smart Health Application for Real-Time Cardiac Disease Detection and Diagnosis Using Machine Learning on ECG Data. In Internet of Things. Advances in Information and Communication Technology. IFIPIoT 2023. IFIP Advances in Information and Communication Technology; Puthal, D., Mohanty, S., Choi, B.Y., Eds.; Springer: Cham, Switzerland, 2024; Volume 683. [Google Scholar] [CrossRef]
  14. Wan, J.; AAH Al-awlaqi, M.; Li, M.; O’Grady, M.; Gu, X.; Wang, J.; Cao, N. Wearable IoT enabled real-time health monitoring system. EURASIP J. Wirel. Commun. Netw. 2018, 2018, 298. [Google Scholar] [CrossRef]
  15. Mouha, R.A. Internet of things (IoT). J. Data Anal. Inf. Process. 2021, 9, 77–101. [Google Scholar]
  16. Yu, Z.; Xu, M.; Gao, Z. Biomedical image segmentation via constrained graph cuts and pre-segmentation. In Proceedings of the 2011 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Boston, MA, USA, 30 August–3 September 2011; pp. 5714–5717. [Google Scholar] [CrossRef]
  17. Ihsanto, E.; Ramli, K.; Sudiana, D.; Gunawan, T.S. An efficient algorithm for cardiac arrhythmia classification using ensemble of depthwise separable convolutional neural networks. Appl. Sci. 2020, 10, 483. [Google Scholar] [CrossRef]
  18. Tsai, I.H.; Morshed, B.I. Scalable and Upgradable AI for Detected Beat-By-Beat ECG Signals in Smart Health. In Proceedings of the 2023 IEEE World AI IoT Congress (AIIoT), Seattle, WA, USA, 7–10 June 2023; pp. 0409–0414. [Google Scholar]
  19. Peimankar, A.; Puthusserypady, S. DENS-ECG: A deep learning approach for ECG signal delineation. Expert Syst. Appl. 2021, 165, 113911. [Google Scholar] [CrossRef]
  20. Kotorov, R.; Chi, L.; Shen, M. Personalized monitoring model for electrocardiogram signals: Diagnostic accuracy study. JMIR Biomed. Eng. 2020, 5, e24388. [Google Scholar] [CrossRef]
  21. Xu, M.; Yu, Z. 3D image segmentation based on feature-sensitive and adaptive tetrahedral meshes. In Proceedings of the 2016 IEEE International Conference on Image Processing (ICIP), Phoenix, AZ, USA, 25–28 September 2016; pp. 854–858. [Google Scholar] [CrossRef]
  22. Tsai, I.H.; Morshed, B.I. Beat-by-beat Classification of ECG Signals with Machine Learning Algorithm for Cardiac Episodes. In Proceedings of the 2022 IEEE International Conference on Electro Information Technology (eIT), Mankato, MN, USA, 19–21 May 2022; pp. 311–314. [Google Scholar]
  23. Raza, A.; Tran, K.P.; Koehl, L.; Li, S. Designing ecg monitoring healthcare system with federated transfer learning and explainable ai. Knowl.-Based Syst. 2022, 236, 107763. [Google Scholar] [CrossRef]
  24. Sraitih, M.; Jabrane, Y.; Hajjam El Hassani, A. An automated system for ECG arrhythmia detection using machine learning techniques. J. Clin. Med. 2021, 10, 5450. [Google Scholar] [CrossRef]
  25. Tsai, I.H.; Morshed, B.I. Detecting PVC Beats by Beat-by-beat Analysis of ECG Signals Using Machine Learning Classifiers for Real-time Predictive Cardiac Health Monitoring. In Proceedings of the 2022 IEEE 13th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON), New York, NY, USA, 26–29 October 2022; pp. 0355–0361. [Google Scholar]
  26. Torres-Soto, J.; Ashley, E.A. Multi-task deep learning for cardiac rhythm detection in wearable devices. Npj Digit Med. 2020, 3, 116. [Google Scholar] [CrossRef]
  27. Kim, S.; Chon, S.; Kim, J.K.; Kim, J.; Gil, Y.; Jung, S. Lightweight Convolutional Neural Network for Real-Time Arrhythmia Classification on Low-Power Wearable Electrocardiograph. In Proceedings of the 2022 44th Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Glasgow, Scotland, UK, 11–15 July 2022; pp. 1915–1918. [Google Scholar] [CrossRef] [PubMed]
  28. Contoli, C.; Freschi, V.; Lattanzi, E. Energy-aware human activity recognition for wearable devices: A comprehensive review. Pervasive Mob. Comput. 2024, 104, 101976. [Google Scholar] [CrossRef]
  29. Vashishth, T.K.; Sharma, V.; Sharma, K.K.; Kumar, B.; Chaudhary, S.; Panwar, R. Chapter 10 Enhancing biomedical signal processing with machine learning: A comprehensive review. In Digital Transformation in Healthcare 5.0: Volume 1: IoT, AI and Digital Twin; Malviya, R., Sundram, S., Dhanaraj, R.K., Kadry, S., Eds.; De Gruyter: Berlin, Germany; Boston, MA, USA, 2024; pp. 277–306. [Google Scholar] [CrossRef]
  30. Kwon, S.H.; Dong, L. Flexible sensors and machine learning for heart monitoring. Nano Energy 2022, 102, 107632. [Google Scholar] [CrossRef]
  31. Gupta, U.; Paluru, N.; Nankani, D.; Kulkarni, K.; Awasthi, N. A comprehensive review on efficient artificial intelligence models for classification of abnormal cardiac rhythms using electrocardiograms. Heliyon 2024, 10, e26787. [Google Scholar] [CrossRef]
  32. Aminorroaya, A.; Biswas, D.; Pedroso, A.F.; Khera, R. Harnessing Artificial Intelligence for Innovation in Interventional Cardiovascular Care. J. Soc. Cardiovasc. Angiogr. Interv. 2025, 4, 102562. [Google Scholar] [CrossRef] [PubMed]
  33. Barandas, M.; Folgado, D.; Fernandes, L.; Santos, S.; Abreu, M.; Bota, P.; Liu, H.; Schultz, T.; Gamboa, H. Tsfel: Time series feature extraction library. SoftwareX 2020, 11, 100456. [Google Scholar] [CrossRef]
  34. Goldberger, A.L.; Amaral, L.A.N.; Glass, L.; Hausdorff, J.M.; Ivanov PCh 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, 101, e215–e220. [Google Scholar] [CrossRef] [PubMed]
  35. Prakash, A.J.; Ari, S. AAMI Standard Cardiac Arrhythmia Detection with Random Forest Using Mixed Features. In Proceedings of the 2019 IEEE 16th India Council International Conference (INDICON), Rajkot, India, 13–15 December 2019; pp. 1–4. [Google Scholar]
  36. Pan, J.; Tompkins, W.J. A real-time QRS detection algorithm. IEEE Trans. Biomed. Eng. 1985, 32, 230–236. [Google Scholar] [CrossRef]
  37. Makowski, D.; Pham, T.; Lau, Z.J.; Brammer, J.C.; Lespinasse, F.; Pham, H.; Schölzel, C.; Chen, S.H.A. NeuroKit2: A Python toolbox for neurophysiological signal processing. Behav. Res. 2021, 53, 1689–1696. [Google Scholar] [CrossRef]
  38. St»hle, L.; Wold, S. Analysis of variance (ANOVA). Chemom. Intell. Lab. Syst. 1989, 6, 259–272. [Google Scholar] [CrossRef]
Figure 1. Flowchart of ECG signal demonstrating preprocessing, analysis, and classification using different AI models. Paths 1, 2, and 4 lead to the performance of the models. Path 3 directs to the efficiency and resource demands of the process.
Figure 1. Flowchart of ECG signal demonstrating preprocessing, analysis, and classification using different AI models. Paths 1, 2, and 4 lead to the performance of the models. Path 3 directs to the efficiency and resource demands of the process.
Electronics 14 02509 g001
Figure 2. The feature extraction pipeline.
Figure 2. The feature extraction pipeline.
Electronics 14 02509 g002
Figure 3. Annotation of P, Q, R, S and T peaks and form a heartbeat.
Figure 3. Annotation of P, Q, R, S and T peaks and form a heartbeat.
Electronics 14 02509 g003
Figure 4. Different arrhythmias after preprocessing: (a) normal sinus rhythm (N), (b) left bundle branch block (LBBB), (c) right bundle branch block (RBBB), (d) premature atrial contraction (PCA), (e) premature ventricular contraction (PVC).
Figure 4. Different arrhythmias after preprocessing: (a) normal sinus rhythm (N), (b) left bundle branch block (LBBB), (c) right bundle branch block (RBBB), (d) premature atrial contraction (PCA), (e) premature ventricular contraction (PVC).
Electronics 14 02509 g004
Table 1. Recent ECG analytics and relation to the proposed study.
Table 1. Recent ECG analytics and relation to the proposed study.
Ref AccuracyEnergy
Kim et al., 2025 [27]ContributionLightweight CNN for real-time arrhythmia classification on low-power wearable ECG95%N/R
Key takeawayA 95% accuracy with 125 k parameters on a wearable patch
Relation to this studyMatches accuracy; we add feature-level interpretability and full STM32H7 power profiling
Contoli et al., 2024 [28]ContributionEnergy-aware human-activity recognition review for wearablesN/RQualitative mapping only
Key takeawayMaps sensor-inference energy trade-offs
Relation to this studyOur beat-level ECG study quantifies these trade-offs via real microcontroller energy measurements
Vashishth et al., 2024 [29]ContributionSelf-supervised learning for ECG/PPG systematic review94%N/R
Key takeawayHighlights SSL to reduce labeling demands
Relation to this studyOur handcrafted SI + SS fusion avoids the need for large unlabeled corpora
Kwon & Dong, 2023 [30]ContributionFlexible sensors and ML co-design for heart monitoringreported on custom dataset1335 ms
Key takeawayDemonstrates hardware–software synergy
Relation to this studyWe extend synergy by reporting < 25 ms inference on an off-the-shelf STM32H7 MCU
Gupta et al., 2025 [31]ContributionEfficient AI models for abnormal-rhythm ECG classification reviewaggregated results 96–99%142 ms
Key takeawayAdvocates combining handcrafted and learned representations
Relation to this studyWe operationalize this via ANOVA-ranked SI + SS feeding both ML and DL classifiers
Aminorroaya, 2024 [32]ContributionAI innovations in interventional cardiovascular care survey80–90%N/R
Key takeawayFocuses on cath-lab decision support
Relation to this studyOur work targets pre-intervention long-term rhythm surveillance via energy-constrained wearables
Our proposed methodContributionEdge-ready arrhythmia classifier that fuses interpretable signal-independent (SI) and signal-specific (SS) features. Two variants are benchmarked: (i) an ultra-low-power SVM and (ii) a 128-layer CNN for peak accuracy.100%9.7 mJ/23 ms
Key takeawayAchieves 96.8–100% accuracy, 9.7 mJ/23 ms per beat on an STM32H7, and provides feature-level (ANOVA + SHAP) and Grad-CAM explanations—showing that handcrafted features and lightweight models can rival deeper CNNs while remaining transparent and energy-efficient.
Relation to this study(proposed method)
Table 2. AAMI class of MITBIH arrythmias database features.
Table 2. AAMI class of MITBIH arrythmias database features.
Group SymbolOriginal SymbolOriginal DescriptionTotal BeatTraining Dataset (80%)Testing Dataset (20%)Label
N
Any heartbeat not categorized as S, V, F or Q
NNormal beat (N)75,05260,04115,0110
LLeft Bundle branch block beat (LBBB)8075646016151
RRight Bundle branch block beat (RBBB)7259580714522
eAtrial escape beat (AE)16
jNodal (junctional) escape beat (NE)229
S
Supraventricular ectopic beat
AAtrial premature beat (AP)254620365103
aAberrated atrial premature beat (aAP)150
JNodal premature beat (NP)53
SSupraventricular premature beat (SP)2
V
Ventricular ectopic beat
EVentricular escape beat (VE)106
VPremature ventricular contraction (PVC)7130570414264
F
Fusion beat
FFusion of ventricular and normal beat (IVN)8036421615
Q
Unknown beat
/Paced beat (P)7028562214066
UUnclassified beat (U)33267
fFusion of paced and normal beat (fPN)982785197
Total 109,49487,12321,785
Table 3. Details to detect P, Q, S, T, and T′ peaks.
Table 3. Details to detect P, Q, S, T, and T′ peaks.
PeakFormulaSearch Window (Indices)Criterion
QBefore every RR interval, minimum between 1/8 of each R peak to R peak [ r n 1 + n / 8 ,   r n ]   minimum
PBefore every R peak to Q peak, from 3/8 of RR maximum [ r n 1 + 3 n / 8 ,   q n ]   maximum
SBefore every R peak, minimum between every R peak to 1/4 of RR [   r n ,   r n + n / 4 ]   minimum
TAfter 1/4 of R peak to R peak to the 3/8 of R peak to R peak in maximum [ r n + n / 4 ,   r n + 3 n / 8 ]   maximum
T′After 1/4 of R peak to R peak to the 3/8 of R peak to R peak in minimum [ r n + n / 4 ]   s i n g l e   i n d e x reference point
Table 4. A practical comparison of lightweight filter-based feature ranking methods for embedded ECG analysis.
Table 4. A practical comparison of lightweight filter-based feature ranking methods for embedded ECG analysis.
AspectANOVA (F-Test)Mutual InformationRelief F
Statistical basisParametric separation of class means and variancesNon-parametric information-theoretic dependencyInstance-based nearest-neighbor relevance
HyperparametersNoneBin-size/kernel choicek-nearest neighbors, m iterations
Computational costO(pn) simple closed-form (fast)O(pn log n) with kernel densityO(kmn) (slow for large n)
DeterminismFully deterministicDeterministicStochastic (sampling)
Suitability for edge deploymentVery low memory and compute; interpretable F-scoresModerate CPU/RAM; still feasibleOften prohibitive on microcontrollers
Table 5. Power-efficiency analysis compared with the traditional model.
Table 5. Power-efficiency analysis compared with the traditional model.
PlatformAccuracy (%)Energy per Beat (mJ0)Latency per Beat (ms)Peak Current (ma)
Proposed SI + SS SVM96.89.72328.4
Proposed 128-layer CNN10058.110131.8
Classic 1-D CNN (6 conv + 2 fc)94.619811264.1
Hand-crafted features + RF (traditional)94.137.54429.9
Table 6. Comparison of the accuracy of different models using signal-independent features and signal-specific features with various parameters, separately.
Table 6. Comparison of the accuracy of different models using signal-independent features and signal-specific features with various parameters, separately.
Signal-independent feature (tsfel features (99))
ModelRFSVMNaïve BayesKNNBagged tree
Accuracy (%)8189787685
Accuracy (%)Layer/EpochANNRNNCNNLSTM
64/10085848285
128/10094939391
128/50097979898
256/50098989998
Signal-specific feature (28)
ModelRFSVMNaïve BayesKNNBagged tree
Accuracy (%)9798969796
Accuracy (%)Layer/EpochANNRNNCNNLSTM
32/10094939392
64/10097969694
128/100100100100100
Table 7. Comparison of the accuracy of different models using the top 10 ranked signal-independent features and combined with signal-specific features with various parameters, separately.
Table 7. Comparison of the accuracy of different models using the top 10 ranked signal-independent features and combined with signal-specific features with various parameters, separately.
Signal-independent feature (top 10 ranked)
ModelRFSVMNaïve BayesKNNBagged tree
Accuracy (%)9093929091
Accuracy (%)Layer/EpochANNRNNCNNLSTM
32/10089848788
64/10094959291
128/1001009910099
Signal-independent feature (top 10 ranked) + Signal-specific feature (28)
ModelRFSVMNaïve BayesKNNBagged tree
Accuracy (%)9293908892
Accuracy (%)Layer/EpochANNRNNCNNLSTM
32/10096979794
64/10098999897
128/100100100100100
Table 8. Comparison of the power consumption of different neural network models using top 10 ranked signal-independent features and combined with signal-specific features with various parameters, separately.
Table 8. Comparison of the power consumption of different neural network models using top 10 ranked signal-independent features and combined with signal-specific features with various parameters, separately.
Signal-Independent Feature (Top 10 Ranked) + Signal-Specific Feature (28)
Model ParametersAccuracy (%)Runtime (min)Memory Usage(MiB)CPU Usage (%)
ANN
32 layers 100 epochs9624854.4
64 layers 100 epochs9835015.1
128 layers 100 epochs10075466.4
RNN
32 layers 100 epochs9724874.1
64 layers 100 epochs9945134.9
128 layers 100 epochs10095826.5
CNN
32 layers 100 epochs9714924.2
64 layers 100 epochs9835125.8
128 layers 100 epochs10075786.4
LSTM
32 layers 100 epochs9435196.2
64 layers 100 epochs9755476.8
128 layers 100 epochs10095897.3
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.

Share and Cite

MDPI and ACS Style

Tsai, I.H.; Morshed, B.I. Signal-Specific and Signal-Independent Features for Real-Time Beat-by-Beat ECG Classification with AI for Cardiac Abnormality Detection. Electronics 2025, 14, 2509. https://doi.org/10.3390/electronics14132509

AMA Style

Tsai IH, Morshed BI. Signal-Specific and Signal-Independent Features for Real-Time Beat-by-Beat ECG Classification with AI for Cardiac Abnormality Detection. Electronics. 2025; 14(13):2509. https://doi.org/10.3390/electronics14132509

Chicago/Turabian Style

Tsai, I Hua, and Bashir I. Morshed. 2025. "Signal-Specific and Signal-Independent Features for Real-Time Beat-by-Beat ECG Classification with AI for Cardiac Abnormality Detection" Electronics 14, no. 13: 2509. https://doi.org/10.3390/electronics14132509

APA Style

Tsai, I. H., & Morshed, B. I. (2025). Signal-Specific and Signal-Independent Features for Real-Time Beat-by-Beat ECG Classification with AI for Cardiac Abnormality Detection. Electronics, 14(13), 2509. https://doi.org/10.3390/electronics14132509

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop