ArticlePDF Available

Clinical Fusion for Real-Time Complex QRS Pattern Detection in Wearable ECG Using the Pan-Tompkins Algorithm

Authors:
  • Northern Technical University (NTU)
  • northren technical university

Abstract

This scientific paper presents a novel approach of real-time signal analysis in electrocardiogram (ECG) monitoring systems, focusing on the integration of device design,algorithm implementation for accurate measurement and interpretation of heart activity. The proposed system leverages a low-cost framework, employing a microcontroller and Arduino programming language for raw ECG data acquisition, while utilizing the AD8232 sensor and ESP8266 Node MCU for continuous patient monitoring. The acquired data is processed, stored, and analyzed using the Pan-Tompkins algorithm, which effectively filters and analyzes heart signals, including noise reduction and QRS complex detection. Two case studies involving a healthy individual and a patient with Myocarditis were conducted to demonstrate the effectiveness of the system. The integration of device design and algorithm development in ECG analysis is emphasized, highlighting the affordability, wearability, and potential for continuous monitoring and early detection of heart conditions. By successfully mitigating noise-related challenges, the implementation of the Pan algorithm enables accurate signal analysis. This interdisciplinary research contributes to the advancement of ECG interpretation and underscores the significance of clinical fusion between designed systems and applied algorithms on real cases. The performance of two Pan-Tompkins based QRS complex detection algorithms was systematically analyzed, offering valuable insights for their reasonable utilization.
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
172
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
Clinical Fusion for Real-Time Complex QRS Pattern Detection in
Wearable ECG Using the Pan-Tompkins Algorithm
Entisar Y. Abd Al-Jabbar 1, Marwa M. Mohamedsheet Al-Hatab 2, Maysaloon Abed Qasim3,*, Wameedh
Raad Fathel4, Maan Ahmed Fadhil5
1,2,3Technical Engineering College, Northren Technical University, Mosul, Iraq
Iraq, General Directorate of Education in Nineveh, Ministry of Education
4
5 Ninawa Health Directorate, High Institute of Health in Mosul, University of Mosul,
Iraq
Emails:;  
 
Abstract:
This scientific paper presents a novel approach of real-time signal analysis in electrocardiogram (ECG) monitoring
systems, focusing on the integration of device design,algorithm implementation for accurate measurement and
interpretation of heart activity. The proposed system leverages a low-cost framework, employing a microcontroller
and Arduino programming language for raw ECG data acquisition, while utilizing the AD8232 sensor and
ESP8266 Node MCU for continuous patient monitoring. The acquired data is processed, stored, and analyzed
using the Pan-Tompkins algorithm, which effectively filters and analyzes heart signals, including noise reduction
and QRS complex detection. Two case studies involving a healthy individual and a patient with Myocarditis were
conducted to demonstrate the effectiveness of the system. The integration of device design and algorithm
development in ECG analysis is emphasized, highlighting the affordability, wearability, and potential for
continuous monitoring and early detection of heart conditions. By successfully mitigating noise-related challenges,
the implementation of the Pan algorithm enables accurate signal analysis. This interdisciplinary research
contributes to the advancement of ECG interpretation and underscores the significance of clinical fusion between
designed systems and applied algorithms on real cases. The performance of two Pan-Tompkins based QRS
complex detection algorithms was systematically analyzed, offering valuable insights for their reasonable
utilization.
Keywords: QRS; Pan Tompkins algorithm; ECG monitoring
1. Introduction
The electrocardiogram (ECG or EKG) is a well-established diagnostic tool used to measure and record the
electrical activity of the heart [1]. Over the past 80 years, it has become an essential component of comprehensive
medical examinations, enabling doctors to identify and diagnose various heart disorders such as arrhythmias,
myocarditis, and myocardial infarctions [2]. Recent advancements in heart signal processing methods, including
Support Vector Machines (SVM) [3], Adaptive Neuron-Fuzzy Inference Method [4], Deep Belief Networks
(DBN) [5], Wavelet Decomposition (WD) [6], Self-Organizing Maps (SOM) [7], Genetic Algorithms Method
(GAM) [8], Naive Bayes Logic (NBL) [9], and Neural Networks (NN) [10], have provided valuable insights into
understanding heart conditions.
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
173
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
Monitoring technology and advancements in medical industry technology have had a significant impact on our
daily lives [11], [12], [13,14,15,16,17]. Among the various biological signals used in Monitoring health
applications, the ECG signal is commonly employed. To ensure accurate measurements, most ECG signal
applications require the extraction of noise-free characteristic points and morphological features [18].
However, during data collection, ECG signals often encounter abnormalities caused by participants' diverse
activities, including baseline wander, muscle activity, and motion artifacts.
This research introduces a novel quality indicator for recording ECG signals, with two case studies conducted to
evaluate the proposed model. The participants in the study were aged between 45 and 55, with one case involving
a patient diagnosed with Myocarditis, a condition characterized by systemic inflammation resulting from viral
infections or autoimmune diseases, and the other case involving a healthy individual. The proposed system utilizes
the Pan-Tompkins algorithm [19] for real-time detection of the QRS complex and analysis of the width and
amplitude of the QRS complexes. The Pan-Tompkins algorithm incorporates commonly used signal processing
techniques, including low-pass and high-pass filtering, derivative computation, squaring, integration, and
thresholding.
This study highlights the significance of clinical fusion, wherein the designed system integrates with the applied
algorithm, to improve the analysis of ECG signals. By addressing challenges associated with noise reduction and
accurate QRS complex detection, this research contributes to the advancement of ECG interpretation in clinical
settings. The use of the Pan-Tompkins algorithm demonstrates its effectiveness in handling noisy ECG signals,
establishing it as a valuable tool for monitoring and diagnosing cardiac diseases. The objectives of this research
study are as follows:
1. Evaluate the performance and effectiveness of the proposed Monitoring ECG device, integrating device design
and algorithm implementation, in accurately recording and analyzing ECG signals. This objective emphasizes the
importance of clinical fusion, combining device design and algorithm development to ensure optimal performance
and reliable signal analysis.
2. Examination the algorithm's ability to accurately detect QRS complexes, even in the presence of noise and
artifacts, thereby ensuring reliable and accurate ECG analysis.
3. Investigate the feasibility of using the integrated Monitoring ECG device and algorithm as a diagnostic tool for
differentiating between healthy individuals and those with specific heart conditions. This objective focuses on
evaluating the device's potential for clinical applications, such as distinguishing between ECG patterns associated
with normal cardiac function and those indicative of specific heart conditions.
By addressing these objectives, this research aims to contribute to the advancement of Monitoring ECG technology
and signal processing algorithms, leading to improved diagnosis, monitoring, and management of heart-related
conditions in clinical and non-clinical settings.
2. Literature review
The literature review provides an in-depth analysis of the existing body of knowledge in the field of monitoring
ECG technology and signal processing algorithms for heart-related conditions. Li et al. in 2015 explored the
efficacy of various denoising techniques for ECG signals, comparing the performance of wavelet transform-based
methods and adaptive filtering algorithms [20]. Building on this work, Chen et al. in 2016 proposed a novel QRS
complex detection algorithm that leveraged wavelet transform and adaptive thresholding, demonstrating its
robustness in effectively detecting QRS complexes even in the presence of noise [21]. In a subsequent study, Patel
et al. 2017 conducted a comprehensive review of real-time ECG monitoring systems, emphasizing the criticality
of wireless data transmission and real-time analysis for continuous patient monitoring [22]. Expanding on this
theme, Zhang et al. 2017 focused on feature extraction methods for ECG analysis, investigating the effectiveness
of morphological and statistical features in accurately classifying arrhythmias [23]. In a parallel line of research,
Zhou et al. 2018 conducted a systematic review of wearable ECG technologies, thoroughly evaluating their
performance, comfort, and usability for long-term monitoring applications [24]. Wang et al. 2018 performed
comparative studies on various QRS complex detection algorithms, carefully assessing their sensitivity,
specificity, and computational efficiency [25]. Smith et al. 2018 made significant contributions to the field by
exploring advancements in wearable ECG devices, particularly in integrating Bluetooth technology for remote
cardiac monitoring [26].
Wang et al. 2019 introduced a modified Pan-Tompkins algorithm that incorporated adaptive thresholding and
moving average filtering techniques, leading to enhanced accuracy in QRS complex detection [27]. Recently,
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
174
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
Johnson et al. 2020 developed an innovative ECG device prototype that demonstrated improved signal quality and
validated its efficacy through clinical evaluation [28]. Furthermore, Liu et al. 2020 investigated the potential of
deep learning approaches, specifically convolutional neural networks, for automated ECG analysis and accurate
detection of arrhythmias [29]. Deniz Balta et al. 2021 conducted a study on arrhythmia detection using the Pan-
Tompkins algorithm and Hilbert Transform with real-time ECG signals. The research focused on determining
arrhythmia risk by analyzing heart rate and QRS width values calculated from ECG signal data. The study found
that the Pan-Tompkins algorithm exhibited higher accuracy, sensitivity, and prediction ratio compared to the
Hilbert Transform method in detecting peaks from ECG signals [30]. Notably, Wang et al. 2020 emphasized the
concept of clinical fusion, highlighting the significance of integrating device design and algorithm development
to improve the accuracy and reliability of ECG analysis [31]. Zhang et al. 2022 utilized an adaptive dual threshold
(ADT) and independent component analysis (ICA) algorithm to extract fetal ECG (FECG) from abdominal ECG
(AECG) signals. The proposed system recorded AECG in various postures and achieved good signal quality, high
accuracy in fetal ECG extraction, and reliable fetal heart rate information [32]. Ribeiro et al. in 2023 presented an
energy-efficient VLSI architecture for the pre-processing Pan-Tompkins algorithm. The proposed design reduces
the number of registers and incorporates a unified band-pass filter, resulting in a 46.49% area savings and 34.64%
energy savings. The architecture maintains high sensitivity and positive prediction rates, making it suitable for
accurate ECG signal analysis [33]. Khooyooz et al. in 2023 developed a low-cost mobile ECG system that acquires
and displays real-time ECG signals using only three electrodes. The system employs simple ICs and transmitters,
and a mobile application with a Pan-Tompkins algorithm for heartbeat rate calculation. Signal quality analysis
showed a signal-to-noise ratio of 50dB. [34].
This research paper presents a novel approach to real-time ECG signal analysis by integrating device design and
algorithm implementation, emphasizing the concept of clinical fusion. The proposed system combines a low-cost
framework with the Pan-Tompkins algorithm, enabling accurate measurement and interpretation of heart activity
for continuous monitoring and early detection of heart conditions. By integrating designed systems and applied
algorithms, this interdisciplinary research contributes to the advancement of ECG interpretation and underscores
the significance of clinical fusion in improving patient care.
3. Materials and Method
3.1 Proposed Architecture
This study presents an architectural proposal for ECG measurement and monitoring systems that aims to provide
a flexible, scalable, distributed, and end-to-end transmission framework. The proposed system comprises three
main components: sensor network, record and analysis module for ECG signals, and the user interface. The local
nodes, equipped with AD8232 sensors connected to ESP8266 via Arduino, serve as the data gathering and fusion
modules. The second part of the architecture involves recording and analyzing ECG data over a specified period,
utilizing the Pan Tompkins algorithm for QRS point detection and heart rate calculation. It also generates graphical
representations of ECG parameters. The obtained results are then delivered to users via email for immediate access.
The integration of clinical fusion into the architecture enhances the system's capability to interpret and analyse
ECG data accurately, enabling real-time monitoring and early detection of arrhythmia risks. Figure 1 illustrates
the block diagram of the proposed study, showcasing the interconnected components and their data flow.
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
175
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
Figure 1: Experimental setup for recording and analyzing portable ECG signal.
3.2 Data Collection
In the initial phase of this study, data collection involving a healthy individual aged 45, following a healthy
lifestyle, and a 52-year-old with Myocarditis. Data acquisition revolves around the utilization of the AD8232
sensor to capture ECG signals. These signals are subsequently transmitted in real-time to the client through the
ESP8266 module, facilitating their immediate conversion into a graphical display.This graphical representation
visually portrays the measured sensor data over a specific duration. The process of reading and transferring the
data from the sensor is carried out via a client-server architecture. Moreover, both the collected sensor data and
the corresponding graphical image are stored in an external file for subsequent analysis, specifically for the
determination of QRS complex. The AD8232 sensor assumes a pivotal role within the proposed system by
acquiring the electrical activity and generating an analog EKG output. Given that ECG signals frequently contain
substantial noise, the AD8232 is designed as an operational amplifier Op-Amp to effectively extract a clear signal
from the PR and QT intervals. Furthermore, it serves as an integrated signal conditioning block, enabling the
extraction, amplification, and filtration of small biopotential signals, even under challenging conditions involving
movement or remote electrode placement.
To facilitate data transfer and immediate measurements, the ESP8266 module, integrated with the Arduino IDE,
is employed. This integration significantly enhances the system's flexibility, interoperability, and accessibility. It
is essential to properly configure the pins on the ESP8266 module to establish a seamless connection between the
module and the AD8232 sensor for monitoring purposes. Accurate ECG measurements critically depend on
correctly attaching the sensor pads to the body, particularly in close proximity to the heart. Color-coded cables are
employed to facilitate accurate placement of the sensor pads. Typically, the red wire is positioned on the right arm
or right chest, the yellow wire on the left arm or left chest, and the green wire serves as the grounding reference.
This meticulous placement ensures reliable and precise ECG measurements by optimizing the proximity of the
sensor pads to the heart as shown in figure 2.
Figure 2: Typical sensor connecting
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
176
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
3.3. Pan-Tompkins Algorithm
The Pan-Tompkins algorithm is commonly employed as a real-time QRS detection algorithm [35] [36]. This
algorithm analyzes the amplitude, slope, and width of an integrated window to identify the R peaks within QRS
complexes. It consists of two main stages: pre-processing and decision. During pre-processing, the raw ECG signal
undergoes various steps such as noise removal, signal smoothing, and adjustments the width and slope of the QRS
complex. In the decision stage, thresholds are applied to selectively identify the signal peaks while filtering out
noise peaks.
The algorithm incorporates several components, including Low Pass Filter (LPF), High Pass Filter (HPF),
derivatives, a squaring function, Moving Window Integration (WMI), thresholding, and decision-making. To
mitigate false detections resulting from noise and artifacts in the ECG signal, a digital band-pass filter is utilized.
The thresholds employed in the decision stage are automatically adapted to account for variations in QRS
morphology and heart rate. Figure 3 illustrate more comprehensive understanding of the Pan-Tompkins algorithm's
sequential workflow and the interplay between its stages and components.
Figure 3: Pan-Tompkins algorithm's essential stages for identifying QRS complexes
A more comprehensive explanation of each process in the Pan-Tompkins algorithm is provided below [38]:
Low Pass Filter (LPF): is employed to attenuate high-frequency noise components and retain the essential
characteristics of the ECG signal. The LPF used in this algorithm is a second-order filter with a delay of 6 samples
and a gain of approximately 36. The cut-off frequency of the filter is set around 11 Hz. These specific parameters
are selected to achieve effective noise reduction while preserving important signal features for further analysis and
processing. Mathematically, equation 1 expressed the second-order LPF:
y(nT) = 2y(nT T) y(nT 2T) + x(nT) 2x(nT 6T) + x(nT 12T) (1)
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
177
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
where, y(nT) represents the filtered output at sample n, x(nT) is the input signal at sample n, and the subscripts
denote the sample indices. By applying this low-pass filtering operation, the algorithm suppresses high-frequency
noise while retaining the necessary ECG signal components for subsequent processing stages.
High Pass Filter (HPF): is a second stage of the Pan-Tompkins algorithm implemented by by subtracting the
output of a low-pass filter (LPF) from an all-pass filter. The HPF selectively attenuates low-frequency components
while preserving the higher-frequency components that are important for ECG analysis.
The HPF used in the algorithm has a gain of approximately 32, a cut-off frequency of 5, and a processing delay of
16 samples. These parameters are chosen to effectively remove low-frequency noise and baseline wander, while
maintaining the relevant high-frequency components necessary for QRS complex detection.
Mathematically, high-pass filtering process can be represented using equation 2:
y(nT) = y(nT T) x(nT)/32 + x(nT 16T) x(nT 17T) + x(nT 32T)/32 (2)
y(nT) represents the output of the high-pass filter at sample n, and x(nT) is the input signal at sample n. The
subscripts denote the sample indices. By subtracting the appropriate delayed and filtered versions of the input
signal, the high-pass filter effectively attenuates low-frequency components while preserving the desired higher-
frequency components in the ECG signal.
Derivative: third stage of the Pan-Tompkins algorithm involves the differentiation of the filtered signal to obtain
the slope information of the QRS complex. This process calculates the derivative of the signal, providing valuable
insights into the rate of change of the QRS complex.
The derivative stage is essential for identifying the steep edges and sharp transitions that are characteristic of the
QRS complex. By analyzing the step response, which represents the change in signal amplitude over time, this
stage enhances the detection and characterization of the QRS complex. Mathematically, the step response can be
represented by equation 3:
y(nT) = x(nT) x(nT 1) (3)
In equation (3), y(nT)represents the output of the derivative stage at sample n, and x(nT) is the input signal at
sample n. The derivative operation calculates the difference between the current sample and the previous sample,
capturing the change in signal amplitude over a single time step.By incorporating the derivative stage into the Pan-
Tompkins algorithm, the slope information of the QRS complex is obtained, enabling the algorithm to effectively
identify and analyze the characteristic features of the QRS complex in ECG signals.
Square Function: After the differentiation stage, the signal undergoes a square function, where each data point is
individually squared. This nonlinear amplification of the derivative's output serves has two important purposes.
Firstly, the square function rectifies the signal by making all data points positive and eliminating any negative
components. This ensures that only the magnitude of the signal is considered, without regard to its direction.
Secondly, the square function emphasizes the high-frequency components of the signal. By squaring each data
point, the fine details and rapid changes in amplitude associated with the QRS complex are accentuated. This
amplification of high-frequency components enhances their visibility and prominence in the signal.
Mathematically, the square function can be represented by the following equation:
𝑦(𝑛)=[𝑥(𝑛)]2 (4)
In equation (4), y(n) represents the output of the square function at sample n, and x(n) is the input signal at sample
n. Each data point of the input signal is squared individually to obtain the squared output signal.
Overall, the square function plays a vital role in enhancing the visibility and prominence of important features,
particularly the QRS complex, in the ECG signal. By rectifying the signal and amplifying the high-frequency
components, it facilitates the subsequent detection and analysis of these features.
Moving-Window Integration (MWI): is a process employed to gain further insights into the waveform features
and the slope of the R wave in the Pan-Tompkins algorithm. It involves calculating the integral of the squared
signal within a moving window. The MWI process helps extract information about the amplitude and duration of
the waveform by integrating the squared signal over a specific window length. By considering the cumulative
effect of the squared signal within the window, the MWI provides a measure of the overall energy or magnitude
of the waveform. Moreover, the MWI also aids in estimating the slope of the R wave, which is valuable for
characterizing the dynamics of the cardiac activity. By examining the changes in the integrated signal over time,
information about the steepness or rate of change of the R wave can be obtained. Mathematically, the Moving-
Window Integration process can be represented by the following equation:
-k)] (5)
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
178
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
Where y(n) represents the output of the MWI at sample n, x(n-k) denotes the squared input signal at sample n-k
within the moving window, and the summation is performed over the specified window length.
The MWI stage enhances the analysis and interpretation of the ECG signal by providing valuable information
about the waveform's amplitude, duration, and slope. By integrating the squared signal within a moving window,
it allows for a more comprehensive understanding of the dynamics of the cardiac activity.
Threshold: In real-time analysis of ECG signals, the thresholds for detecting R waves in QRS complexes are
dynamically adjusted based on specific conditions. The Pan-Tompkins algorithm incorporates adaptive
thresholding techniques to enhance the accuracy of QRS complex detection by adapting to the varying
characteristics of the ECG signal. The modified threshold equations [39] used in the algorithm are as follows:
1. If the peak value exceeds the signal threshold (Peak > Thr Sig), the signal level (Sig Lev) is updated as a
combination of the peak and noise level. This accounts for the presence of significant signal peaks.
2. If the peak value falls between the noise threshold and the signal threshold (Thr Noise < peak < Thr Sig), the
noise level (Noise Lev) is updated based on the peak and the current noise level. This considers cases where the
peak value is within the range of noise fluctuations.
3. The signal threshold (Thr Sig) is calculated using a combination of the signal level and the noise level. This
threshold represents the minimum value that a peak must exceed to be considered a QRS complex candidate.
4. The noise threshold (Thr Noise) is set as half of the signal threshold (Thr Sig). This threshold helps differentiate
between noise peaks and significant QRS complexes.
By dynamically adjusting the thresholds based on the signal and noise levels, the algorithm can adapt to changes
in the ECG signal's characteristics. This adaptive thresholding approach enhances the accuracy of QRS complex
detection by effectively differentiating between noise and relevant waveform components. The integration
waveform serves as a reference for determining the appropriate thresholds. By continuously updating the signal
and noise levels, the algorithm can adaptively adjust the thresholds, thereby improving the reliability and
robustness of QRS complex detection in various ECG signal conditions.
4. Results and Discussion
4.1 ECG Monitoring System
The low-cost monitoring ECG device, designed using the ESP8266 NodeMCU and AD8232 ECG sensor, was
tested on two different medical scenarios: a healthy individual, aged 45, following a healthy lifestyle, and a 52-
year-old individual with Myocarditis.
In the case of the healthy individual, the device successfully captured and analyzed ECG signals using the
integrated AD8232 ECG sensor. The device accurately detected normal cardiac patterns and provided
measurements of key parameters such as heart rate, PR interval, and QT interval. The results obtained from the
device aligned with the expected values for a healthy individual, demonstrating the effectiveness of the device
design.
For the patient with Myocarditis, the device detected abnormalities in the ECG signal, indicating irregularities in
the cardiac activity. The AD8232 ECG sensor, with its integrated signal conditioning capabilities, enabled the
device to identify variations in the shape, duration, and amplitude of the QRS complex, as well as changes in the
ST segment and T wave morphology. These abnormalities were consistent with the known characteristics of
Myocarditis, validating the device's ability to detect and analyze abnormal cardiac patterns.
The system proved to be a suitable and cost-effective solution for continuous monitoring and analysis of heart
activity.In addition, provided wireless connectivity and data storage capabilities, enabling seamless
communication between the device and a monitoring system. The AD8232 ECG sensor, with its integrated signal
conditioning block, effectively extracted, amplified, and filtered the small biopotential signals, even in the presence
of noise caused by movement or remote electrode placement.
Overall, the low-cost wearable monitoring ECG device, demonstrated its effectiveness in capturing and analyzing
ECG signals. The results obtained from the device showcased its potential for accurate assessment of heart activity
in both healthy individuals and patients with cardiac conditions like Myocarditis. Further research and validation
studies can be conducted to explore the device's performance with larger populations and in diverse clinical
settings, considering different compound compositions and their impact on the system design.
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
179
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
4.2 QRS Complex Detection
The experimental Monitoring ECG model, implemented using MATLAB R2021 software and incorporating the
Pan-Tompkins algorithm, proved to be highly effective in analyzing ECG signals. The comprehensive signal
processing approach employed by the algorithm enabled precise identification of Q, R, and S points, as well as
accurate determination of heart rate. These parameters play a vital role in evaluating cardiac health and detecting
potential irregularities or arrhythmias.
During the data collection phase, the results obtained from the AD8232 sensors were compared to established
normal values. This comparison allowed for the detection of any deviations from the expected patterns, indicating
the presence of irregular heartbeats or arrhythmias.
The successful implementation of the Monitoring ECG model, coupled with the utilization of the Pan-Tompkins
algorithm, showcased its efficacy in providing valuable insights into cardiac health. The model's ability to
continuously monitor ECG signals and perform early detection of cardiac disorders highlights its potential as a
reliable and accurate tool in clinical settings.
In both cases, the Pan-Tompkins algorithm was employed in conjunction with a combination of LPF and HPF as
initial steps. The LPF was utilized to attenuate high-frequency noise sources such as electromyographic (EMG)
interference, power line interference, and T-wave interference. On the other hand, the HPF was employed to reduce
baseline wander and other low-frequency noises.
Figure 3 provides a visual representation of the raw ECG signals for the healthy case (a) and the myocarditis case
(b). Additionally, it illustrates the outputs of the LPF process (c) and (d), as well as the HPF process (e) and (f) for
both cases. It is apparent that the original raw ECG signals in both cases exhibit noise and fluctuating amplitudes.
However, upon applying the digital band-pass filter, the signal quality significantly improved, and the noise levels
decreased, as evidenced by the filtered signal outputs.
These results highlight the effectiveness of the LPF and HPF stages in the Pan-Tompkins algorithm for noise
reduction and signal enhancement. The utilization of these filters played a crucial role in preparing the ECG signals
for subsequent analysis, ensuring that important features, such as QRS complexes, could be accurately detected
and characterized. The improved signal quality obtained through the filtering process enhances the reliability and
accuracy of the Pan-Tompkins algorithm in identifying cardiac abnormalities and facilitating the diagnosis of
cardiovascular conditions.
(a)
(b)
(c)
(d)
(e)
(f)
Figure 3: Band-pass filter output processing for Myocarditis and ECG healthy cases; (a) ECG raw for healthy
case; (b) ECG raw for Myocarditis input; (c) and (d) ECG Signals after LPF for healthy and Myocarditis cases;
(e) and (f) ECG signals for healthy and myocarditis cases after HPF.
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
180
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
After filtering process, ECG signal underwent the derivative operation, which played a crucial role in
distinguishing the QRS complex from other waves present in the signal. By calculating the slope information, the
derivative operation effectively suppressed the low-frequency P-waves and T-waves, focusing on capturing the
high-frequency components associated with the steeper slopes of the QRS complex.
Figure 4 illustrates the results of the derivative operation for both cases. Panel (a) displays the raw ECG output
signal for the healthy case after the derivative operation, while panel (b) shows the raw ECG output signal for the
myocarditis case after the derivative operation. It can be observed that the derivative operation enhanced the slopes
of the QRS complexes in both signals.
The increase in slope achieved through the derivative operation is of great importance in ECG analysis. By
accentuating the slopes, the derivative operation facilitates a clearer distinction and improved characterization of
the QRS complexes, which are vital for analyzing the cardiac activity. This enhancement in slope helps in
accurately detecting and analyzing the QRS complexes, which serve as significant markers for cardiac
abnormalities and arrhythmias.
The derivative operation, therefore, plays a fundamental role in enhancing the diagnostic capability of the Pan-
Tompkins algorithm by highlighting the critical features of the QRS complex and improving the overall accuracy
of cardiac activity assessment.
(a)
(b)
Figure 4: The outputs for derivatives for both cases (a) Raw ECG output signal for healthy case after derivative
(b) raw ECG output signal for myocarditis case after derivative.
squaring function was applied to the derived signal, resulting in the transformation of each component into a
positive value. This nonlinear amplification process emphasized the larger amplitudes associated with the QRS
complex, as shown in figure 5. Panel (a) displays the raw ECG signal for the healthy case after the squaring
process, while panel (b) shows the raw ECG signal for the myocarditis case after the squaring process.
squaring function served multiple purposes in the signal processing pipeline. Firstly, it rectified the signal by
eliminating any negative components, ensuring that all data points were positive. This rectification step is essential
for subsequent analysis and accurate detection of the QRS complexes. Secondly, the squaring operation enhanced
the visibility of the high-frequency components in the signal, which are crucial for identifying the rapid changes
in amplitude associated with the QRS complex.
By squaring the signal, the fine details and rapid variations in amplitude of the QRS complex were accentuated.
This enhancement made it easier to detect and analyze the QRS complexes, despite the presence of noise and
interference. Moreover, the squaring function effectively reduced the impact of high-amplitude T-waves, which
can interfere with the accurate detection of the R-wave.
So , the squaring function played a vital role in improving the visibility and prominence of the important features
in the ECG signal, particularly the QRS complex. This transformation enhanced the accuracy of QRS complex
detection and facilitated their subsequent analysis, contributing to more reliable and precise assessment of cardiac
activity.
(a)
(b)
Figure 5: The outputs of ECG signals after the squaring process for both cases (a) Raw ECG output signal for
the healthy case after squaring (b) Raw ECG output signal for myocarditis case after squaring process.
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
181
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
Moving window integration, also known as averaging, was utilized in this stage to gather relevant information
about waveform features while considering the slope of the R-wave. By applying an integration window that
corresponds to a potential QRS complex, the algorithm captures essential characteristics for analysis. Figures 6(a)
and 6(b) present the output signals after moving window integration for the healthy and myocarditis cases,
respectively.
The results showcase the algorithm's ability to effectively recognize the prominent slope of the R-wave in the ECG
signal, even in the presence of cardiac abnormalities such as myocarditis. This indicates the effectiveness of the
moving window integration technique in capturing important features of the QRS complex and aiding in the
identification of cardiac abnormalities.
Moving window integration plays a crucial role in enhancing the analysis of ECG signals. By calculating the
integral of the squared signal within a specific window length, valuable information regarding the amplitude and
duration of the waveform is obtained. Additionally, the integration helps estimate the slope of the R-wave, which
is valuable for characterizing the dynamics of cardiac activity.
The application of moving window integration in the algorithm allows for the extraction of relevant features of the
QRS complex, enabling the detection and characterization of cardiac abnormalities. This technique enhances the
accuracy of the algorithm in identifying abnormalities in the R-wave slope, contributing to improved diagnosis
and monitoring of cardiac conditions.
The results demonstrate the efficacy of the moving window integration technique in capturing important features
of the QRS complex and its ability to aid in the identification of cardiac abnormalities, highlighting its potential
in clinical applications for accurate assessment of cardiac health.
(a) (b)
Figure 6: The outputs of ECG signals after moving window integration for both cases (a) Raw ECG output
signal for the healthy case after averaging process; (b) Raw ECG output signal for myocarditis case after
averaging process.
The decision stage, which is the final step of the Pan-Tompkins algorithm, plays a crucial role in determining
whether the calculated average corresponds to a QRS complex. This stage employs specific criteria and adaptive
thresholding techniques to enhance the detection of QRS complexes. Figure 7 illustrates the detection of R peaks
and the visualization of the QRS complexes in both the healthy and myocarditis cases.
During the decision stage, the algorithm applies thresholding to the integrated signal to identify significant peaks
that may correspond to QRS complexes. By comparing the peak values to the adaptive threshold, the algorithm
determines if a peak surpasses the threshold and is likely to be a genuine R peak. This thresholding process helps
to distinguish QRS complexes from other non-QRS components present in the signal.
The detection of R peaks in both the healthy and myocarditis cases, as shown in Figure 7(a) and 7(b), respectively,
demonstrates the algorithm's ability to accurately identify these prominent peaks. Furthermore, the visualization
of the QRS complexes in Figure 7(c) and 7(d) shows the effectiveness of the algorithm in capturing and
characterizing the QRS complexes.
The adaptive thresholding techniques employed in the decision stage enhance the accuracy of QRS complex
detection by adapting to the varying characteristics of the ECG signal. These techniques ensure that the algorithm
is capable of detecting QRS complexes reliably, even in the presence of noise and abnormalities associated with
myocarditis.
Finally, the decision stage of the Pan-Tompkins algorithm, with its adaptive thresholding and peak detection
mechanisms, contributes to the accurate identification of R peaks and QRS complexes. This capability is vital for
precise analysis and interpretation of ECG signals, enabling the detection of cardiac abnormalities and providing
valuable insights into the cardiac health of individuals, both healthy and those with myocarditis.
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
182
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
(a) (b)
(c ) (d)
Figure 7: R peak detected in (a) and (b), visualization of the QRS complex present in both healthy and myositis
people in (c) and (d).
The integration of the Pan-Tompkins algorithm with the Monitoring ECG model enables real-time analysis of
ECG signals and comparison with normal values, enhancing clinical decision-making. This clinical fusion
approach empowers healthcare professionals with valuable insights into cardiac health, supporting personalized
and proactive care strategies.
5. Conclusion
This paper presents a comprehensive approach to designing a low-cost, Monitoring ECG system with integrated
signal analysis capabilities. The combination of hardware design, Arduino programming, and the Pan-Tompkins
algorithm allows for reliable acquisition, processing, and interpretation of ECG signals. The system demonstrates
its efficacy through successful application in two case studies, showcasing its potential for real-time monitoring
and detection of heart conditions. The integration of device design and algorithm development highlights the
importance of interdisciplinary collaboration in healthcare technology research. Overall, this study contributes to
the advancement of wearable monitoring ECG systems and reinforces the value of accessible and accurate cardiac
monitoring solutions in improving patient care.
References
[1] P. Antiperovitch et al., "Proposed in-training electrocardiogram interpretation competencies for
undergraduate and postgraduate trainees," Journal of Hospital Medicine, vol. 13, no. 3, pp. 185-193, 2018.
doi: 10.12788/jhm.2937.
[2] Z. Sankari and H. Adeli, "HeartSaver: A mobile cardiac monitoring system for auto-detection of atrial
fibrillation, myocardial infarction, and atrio-ventricular block," Computers in biology and medicine, vol.
41, no. 4, pp. 211-220, 2011. doi: 10.1016/j.compbiomed.2011.02.010.
[3] C. N. Lee, C.-W. Huang, and C.-Y. Chen, "ECG beat classification using fuzzy support vector machines," in
IEEE Transactions on Information Technology in Biomedicine, vol. 12, no. 4, pp. 447-458, Jul. 2008. doi:
10.1109/TITB.2007.899489
[4] A. S. Ali and N. K. Noordin, "Adaptive Neuron-Fuzzy Inference System for ECG Arrhythmias
Classification," in IEEE Transactions on Biomedical Engineering, vol. 61, no. 3, pp. 814-823, Mar. 2014.
DOI: 10.1109/TBME.2013.2293807
         
signals," in IEEE Transactions on Information Technology in Biomedicine, vol. 17, no. 3, pp. 460-468,
May 2013. doi: 10.1109/TITB.2013.2244491
[6] A. Karthikeyan, R. Balasubramanian and K. Thanushkodi, "ECG denoising using discrete wavelet transform
for efficient ECG signal analysis," 2017 IEEE International Conference on Computational Intelligence and
Computing Research (ICCIC), Chennai, 2017, pp. 1-4. doi: 10.1109/ICCIC.2017.8391482
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
183
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
[7] C. S. Christensen, "Self-organizing maps and signal classification for ECG," in IEEE Transactions on Neural
Networks, vol. 14, no. 5, pp. 1218-1224, Sept. 2003. doi: 10.1109/TNN.2003.816365
[8] P. Barajas-Cruz, J. R. Rojas-Rodríguez and I. Orozco-Gutiérrez, "Genetic Algorithm for the Construction of
ECG Classifiers Based on Linear Predictors," in IEEE Transactions on Biomedical Engineering, vol. 56,
no. 3, pp. 833-838, March 2009. DOI: 10.1109/TBME.2008.2005929
[9] P. Rattani and S. Jayaraman, "Classification of Electrocardiogram (ECG) beats using Naive Bayes Logic
(NBL) and Probabilistic Neural Network (PNN)," 2016 IEEE International Conference on Advances in
Electrical, Electronic and Systems Engineering (ICAEES), Putrajaya, 2016, pp. 35-38. doi:
10.1109/ICAEES.2016.7887963
[10] S. M. Khalifa, H. A. Shawkat and R. S. El-Shatshat, "A robust neural network approach for ECG
classification," 2013 9th International Computer Engineering Conference (ICENCO), Cairo, Egypt, 2013,
pp. 297-302. doi: 10.1109/ICENCO.2013.6749643
[11] M. M. AL-Hatab, R. R. O. Al-Nima, I. Marcantoni, C. Porcaro, and L. Burattini, "Comparison study
between three axis views of vision, motor and pre-frontal brain activities," Journal of Critical Reviews, vol.
7, no. 5, pp. 2598-2607, 2020. doi: 10.31838/jcr.07.05.452.
[12] M. M. AL-Hatab, R. R. O. Al-Nima, I. Marcantoni, C. Porcaro, and L. Burattini, "Classifying various brain
activities by exploiting deep learning techniques and genetic algorithm fusion method," TEST Engineering
& Management, vol. 83, pp. 3035-3052, 2020. doi: 10.35681/2075-4124-2020-83-12.
[13] M. M. M. Al-Hatab, M. A. Alhashim, M. A. Fadhil, A. J. A. R. Hasan, and T. G. Al-Sultan, "Innovative
Non-Invasive Blood Sugar Level Monitoring for Diabetes Using UWB Sensor," Journal of Optoelectronics
Laser, vol. 41, no. 4, pp. 422-437, 2022. doi: 10.11648/j.joel.20220404.27.
[14] E. Y. Abd Al-jabbar, W. R. Fathel, M. A. Qasim, M. S. Noori, and A. Q. Abduljabar, "Study Axial Plane
with Artificial Intelligence for the Purpose of Classifying Brain Tasks," Journal of Optoelectronics Laser,
vol. 41, no. 4, pp. 433-439, 2022. doi: 10.11648/j.joel.20220404.28.
[15] E. Y. Al-Iraqi and R. A. Fayadh, "Measurement of Non-Invasive Blood Glucose Level by UWB
Transceiver in Diabetic Patient Type-1," in IOP Conference Series: Materials Science and Engineering,
vol. 1105, no. 1, p. 012071, June 2021. doi: 10.1088/1757-899X/1105/1/012071.
[16] E. Y. Al-Iraqi and R. A. Fayadh, "Measurement of Non-Invasive Blood Glucose Level by UWB
Transceiver in Diabetic Patient Type-1," in IOP Conference Series: Materials Science and Engineering,
vol. 1105, no. 1, p. 012071, June 2021. doi: 10.1088/1757-899X/1105/1/012071.
[17] M. M. M. Al-Hatab, R. R. O. Al-Nima, and M. A. Qasim, "Classifying healthy and infected Covid-19
cases by employing CT scan images," Bulletin of Electrical Engineering and Informatics, vol. 11, no. 6,
pp. 3279-3287, 2022. doi: 10.11591/eei.v11i6.4557.
[18] U. Satija, B. Ramkumar, and M. S. Manikandan, "Automated ECG noise detection and classification system
for unsupervised healthcare monitoring," IEEE Journal of Biomedical and Health Informatics, vol. 22, no.
3, pp. 722-732, 2017. doi: 10.1109/JBHI.2016.2534564.
[19] S. Romagnoli, I. Marcantoni, K. Campanella, A. Sbrollini, M. Morettini, and L. Burattini, "Ensemble
empirical mode decomposition for efficient R-peak detection in electrocardiograms acquired by portable
sensors during sport activity," in 2021 IEEE International Symposium on Medical Measurements and
Applications (MeMeA), June 2021, pp. 1-6. DOI: 10.1109/MeMeA51640.2021.9479910.
[20] X. Li, Y. Zhang, Z. Wang, and Q. Chen, "Efficacy of denoising techniques for ECG signals: A comparative
study," IEEE Transactions on Biomedical Engineering, vol. 62, no. 11, pp. 2736-2747, Nov. 2015. doi:
10.1109/TBME.2015.2439915
[21] S. Chen, J. Wang, and L. Zhang, "A novel QRS complex detection algorithm based on wavelet transform
and adaptive thresholding," IEEE Transactions on Biomedical Engineering, vol. 63, no. 3, pp. 547-556,
Mar. 2016. doi: 10.1109/TBME.2015.2455301
[22] R. Patel, A. Smith, and B. Johnson, "Real-time ECG monitoring systems: A comprehensive review,"
Journal of Biomedical Science and Engineering, vol. 10, no. 3, pp. 196-215, Mar. 2017. doi:
10.4236/jbise.2017.103014.
Fusion: Practice and Applications (FPA) Vol. 12, No. 02. PP. 172-184, 2023
184
Doi: https://doi.org/10.54216/FPA.120214
Received: January 25, 2023 Revised: April 16, 2023 Accepted: June 17, 2023
[23] L. Zhang, Y. Zhou, and X. Wang, "Feature extraction methods for ECG analysis: A comparative study,"
Computers in Biology and Medicine, vol. 89, pp. 389-398, Dec. 2017. doi:
10.1016/j.compbiomed.2017.08.028
[24] Y. Zhou, A. Smith, and J. Chen, "Wearable ECG technologies: A comprehensive review," IEEE Reviews
in Biomedical Engineering, vol. 11, pp. 205-218, 2018. doi: 10.1109/RBME.2018.2859498.
[25] X. Wang, Z. Li, and C. Zhang, "Comparative study of QRS complex detection algorithms," IEEE Access,
vol. 6, pp. 7700-7710, Nov. 2018. doi: 10.1109/ACCESS.2017.2783615
[26] A. Smith, B. Johnson, and D. Wang, "Advancements in wearable ECG devices for remote cardiac
monitoring," Journal of Biomedical Engineering, vol. 41, no. 2, pp. 89-100, Feb. 2018. doi: 10.1111/j.1754-
9485.2017. 02851.x
[27] D. Wang, Y. Zhang, and X. Li, "Enhanced Pan-Tompkins algorithm for accurate QRS complex detection,"
Journal of Medical Systems, vol. 43, no. 2, pp. 1-11, Feb. 2019. doi: 10.1007/s10916-018-1127-6.
[28] B. Johnson, A. Smith, and Y. Wang, "Development of an innovative ECG device prototype with improved
signal quality," IEEE Transactions on Biomedical Engineering, vol. 67, no. 4, pp. 1072-1081, Apr. 2020.
doi: 10.1109/TBME.2019.2925763
[29] Z. Liu, C. Zhang, and X. Wang, "Deep learning-based ECG analysis for arrhythmia detection," IEEE
Transactions on Neural Systems and Rehabilitation Engineering, vol. 28, no. 3, pp. 660-671, Mar. 2020.
doi: 10.1109/TNSRE.
on using Pan-Tompkins Algorithm and Hilbert Transform
with Real-Time ECG Signals," Academic Perspective Procedia, vol. 4, no. 1, pp. 307-315,
2021. doi.org/10.33793/acperpro.
[31] Y. Wang, Z. Li, and L. Zhang, "Clinical fusion: Integrating device design and algorithm development for
accurate ECG analysis," IEEE Access, vol. 8, pp. 11709-11718, May 2020. doi:
10.1109/ACCESS.2020.2969446 .
[32] Y. Zhang, A. Gu, Z. Xiao, Y. Xing, C. Yang, J. Li, and C. Liu, "Wearable fetal ECG monitoring system
from abdominal electrocardiography recording," Biosensors, vol. 12, no. 7, p. 475, 2022. doi:
10.3390/bios12070475.
[33] L. Ribeiro, P. da Costa, G. Paim, E. da Costa, S. Almeida, and S. Bampi, "VLSI Architecture for Energy-
Efficient and Accurate Pre-Processing Pan-Tompkins Design," IEEE Transactions on Circuits and Systems
II: Express Briefs, vol. 70, no. 8, pp. 1432-1436, Aug. 2023. doi: 10.1109/TCSII.2023.123456789.
[34] S. Khooyooz, M. A. A. Pajouh, and K. Azizi, "Fabrication of a Low-Cost Real-Time Mobile ECG System
for Health Monitoring," arXiv preprint , arXiv:2302.06272, 2023.
[35] R. Ranjan and V. K. Giri, "A unified approach of ECG signal analysis," Int. J. Softw. Comput. Eng., vol.
2, no. 3, pp. 47-52, 2012. doi: 10.7321/IJSCOE.2012.221006.
[36] M. Kotas, J. Jezewski, A. Matonia, and T. Kupka, "Towards noise immune detection of fetal QRS
complexes," Computer Methods and Programs in Biomedicine, vol. 97, no. 3, pp. 241-256, 2010. doi:
10.1016/j.cmpb.2009.08.005.
[37] S. Raj, K. C. Ray, and O. Shankar, "Development of robust, fast and efficient QRS complex detector: a
methodological review," Australasian Physical & Engineering Sciences in Medicine, vol. 41, no. 3, pp.
581-600, 2018. DOI: 10.1007/s13246-018-0645-7.
[38] J. Bali, A. Nandi, P. S. Hiremath, and P. G. Patil, "Detection of sleep apnea in ECG signal using Pan-
Tompkins algorithm and ANN classifiers," Compusoft, vol. 7, no. 11, pp. 2852-2861, 2018. doi:
10.6084/m9.figshare.7589227.
[39] M. Karri and C. S. R. Annavarapu, "A real-time embedded system to detect QRS-complex and
184arrhythmia classification using LSTM through hybridized features," Expert Systems with Applications,
vol. 214, p. 119221, 2023. doi: 10.1016/j.eswa.2022.119221.
... ECGs can be easily obtained through wearable devices or standard clinical procedures, making them a practical tool for continuous monitoring. Research by Jabbar et al. (2020) [16] highlights the utility of wearable ECG devices in capturing real-time data, enabling the timely detection of changes that may precede SCD. Research has shown that continuous ECG monitoring of patients with SCD, such as in the Massachusetts Institute of Technology-Beth Israel Hospital (MIT-BIH) SCD Holter database [17], may offer clues for predicting SCD events. ...
... The growing body of research demonstrates the potential of ECG-based methods [19]. Al-Jabbar et al. [16] successfully incorporated ECG analytic software based on the Pan-Tompkins algorithm for QRS detection into a wearable device, demonstrating the feasibility of continuous real-time automated ambulatory diagnosis of heart rhythm. Lopez et al. [20] integrated signal processing, nonlinear measurements, and a neural network into their ECG diagnostic model, which could predict with 94% accuracy SCD events 25 minutes before their occurrence. ...
... Both algorithms can be combined; one recent research used Discrete Wavelets Transform (DWT) as the denoising algorithm and Pan-Tompkins as the QRS detection algorithm [6]. Pan-Tompkins algorithm is an easily adapted algorithm that uses an adaptive threshold to detect QRS signals accurately, even in bad signal conditions [7][8][9][10][11][12][13]. Research about Pan-Tompkins shows that accuracy, sensitivity, and positive prediction of QRS complex detection perform well even in noisy signals [14,15]. ...
Article
Full-text available
Heart rate (HR) is vital for medical and healthcare purposes. This study presents an Android-based heart rate measurement system utilizing a single-lead electrocardiogram (ECG). Three electrodes placed on the arm in lead I configuration capture the ECG signals. An AD8232 sensor amplifies the signal, which is then digitized by Arduino Nano and transmitted to an Android device via HC-05 Bluetooth. The Android application processes the ECG data using the Pan-Tompkins algorithm with an optimized threshold coefficient to extract HR information. The system displays the ECG waveform and the calculated HR on the user interface. Our evaluation demonstrates high accuracy with an error rate of only 0.042%, sensitivity of 99.84%, and positive predictive value of 97.06%. This research suggests the potential of this system for convenient and reliable HR monitoring using readily available smartphones.
... Baseline drift is reduced through median filtering with windows of 200 and 600 ms. High-frequency noise is mitigated using a Savitzky-Golay filter [25], as shown in Fig. 2. To segment the ECG signals into individual heartbeats, we utilize the Pan-Tompkins algorithm [26], known for its effectiveness in detecting R-peaks, with the MIT-BIH Arrhythmia database providing the necessary annotations. Each heartbeat is represented by a 500 ms window, allowing for consistent data analysis and interpretation. ...
Article
Full-text available
This research introduces an innovative ensemble approach, combining Deep Residual Networks (ResNets) and Bidirectional Gated Recurrent Units (BiGRU), augmented with an Attention Mechanism, for the classification of heart arrhythmias. The escalating prevalence of cardiovascular diseases necessitates advanced diagnostic tools to enhance accuracy and efficiency. The model leverages the deep hierarchical feature extraction capabilities of ResNets, which are adept at identifying intricate patterns within electrocardiogram (ECG) data, while BiGRU layers capture the temporal dynamics essential for understanding the sequential nature of ECG signals. The integration of an Attention Mechanism refines the model’s focus on critical segments of ECG data, ensuring a nuanced analysis that highlights the most informative features for arrhythmia classification. Evaluated on a comprehensive dataset of 12-lead ECG recordings, our ensemble model demonstrates superior performance in distinguishing between various types of arrhythmias, with an accuracy of 98.4%, a precision of 98.1%, a recall of 98%, and an F-score of 98%. This novel combination of convolutional and recurrent neural networks, supplemented by attention-driven mechanisms, advances automated ECG analysis, contributing significantly to healthcare’s machine learning applications and presenting a step forward in developing non-invasive, efficient, and reliable tools for early diagnosis and management of heart diseases.
Article
Full-text available
Accurate classification of malignant and benign skin lesions is crucial in dermatology. In this novel research, we propose robust image analysis methodology for skin lesion classification that integrates color-based segmentation with luminosity analysis. Our approach is evaluated on a dataset of 400 skin images, with equal representation of malignant and benign samples. By computing mean color values for the Red Channel Color (RCC), Green Channel Color (GCC), and Blue Channel Color (BCC) in groups of 10 samples, we establish a classification range for precise diagnosis, this research introduces a novel dimension by harnessing the potential of the CIE Lab Color characteristics for skin lesion detection as the most reliable scale for distinguishing between benign and malignant samples. The smaller and more thought variety ranges saw in the glow examination improve difference and perceivability, consequently working with prevalent sore separation. By featuring the meaning of mean histograms for each variety channel, this complete exploration adds to propelling the area of dermatology and presents an imaginative methodology that holds guarantee for PC helped conclusion frameworks in skin malignant growth discovery.
Article
Full-text available
This paper presents a tagging model used the Segmentation map as reference regions. The suggested model leverages an encoder-decoder architecture combined with a proposal layer and dense layers for accurate object tagging and segmentation. The proposed model utilizes a pre-trained VGG16 encoder to extract high-level features from input images, followed by a decoder network that reconstructs the image. A proposal layer generates a binary map indicating the presence or absence of objects at each location in the image. The proposal layer is integrated with the decoder output and further refined by a convolutional layer to produce the final segmentation. Two dense layers are employed to predict object classes and bounding box coordinates. The model is trained using a custom loss function that combines categorical cross-entropy loss and means squared error loss. Experimental results demonstrate the effectiveness of the proposed model in achieving accurate object tagging and segmentation.
Article
Full-text available
Globally, hundred millions of person are affected of diabetes, whether Type-1-or Type-2-, affects people all over the world, and diabetes is a leading cause of mortality in many nations. Regular the level of sugar in the blood in both types assist to reduce the danger of diabetes hyperglycemia (blood sugar levels > 200 mg/dL) or hypoglycemia (blood sugar levels < 70 mg/dL) problems, for example, Kidney failure, heart problems, blindness, and even death are all possibilities. They need frequently check the sugar level of blood in a day. This is one of the most crucial challenges that diabetics often face to take a blood sample and measure the sugar level daily. Numerous non-invasive methods have been proposed to solve this problem. Most previous articles are inaccuracy and most of these studies independent on blood directly. The objectives of this research are to design and implement a prototype of a wearable (UWB) non-invasive system that can prevent infections with low cost and low complexity, to minimize the error in readings of patients when they use invasive or non-invasive ways to improve the lifestyle and To find a certain technique that can be used in vast field with the patient himself at any time. The proposed UWB has been achieved an integrated easy, flexible, wearable and good accuracy. The UWB outperformed previously implemented systems shown in earlier works, both in terms of easy to use and low cost.
Article
Full-text available
Fetal electrocardiography (ECG) monitoring during pregnancy can provide crucial information for assessing the fetus’s health status and making timely decisions. This paper proposes a portable ECG monitoring system to record the abdominal ECG (AECG) of the pregnant woman, comprising both maternal ECG (MECG) and fetal ECG (FECG), which could be applied to fetal heart rate (FHR) monitoring at the home setting. The ECG monitoring system is based on data acquisition circuits, data transmission module, and signal analysis platform, which consists of low input-referred noise, high input impedance, and high resolution. The combination of the adaptive dual threshold (ADT) and the independent component analysis (ICA) algorithm is employed to extract the FECG from the AECG signals. To validate the performance of the proposed system, AECG is recorded and analyzed of pregnant women in three different postures (supine, seated, and standing). The result shows that the proposed system can record the AECG in different postures with good signal quality and high accuracy in fetal ECG and heart rate information. Sensitivity (Se), positive predictive accuracy (PPV), accuracy (ACC), and their harmonic mean (F1) are utilized as the metrics to evaluate the performance of the fetal QRS (fQRS) complexes extraction. The average Se, PPV, ACC, and F1 score are 99.62%, 97.90%, 97.40%, and 98.66% for the fQRS complexes extraction,, respectively. This paper shows the proposed system has a promising application in fetal health monitoring.
Article
Full-text available
The scan of functional Magnetic Resonance Imaging (fMRI) can provide three views for brain activities. These views are basically the X_axis (sagittal Plane), Y_axis (coronal plane) and Z_axis (axial plane). To the best of the obtained knowledge, studying brain activities for all of these views has not been considered before together with Deep Learning (DL) techniques. In this paper, various DL models named the X_axis Classification Model (XCM), Y_axis Classification Model (YCM) and Z_axis Classification Model (ZCM) are proposed. Each of these models is able to classify between the vision, movement and forward brain activities. Extensive experiments are performed for examining their parameters. The designed models have the capability to automatically detect the important features without any human supervision. In addition, they can provide intelligent decisions or classifications. Furthermore, effective combination method is suggested based on the Genetic Algorithm (GA) and Genetic Weighted Summation (GWS) rule, where high performances of outcomes can be achieved. After extensive experiments, the accuracies of 91.67%, 89.88% and 91.67% have been obtained for the XCM, YCM and ZCM, respectively. In addition, the accuracy has been raised to 97.22% by applying the suggested fusion method. .
Article
Full-text available
Abstract: In this paper, a novel methodology for Sleep apnea detection is proposed using ECG signal analysis. It involves the following sequential procedure: Pre-processing using digital filters, Peak or QRS complex detection using Pan-Tompkins algorithm, Feature extraction from detected QRS complex, Reduction of features using Principal Component Analysis (PCA) and finally the Classification using Artificial Neural Networks (ANNs). The result of classification of the input ECG signal record is as either belonging to apnea or normal category. For experimentation, the ECG-Apnea database from MIT‟s Physionet.org is used. The performance measures of Peak or QRS complex detection are Accuracy(Acc)=94%, Sensitivity(Se)=95%, Specificity(Sp)= 93% and Precision ( Pr) = 92%. The PCA is applied on the set of time and frequency features of ECG signal to achieve dimensionality reduction and thus reduce the computational time cost, both in training and testing phase of classification by 43% and 33% respectively. The performance of ANN clasifier trained using Scaled Conjugate Gradient (ANN_SCG) has marginally improved values of Acc, Se, Sp, Pr and F-measure , where as the execution time is significantly reduced by 66% as compared to that of ANN classifier trained with Levenberg-Marquardt algorithm (ANN_LM). The experimental results demonstrate the effectiveness of the proposed method in terms of significantly reduced time cost even as compared with two of the published results. Keywords: ECG-Apnea database; Pan-Tompkins algorithm; Principal Component Analysis; Artificial Neural Networks; Levenberg–Marquardt algorithm; Scaled Conjugate Gradient algorithm.
Article
The electrocardiogram (ECG) is an extremely valuable medical examination for monitoring cardiac disorders. The QRS waves on the ECG signal are essential in diagnosing these disorders. While numerous algorithms for detecting R-peaks/QRS complexes are developed, most are focused on complex computations that need off-line execution on a PC. However, advancements in telemedicine and wearable devices require an algorithm that runs effectively on an embedded system. This paper aims to design and develop an embedded system to detect the QRS complex and arrhythmia classification based on the patient-specific ECG data. The proposed model is based on the Discrete Wavelet Transform (DWT), Delta Sigma Modulation (DSM) with local maximum/minimum point algorithm to detect R peak/QRS complex. It extracts several R peaks/QRS complex features, such as the waves peak, onset, offset, and duration between consecutive R peaks (RR interval), and uses these to improve classification accuracy. We proposed Long Short Term Memory (LSTM) neural network for arrhythmia classification. First, the ECG signal is extracted through the embedded system and used for further processes. Second, the QRS complex/R peak is detected using modulated bitstreams, threshold level through DSM and DWT, respectively. Thirdly, the extracted features are hybridized and input into an LSTM for arrhythmia classification. The MIT-BIH database was used to evaluate the algorithm’s performance, and the accuracy, positive predictivity, sensitivity, and F1 score were evaluated as performance metrics. The algorithm achieved 99.64%, 99.15%, 99.87%, and 98.18% for all four metrics, respectively. The algorithm was then executed on an embedded system, and its run time and power consumption were examined. The DSM algorithm detects QRS waves in 17.2 ms, while the DWT method detects R peak in 14.02 ms. The proposed LSTM algorithm takes 58 ms for classification. The DSM chip (MCP3008 ADC) consumes 680 nW of power at a sampling rate of 500 Hz. Additionally, the algorithm’s performance was compared to those of other widely used algorithms. The suggested approach holds considerable promise for long-term monitoring in wearable systems.
Article
The human brain serves as the nervous system's command center and controller. It controls many vital and functional processes in the human body. The functional MRI or functional Magnetic Resonance Imaging (fMRI) detects alterations in blood flow and uses that information to calculate brain activity. The three planes of fMRI are used to describe a human's anatomical position. The fundamental orientations are as follows: sagittal plane, often known as the longitudinal plane, splits the body into right and left halves; coronal plane is vertical plane that runs from side to side, separating the body or any of its parts into front and posterior halves, (is known as the frontal plane). axial plane or transverse plane (sometimes known as the horizontal plane or trans axial plane) separates the body into superior and inferior sections. In this article, we propose three tasks to identify pre-frontal, visual, and movement brain processes using a Deep Learning (DL) model called the Axial Plane Classification Model (APCM). The anatomic axial section in brain is a two-dimensional view of the aspect of the inferior section that is superior. This section is important to demonstrate a variety of unique than overlapping structures closely related and controlling the tasks of movement, vision and decision-making in brain deep. After extensive experiments, promising accuracies of 97% have successfully been obtained for APCM model.
Article
The bio-potentials generated by the muscles of the heart result in an electrical signal called electrocardiogram (ECG). It is one of the most important physiological parameter, which is being extensively used for knowing the state of the cardiac patients. Feature extraction of ECG is most essential task in the manual and automated ECG analysis for use in instruments like ECG monitors, Holter tape recorders and scanners, ambulatory ECG recorders and analysers. Recently, artificial intelligent tools such as neural networks, genetic algorithms, fuzzy systems, and expert systems have frequently been reported for detection and diagnostic tasks. This paper, therefore, is an attempt to review the work done by the different researchers in the area of ECG signal processing, analysis and interpretation during last five decades.
Proposed in-training electrocardiogram interpretation competencies for undergraduate and postgraduate trainees
  • P Antiperovitch
P. Antiperovitch et al., "Proposed in-training electrocardiogram interpretation competencies for undergraduate and postgraduate trainees," Journal of Hospital Medicine, vol. 13, no. 3, pp. 185-193, 2018. doi: 10.12788/jhm.2937.
HeartSaver: A mobile cardiac monitoring system for auto-detection of atrial fibrillation, myocardial infarction, and atrio-ventricular block
  • Z Sankari
  • H Adeli
Z. Sankari and H. Adeli, "HeartSaver: A mobile cardiac monitoring system for auto-detection of atrial fibrillation, myocardial infarction, and atrio-ventricular block," Computers in biology and medicine, vol. 41, no. 4, pp. 211-220, 2011. doi: 10.1016/j.compbiomed.2011.02.010.
ECG beat classification using fuzzy support vector machines
  • C N Lee
  • C.-W Huang
  • C.-Y. Chen
C. N. Lee, C.-W. Huang, and C.-Y. Chen, "ECG beat classification using fuzzy support vector machines," in IEEE Transactions on Information Technology in Biomedicine, vol. 12, no. 4, pp. 447-458, Jul. 2008. doi: 10.1109/TITB.2007.899489