SlideShare a Scribd company logo
1 of 14
Download to read offline
International Journal of Electrical and Computer Engineering (IJECE)
Vol. 14, No. 2, April 2024, pp. 1530~1543
ISSN: 2088-8708, DOI: 10.11591/ijece.v14i2.pp1530-1543  1530
Journal homepage: http://ijece.iaescore.com
Electrocardiogram signal processing algorithm on
microcontroller using wavelet transform method
Akkachai Phuphanin, Metha Tasakorn, Jeerapong Srivichai
Department of Electrical Engineering, Faculty of Industry and Technology, Rajamangala University of Technology Isan,
Sakon Nakhon, Thailand
Article Info ABSTRACT
Article history:
Received Sep 7, 2023
Revised Oct 26, 2023
Accepted Nov 17, 2023
The electrocardiogram (ECG) is an important parameter for analyzing the
cardiac system. It serves as the primary diagnostic tool for patients with
suspected heart disease, guiding appropriate cardiac investigations according
to the disease or condition suspected. However, ECG measurements may
generate noise, leading to false diagnoses. The wavelet transform is an
effective and widely-used technique for eliminating noise. Typically,
analysis and generation algorithms are developed on computer and using
software built in. This paper presents a noise elimination algorithm based on
the wavelet transform method, designed to operate on resource-limited Node
microcontroller unit (MCU). An efficiency study was conducted to
determine the optimum mother wavelet implementation of the algorithm,
and the results showed that, when considering synthetic ECG signals, db4
was the most suitable for eliminating interference by achieving the highest
signal to noise ratio (SNR) and correlation coefficient. In addition, this
algorithm prototype can analyze ECG signals using the wavelet transform
method processed in a microcontroller and is accurate compared to reliable
programs. It has the potential to be further developed into a low-cost
portable ECG signal measurement tool for use in remote medicine,
healthcare facilities in resource-limited areas, education and training, as well
as home monitoring for chronic patients.
Keywords:
De-noise signal
Electrocardiogram
Microcontroller
Mother wavelet
Signal processing
Wavelet transform
This is an open access article under the CC BY-SA license.
Corresponding Author:
Akkachai Phuphanin
Department of Electrical Engineering, Faculty of Industry and Technology, Rajamangala University of
Technology Isan
Sakon Nakhon Campus, 47160, Thailand
Email: akkachai.ph@rmuti.ac.th
1. INTRODUCTION
Medical professionals and patients may be shielded from coronavirus disease starting in 2019
(COVID-19) exposure by telemedicine and eHealth platforms, which use high-speed communications
networks and application software for the delivery, management, and monitoring of medical services [1]. It is
evident that eHealth and telemedicine systems are crucial for addressing COVID-19 on a worldwide scale
[2]. As the disease spreads around the globe, medical facilities utilize telemedicine and eHealth platforms in a
variety of ways to improve patient care [3]. These include decreased medical expenses, diminished worker
tiredness, more worker sustainability, diminished physician exposure, and diminished need of personal
protective equipment (PPE) suits, such as dust filter masks and respirators [4].
In addition to the remote medical software platform, there are algorithms embedded in the remote
medical system. An algorithm that makes it easier to administer patient summaries that have been analyzed
by remote analytics [5], [6]. In order to deliver the most recent information, artificial intelligence (AI)
Int J Elec & Comp Eng ISSN: 2088-8708 
Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin)
1531
chatbot is used. Regarding COVID-19, it offers prevention recommendations as well as potential societal
remedies. It also provides real-time situation reports to medical practitioners [5]. A COVID-19 screening tool
is now being developed using AI to offer preliminary testing for patients with symptoms. and, if required,
suggest additional medical care. However, when there is sufficient and reliable data, both application
software platforms and AI chatbots will become more valuable and significant. As a result, a lot of research
has been done on developing mobile medical devices that include internet of things (IoT) technologies.
Patients can independently measure the fundamental variables required for diagnosis and transmission to
medical staff.
One of the most crucial physiological measures is pulse. The term "pulse" describes the pressure
produced as blood vessels expand and same in time with the heart's rhythmic contraction and expansion.
Therefore, the blood flow wave in the aorta that causes an aneurysm is caused by pulse rate [6]. Thus, heart
rate can be determined using pulse physiological parameters [7]. The study [6] presented an autonomous bed
shifting system for long-term bedridden patients using the patient's pulse rate as a measure of discomfort.
Disease monitoring is necessary because some medical problems necessitate long-term patient care,
especially in the case of chronic diseases [8]. Therefore, it is crucial to continuously check for such
occurrences. The monitoring of blood sugar levels, for instance, will vary depending on the individual. This
aids in scheduling activities, medications, and meals [9]. The architecture system was created using sensing
technology. The technology attempts to deliver real-time information on glucose levels and body
temperature. This also contains other data such as environmental temperature. This information is presented
graphically and is easily legible by humans for end users such as patients and healthcare professionals. A
remote monitoring system for individuals with persistent metabolic problems is described in the paper [8].
These include blood pressure and glucose monitors, smart scales, pulse oximeters, activity trackers, and
blood pressure monitors. The device is also capable of performing analyses that will help with medical
diagnostics.
Tele-ECG is a new IoT-based electrocardiogram (ECG) monitoring device that enables remote
medical monitoring of the condition of the heart [10]. The systems are still inferior to instruments used by
experts. However, by monitoring the patient's ECG over time, the procedure offers basic surveillance. The
ECG, which displays the heart's recorded electrical activity via electrodes on the body's surface, is thought to
be one of the most recognizable representations of heart function [10]. Heart electrical activity and heart rate
fluctuations are measured by physiological parameters ECG [11].
Applications for IoT and health surveillance are presented in the research [12]. Through sensors and
portable devices, the system is intended to capture ECG data together with other healthcare data. The author
also discusses on safely uploading these data to the cloud. This enables immediate access to medical
specialists. Given that earlier systems were expensive and had huge mounting locations, some researchers
[11] have suggested a 12-lead ECG system. Because of this, the suggested solution is portable and has
produced successful outcomes for home isolate systems. Additionally, ECG data can be sent from a distant
area to any point in the world to a medical specialist. Neyja et al. [13] proposed low-cost ECG health
monitoring system using internet of things with automated analytics and alarms includes energy-efficient
wearable sensor devices. The systems are linked to a smart gateway that can be accessed by cardiovascular
caregivers.
To monitor patients' ECG signals using a mobile tele-ECG application and do health assessments
without a doctor's involvement, was developed by Choudhari et al. [10]. The hidden Markov model (HMM)
and ECG sensors-based healthcare system implementation proposal was proposed by Nurdin et al. [14] with
the intention of enhancing patient monitoring and immediate patient assistance in case patients with diseases
related to the cardiovascular system. The construction of an ECG monitoring system was then described by
Rizqyawan et al. [15], in which the user can use the system while ECG signals are being transmitted. Finally,
D’Aloia et al. [16] suggested that the design, execution, and development of ECG follow-up research.
According to research articles [10]–[16], it is a remote medical system that transmits ECG signals
obtained from sensors and transmitted via the Internet to medical personnel via the internet of things. These
studies, however, only send the raw sensor data collected from them without filtering the ECG signal, which
can result in inaccuracies in the ECG. The medical professionals will diagnose patients incorrectly if they
receive muddled signals because of noise. Only study [12], [14] suggested a technique to measure R-R peaks
to calculate heart rate, and the algorithm may be prone to errors if the ECG data contains noise.
The measured ECG readings are contaminated by noise. ECG noise can take many different forms,
including: Random noise called as gaussian noise occurs during transmission, Muscular artifacts or noise
caused by muscle contractions (MA). Electrode motion interference caused by the movement of the body,
which moves the electrode and amplifies the signal. The chest region moves equally as a result of breathing,
creating baseline wander (BW) noise [17]. The ECG activity data is obscured by all four noises, which can
also lead to incorrect heart rate estimations and difficult R peak detection.
 ISSN: 2088-8708
Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543
1532
In paper [18] discusses the results of using different types of wavelet filters with various thresholds
and levels to de-noise ECG signals. The study concludes that the wavelet filter is a good choice for de-
noising ECG signals due to its ability to suit many signals and applications. However, it is crucial to choose
the appropriate wavelet filter type that is similar to the signal in shape or close to its shape. The study finds
that the four-level Daubechies (db4) type is optimal for the Massachusetts institute of technology-Beth Israel
arrhythmia (MIT-BIH) database, while the level two of Symlets 4 (sym4) is suitable for ECG signals from
the monitoring system. The discrete wavelet transform (DWT) based wavelet denoising technique is used
with three different wavelet functions and four different thresholding methods [19]. The study involved the
analysis of ECG signals collected from a cohort of ten female participants aged between 20 and 25 years.
These signals were obtained while employing the Stroop color-word test as a means of inducing mental
stress. The result shows that the Coiflets 5 (coif5) wavelet function and the and rigrsure thresholding rule are
the most effective for removing noise from ECG signals, as demonstrated.
Within the scope of study [20], an innovative approach is introduced for the purpose of reducing
noise in ECG signals through the utilization of wavelets. The methodology centers around the application of
a genetic algorithm, which systematically explores an extensive array of quadrature filter banks. Its objective
is to identify the optimal filter bank that results in the minimal signal-to-noise ratio (SNR). Consequently, the
wavelet and scaling functions associated with the selected filters are acknowledged as the most effective
choice for achieving the task of de-noising. Simulation results show that using the proposed method and the
obtained wavelet improves the SNR of the noisy ECG signal by about 2.5 dB. While Majumdar [21]
describes a proposed method for de-noising ECG signals using wavelet energy and a sub-band smoothing
filter. In contrast to the conventional approach of wavelet threshold de-noising, this novel method exclusively
targets wavelet coefficients necessitating threshold de-noising, determined through wavelet energy analysis.
Meanwhile, it retains the original values of other coefficients. Furthermore, the technique incorporates a
sub-band smoothing filter to amplify the ECG signal's quality through advanced noise reduction. The
experimental results show that the proposed method effectively removes noise from the noisy ECG signals
compared to existing methods.
In recent years, advancements in medical research have led to significant breakthroughs in the field
of cardiac health and diagnostics. One notable area of progress has been the development of innovative
techniques for analyzing ECG signals, aiming to detect critical features like the QRS complex and R-peaks
with remarkable accuracy and efficiency. Research such as study [22] highlights the integration of chaos
analysis, short-time Fourier transform (STFT), and principal component analysis (PCA) to automate QRS
complex detection, offering impressive sensitivity and accuracy rates. In a similar vein, Gupta et al. [23]
introduces a novel application of PCA for R-peak detection, avoiding the need for pre-processing in noisy
ECG signals. Meanwhile, Gupta et al. [24] presents a computer-aided diagnosis system utilizing chaos
analysis to extract non-linear patterns in ECG signals, enhancing arrhythmia detection. Beyond ECG
analysis, other studies such as studies [25] and [26] apply machine learning techniques to retinal blood vessel
segmentation and the identification of high-risk carotid artery plaques, demonstrating the potential for
automated disease detection and prevention. Additionally, research like [27] explores the importance of
collateral circulation in preserving myocardium during coronary artery occlusion, emphasizing the need for
accurate collateral flow assessment in surgical planning. Furthermore, Li et al. [28] introduces a motion
compensation method for 3D coronary artery reconstruction, which proves effective in reducing artifacts and
improving image quality. Finally, Velut et al. [29] analyzes coronary trees using magnetic resonance
angiography (MRA) to estimate the capability of MRA in providing insights into the vascular network. This
collective body of research represents a significant leap forward in the diagnosis and treatment of cardiovascular
and arterial conditions, promising enhanced accuracy, automation, and patient care in the field of cardiac health.
The utilization of wavelet transform, an advanced and effective technique for noise reduction, has
gained prominence in enhancing the performance of ECG signal processing algorithms, as demonstrated in
previous studies [18]-[29]. However, it is noteworthy that, up to this point, wavelet transform-based signal
processing has primarily been confined to traditional computer-based processing platforms and software
applications like MATLAB and LabVIEW. One notable gap in the existing research landscape is the limited
exploration of implementing wavelet transform algorithms for ECG signal processing within embedded
systems, specifically microcontrollers. To date, there has been a dearth of investigations into the adaptation
of wavelet transform techniques to microcontroller-based ECG signal processing. This represents an
uncharted territory in which the potential benefits of wavelet transform, known for its efficacy in noise
reduction, have yet to be fully realized. Therefore, this research endeavors to bridge this gap by presenting a
novel approach: the application of wavelet transforms principles for ECG signal processing on a
microcontroller, specifically the node MCU. This pioneering effort seeks to unlock the advantages of wavelet
transform in noise elimination within the context of resource-constrained embedded systems, potentially
extending its utility to a broader range of real-world applications.
Int J Elec & Comp Eng ISSN: 2088-8708 
Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin)
1533
2. ECG SIGNAL PROCESSING PROCESS
There is noise in the measured ECG data. A data processing step is required to get rid of the noise
and get a clear signal. Signal processing entails two steps: Wideband noise removal and baseline wandering
noise removal both employ the wavelet transform approach. Wavelet transform: wavelet transform is a
commonly used method for signal estimation [30], [31] and signal compression [32]. Since the Fourier
transform simply analyzes the signal in terms of frequency, the wavelet transform transforms the signal to be
considered in terms of position and frequency [30]. So, the wavelet transforms signal exhibits less distortion
as a result. The ECG signal is also a type of non-stationary signal since it represents the electrical activity of
the heart during each heartbeat, which changes over time [33]. A Fourier transform that is appropriate for the
analysis of discrete signals is therefore inappropriate. The wavelet transform's foundation is the extraction of
the signal's edge components so that each sub-characteristics components can be considered [31]. Definition
of wavelet transformation in mathematics constant is
π‘Š(π‘Ž, 𝑏) = ∫ 𝑓(𝑑)πœ“π‘Ž,𝑏(𝑑)𝑑𝑑
∞
βˆ’βˆž
(1)
πœ“π‘Ž,𝑏(𝑑) =
1
βˆšπ‘Ž
πœ“βˆ—
(
π‘‘βˆ’π‘
π‘Ž
) (2)
When 𝑓(𝑑) is signal, πœ“π‘Ž,𝑏(𝑑) is an analytical function with a time shift, scalability feature. In
practice, we can use the discreate wavelet transform to calculate the coefficients for each order of
subcomponents (decomposition). The decomposition can use a set of finite impulse response (FIR) filters that
act as low pass filters and high pass filters. Then, reduce the sample frequency in half (down sampling). It is
possible to employ the discrete wavelet transform algebraically; the fundamental convolution procedures are
given
π‘Žπ‘›
(𝑖)
= βˆ‘ π‘”π‘˜π‘Ž2π‘›βˆ’π‘˜
(π‘–βˆ’1)
𝑖 = 1, 2, … , 𝑗
π‘βˆ’1
π‘˜=0 (3)
𝑑𝑛
(𝑖)
= βˆ‘ β„Žπ‘˜π‘Ž2π‘›βˆ’π‘˜
(π‘–βˆ’1)
π‘Žπ‘›
(0)
= π‘₯𝑛
π‘βˆ’1
π‘˜=0 (4)
When π‘Žπ‘›
(𝑖)
is approximation coefficients in component 𝑖 of low pass filters and 𝑑𝑛
(𝑖)
is detail coefficients in
component 𝑖 of high pass filters. For input signal N and the coefficient of the low-pass filter (π‘”π‘˜) and high
pass filter (β„Žπ‘˜) defined by the mother wave function [34]. The Daubechies 6 function (db06), which has a
signal structure resembling the ECG signal, was used for this study [35].
3. ECG SIGNAL PROCESSING ALGORITHM ON NODE MCU
An algorithm for ECG signal analysis using wavelet transform techniques on a node MCU
microcontroller consists of five blocks: ECG signal acquisition, moving average, wavelet transform, peak
detection, and heart rate calculation, as shown in Figure 1. The signal acquisition function stores the ECG
signal (block 1), which has a frequency of 125 Hz, in a data array. The data array requires two R-peaks for
heart rate calculations. To accurately capture both peaks of the heart rate data, a minimum of 200 data points
need to be collected in the array. Nonetheless, if the number of arrays is fewer than 200, it is possible that
two R-peaks may not be present in the louder array, potentially leading to erroneous heart rate calculations by
the algorithm. The captured ECG signal is affected by two types of noise: baseline noise, caused by breathing
or body movements, which has a low frequency, and wideband noise, caused by muscle artifacts and
instrumentation noise. Baseline noise and wideband noise are two types of noise that can affect the quality of
an electrocardiogram (ECG) signal. ECG is a vital medical test used to record the electrical activity of the
heart over time. Noise in the ECG signal can obscure important information and make it difficult to interpret
the results accurately. Therefore, both signals are incorporated into the original data for processing, allowing
us to assess the effectiveness of our proposed algorithm. Hence, within the program designed for embedded
into the microcontroller, it utilizes a total of 54,886 bytes of global memory (equivalent to 67% of the total
memory). In our simulation, all 10-second ECG signals are stored on an external memory card. The Node
MCU reads the data from the memory card and stores it in a data buffer as if it were reading from an ECG
sensor. When executing a single cycle of the program to process ECG signals, the average total execution
time is 249 milliseconds. This duration is deemed suitable for real-time display should the algorithm be
employed in real-life scenarios in the future.
The moving average function (block 2) is an alternative form of averaging that differs from the
conventional averaging method in which all data are averaged. Moving averages employ a fixed number of
windows to average and shift the windows according to the position of the data. In signal processing, moving
 ISSN: 2088-8708
Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543
1534
averages are utilized to smooth signals from short-term overshoots or fluctuations caused by noise, serving as
a high-pass filter. However, there exist filters that are more effective than moving average filters but are also
more complex and unwieldy. Thus, to reduce complexity and processing time to suit the capabilities of the
node MCU, this article utilizes a moving average for baseline noise elimination. Figure 2 illustrates the
working process of the moving average function. The process begins by initializing the window size to 49
and calculating the mean of the data in the window range. By adjusting the size of the moving window, you
can control the degree of noise reduction versus the level of detail preservation. Larger window sizes result in
greater noise reduction but can also smooth out genuine signal variations. Window scaling experiments show
that a window size of 49 is suitable for eliminating low-frequency noise generated in ECG signals. A window
size of 49 was chosen for the implementation of the moving average filter to effectively mitigate low-
frequency noise, such as baseline noise, in our simulations. The mean is computed using the position of the
data as the middle position of that window, and the position of the data is shifted until it reaches the data in
the last position. As a result of the moving average, we obtain a signal that resembles baseline noise.
Consequently, when we subtract this signal from the noisy ECG signal, we eliminate the baseline noise.
However, it is important to note that while moving average filters are effective for reducing low-frequency
noise, they may not be as effective at removing high-frequency noise or preserving sharp transitions in the
signal. The choice of filter type and parameters should be based on the specific characteristics of the noise
and the desired signal fidelity. Hence, an additional step is necessary to eliminate noise by employing
wavelet transform.
Figure 1. Flow diagram of algorithm ECG signal processing on Node MCU
Initialization: window=49, sum=0, k=0
for i=0 until i<length of ECG_noise
for j= –(window–1)/2 until j=(window–1)/2
if (i–j) not in range of ECG_noise
do nothing;
else
sum=sum+ECG_noise(i–j);
k=k+1;
end if
end for
base_line(i)=sum/k;
ECG_remove_baseline(i)=ECG_noise(i)–base_line(i);
k=0;
end for
Figure 2. Pseudo code of moving average part
In wavelet transform function (block 3), a wideband noise elimination technique using wavelet
transform is employed. The wavelet transform is utilized to decompose a signal into its frequency
components, similar to the Fourier transform. However, the Fourier transform only provides the frequencies
contained in the signal and may not be applicable to all signals, such as ECG signals with sudden changes of
short duration. In contrast, wavelet transformation separates time-domain signal components by utilizing two
Int J Elec & Comp Eng ISSN: 2088-8708 
Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin)
1535
fundamental properties: scale and location. While the Fourier transform primarily provides frequency
information, the wavelet transform exhibits a distinct advantage when applied to signals characterized by
abrupt, short-duration changes, as is often the case with ECG signals. It is worth emphasizing that the
wavelet transform provides a dual perspective, offering insights into both frequency and time-domain
characteristics, rendering it particularly well-suited for the comprehensive analysis of ECG signals.
Moreover, wavelet transformations reduce the size of the data to half of the original size while preserving all
important characteristics. Therefore, wavelet transform was chosen to eliminate wideband confounding.
Figure 3 illustrates the discrete wavelet transform utilizing the convolution principle. The input signal (x) that
has been processed with baseline noise is convolved with the signal h, which is the filter coefficient of the
mother wavelet. The convolution process results in a signal with a length of (x) + length (mother wave) – 1.
Only the odd-numbered indices, which are the sum of the low-frequency component signals, are selected
from this result, known as the approximation coefficients. The approximation coefficients eliminate
wideband noise and reduce the size of the ECG signal by half, while preserving its essential characteristics.
This process also reduces the time required to calculate the maximum peak in the next step.
Initialization: Size of variable x, y, z =length of (x+h)–1
for i=0 until i<length of x
for j=0 until j≀i
y(i)=y(i)+x(j)*h(i–j);
end for
end for
ECG_decomposition=odd index of y
Figure 3. Pseudo code of wavelet transform part
The function 4,5 in ECG signal processing is peak detection (block 4) and the calculation of the
heart rate (block 5) value of the data set. As the ECG signal data stored in the array (ECG_decomposition
array) only has two peaks, we can split the data into two parts and determine the maximum value in each
segment. The highest value in the first part corresponds to the highest peak R1, and the highest value in the
second part corresponds to the highest peak R2. The program will then store the position of each peak value.
The position values of the two R peaks are subsequently subtracted to determine the time difference, which is
then multiplied by 0.016 (βˆ†T=1/62.5) to find the heart rate frequency, expressed as the number of beats per
minute by multiplying by 60 seconds. This process is show in Figure 4.
Initialization: peak_1=0; peak_2=0;
Pos_peak1=0; Pos_peak2=0;
for i=0 until length(ECG_decomposition)/2
if ECG_decomposition(i)>peak_1
Pos_peak1=i;
end if
end for
for i=length(ECG_decomposition)/2 until length(ECG_decomposition)
if ECG_decomposition(i)>peak_2
Pos_peak2=i;
end if
end for
HR=(1/(Pos_peak2–Pos_peak2)*0.016)*60;
Figure 4. Pseudo code of peak detection part and heartrate calculation
4. RESULTS AND DISCUSSION
As part of the experimental and performance analysis, as well as validation of the algorithm for
analyzing ECG signals using the wavelet transform technique developed for use on the node MCU board
presented in this article. We have divided the experiment into two parts to study the efficiency of using the
wavelet transform principle for noise elimination in ECG signals. Part one validates the noise elimination
algorithm for node MCU compared to reliable wavelet transform programs. The second part examines the
algorithm's performance against the normal human heart rate range (65-85 bpm), and analyzes and tests the
performance of the selected mother wavelet for synthetic ECG signal analysis.
 ISSN: 2088-8708
Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543
1536
To validate the ECG signal analysis algorithm employing the wavelet transform method
implemented on the node MCU board, we performed a comparative analysis of the results with a widely
recognized function in the reliable computer programs, known for its established credibility in ECG signal
analysis. Figure 5 illustrates an example of the comparative results, showing that the ECG signal analysis
algorithm utilizing the wavelet transform technique, executed on the node MCU board, exhibits similarities
to the use of pre-existing functions in reliable computer programs, with a correlation coefficient of 0.99. The
correlation coefficient indicates that the ECG signals processed by the algorithm running on the node MCU
exhibit similarity to those processed using the function within the robust program. This observation serves as
empirical evidence supporting the correctness and suitability of the wavelet transform algorithm implemented
on the node MCU for ECG signal analysis.
Figure 5. Comparison of the results of wavelet (Micro) with the function of computer programs
The second part of our study aims to analyze the selection of an appropriate mother wavelet for
processing ECG signals without interference to validate the true capabilities of the ECG signal processing
algorithms. To simulate pure ECG signals without any interference, we generated a simulated ECG signal
with varying heart rates of 65, 70, 75, 80, and 85 beats per minute at a sampling frequency of 125 Hz.
Investigating algorithm efficiency often involves introducing noise to the original signal. In a previous study
[36], noise was incorporated within a range of -12 to 12 dB to assess the performance of beat detection
algorithms. In our current research, we have introduced two specific types of noise: baseline noise with an
amplitude of 50 mV and wideband noise with a power level of 15 dB. Figure 6 provides an example of a
simulated ECG signal with a heart rate of 85 beats per minute. Figure 5 has been to visually represent the
ECG signal illustrating the efficacy of a window size of 49 in effectively eliminating the baseline noise in
Figure 6.
Figure 6. Synthetic ECG and Noisy synthetic ECG with heart rate 85 bmp
As mentioned earlier, the wavelet transform method relies on wavelet coefficients that function as
weights for each frequency component level. Therefore, it is essential to select a coefficient function for the
mother wavelet that is suitable for the signal being processed. However, previous studies have shown that the
use of different mother wavelets for ECG signal analysis yields varying performance results. Since ECG
signal analysis and noise elimination are typically performed on computers with ample computational
resources, wavelet transform method can be applied at multiple levels to obtain the best possible signal.
However, due to resource constraints on microcontroller boards, the ECG signal analysis algorithm presented
-100
0
100
200
300
400
0 1 2 3 4 5 6 7 8 9 10
ECG
(mV)
Time (sec)
Wavelet (computer programs) Wavelet (Micro)
-100
0
100
200
300
400
0 1 2 3 4 5 6 7 8 9 10
ECG
(mV)
Time (sec)
Original Noisy
Int J Elec & Comp Eng ISSN: 2088-8708 
Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin)
1537
here only performs a one-level wavelet transform. Therefore, to determine the most efficient and suitable
mother wavelet for the ECG signal analysis algorithm, we apply the wavelet transform method on a
microcontroller board. We evaluate the performance of several commonly used mother wavelets, including
db4, db5, db9, coif5, bior3.3, and Sym4, which have demonstrated high efficiency in past research.
Additionally, we test the basic mother wavelet Haar, which has the fewest coefficients among the mother
wavelets and requires less memory, to assess its performance and compare it with the other mother wavelets
commonly used for analyzing ECG signals. The choice of mother wavelets, including Harr, db4, db5, db9,
coif5, bior3.3, and Sym4, for evaluating their performance in ECG noise elimination is based on several
factors relevant to wavelet analysis and signal processing. These wavelets are part of a broader family of
wavelets with distinct properties, and their selection is motivated by various considerations. Firstly, the
selected wavelets belong to different wavelet families (e.g., Daubechies, Coifman, Biorthogonal, Symlet),
each characterized by unique properties and filtering capabilities. This diversity enables us to investigate the
influence of various wavelet families on the efficacy of ECG noise elimination. Figures 7 to 13 depicts a
comparison between the original ECG signal and the ECG signal processed to eliminate noise by the wavelet
transform method using different mother wavelets, namely Harr, db4, db5, db9, coif5, bior3.3, and Sym4. As
observed from the figure, the signal processing technique successfully eliminates the baseline noise with an
amplitude of 50 mV. However, for the wideband noise, the power of 15 dB can be eliminated but still leaving
a little amount. Moreover, the wavelet transform method resulted in higher amplitude peaks of ECG signals
Q, R, S, and T. However, the lowest amplitude P peak, which is close to the amplitude of the wideband noise,
is almost absent.
Figure 7. Result of ECG data processing algorithm using Harr wavelet with heart rate 85 bmp
Figure 8. Result of ECG data processing algorithm using db4 wavelet with heart rate 85 bmp
Figure 9. Result of ECG data processing algorithm using db5 wavelet with heart rate 85 bmp
-100
0
100
200
300
400
0 1 2 3 4 5 6 7 8 9 10
ECG
(mV)
Time (sec)
Original Wavelet (Micro)
-100
0
100
200
300
400
0 1 2 3 4 5 6 7 8 9 10
ECG
(mV)
Time (sec)
Original Wavelet (Micro)
-100
0
100
200
300
400
0 1 2 3 4 5 6 7 8 9 10
ECG
(mV)
Time (sec)
Original Wavelet (Micro)
 ISSN: 2088-8708
Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543
1538
Figure 10. Result of ECG data processing algorithm using db9 wavelet with heart rate 85 bmp
Figure 11. Result of ECG data processing algorithm using coif5 wavelet with heart rate 85 bmp
Figure 12. Result of ECG data processing algorithm using bior3.3 wavelet with heart rate 85 bmp
Figure 13. Result of ECG data processing algorithm using Sym4 wavelet with heart rate 85 bmp
We consider the simulated ECG signal as a pristine reference signal, characterized by its cleanliness
and clarity. This reference signal is subsequently subjected to the addition of both baseline and wideband
noise, thereby serving as a benchmark for evaluating the efficacy of the noise removal algorithm based on the
wavelet transform principle. To substantiate the effectiveness of ECG signal processing employing the
wavelet transform principle and to select the appropriate mother wavelet, we rely on quantitative measures
frequently employed in prior research. These measures encompass signal-to-noise ratio (SNR), correlation
coefficients between the original ECG signals and the processed signal (r), as well as the root mean square
error (RMSE), as defined by (5) to (7):
-100
0
100
200
300
400
0 1 2 3 4 5 6 7 8 9 10
ECG
(mV)
Time (sec)
Original Wavelet (Micro)
-100
0
100
200
300
400
0 1 2 3 4 5 6 7 8 9 10
ECG
(mV)
Time (sec)
Original Wavelet (Micro)
-100
0
100
200
300
400
0 1 2 3 4 5 6 7 8 9 10
ECG
(mV)
Time (sec)
Original Wavelet (Micro)
-100
0
100
200
300
400
0 1 2 3 4 5 6 7 8 9 10
ECG
(mV)
Time (sec)
Original
Int J Elec & Comp Eng ISSN: 2088-8708 
Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin)
1539
𝑆𝑁𝑅(𝑑𝑏) = 10π‘™π‘œπ‘”10 (
βˆ‘ [π‘ π‘œ(𝑛)]2
π‘βˆ’1
𝑛=0
βˆ‘ [π‘ π‘Ÿπ‘’(𝑛)βˆ’π‘ π‘œ(𝑛)]2
π‘βˆ’1
𝑛=0
) (5)
π‘Ÿ =
βˆ‘ (π‘ π‘œβˆ’π‘ π‘œ
Μ…Μ…Μ…)βˆ™(π‘ π‘Ÿπ‘’βˆ’π‘ π‘Ÿπ‘’
Μ…Μ…Μ…Μ…Μ…)
π‘βˆ’1
𝑛=0
βˆšβˆ‘ (π‘ π‘œβˆ’π‘ π‘œ
Μ…Μ…Μ…)2
π‘βˆ’1
𝑛=0 βˆ‘ (π‘ π‘Ÿπ‘’βˆ’π‘ π‘Ÿπ‘’
Μ…Μ…Μ…Μ…Μ…)2
π‘βˆ’1
𝑛=0
(6)
𝑅𝑀𝑆𝐸 = √
1
𝑁
βˆ‘ (π‘ π‘Ÿπ‘’(𝑛) βˆ’ π‘ π‘œ(𝑛))2
π‘βˆ’1
𝑛=0 (7)
when π‘ π‘œ is the original ECG signal and π‘ π‘Ÿπ‘’ is the processed ECG signal.
The SNR is a measure of the quality of a signal, indicating how much the signal power in a given
signal compares to the noise power. Figure 14 show the SNR of each mother wavelet used with different
heart rates, ranging from 65 to 85 bpm in increments of 5 bpm. The results indicate that the SNR of every
mother wavelet increases with increasing heart rate. Among the mother wavelets, the db4 wavelet exhibited
the highest SNR values for heart rates of 65, 70, 80, and 85 bpm, with values of 6.44, 6.67, 6.93, and 7.06,
respectively. In contrast, the db9 wavelet yielded the highest SNR at 75 bpm with a value of 6.90, while the
bior3.3 wavelet had the lowest SNR values overall. Figure 15 presents the average SNR values of all heart
rates to determine the mother wavelet that yielded the highest SNR. The db4 wavelet yielded the highest
mean SNR of 6.77, while the bior3.3 wavelet had the lowest mean SNR of 5.83. Heart rate, denoting the
frequency of heart beats per minute, serves as a fundamental physiological parameter. A higher heart rate
signifies an increased rate of cardiac contractions, resulting in a greater number of cardiac cycles occurring
within a specified temporal interval. In the context of ECG data, each cardiac cycle manifests as a distinctive
pattern characterized by key waveforms, including the P-wave, QRS complex, and T-wave. These
waveforms, collectively termed fiducial points, hold invaluable diagnostic information. Elevations in heart
rate correspond to a heightened occurrence of cardiac cycles per unit of time. Consequently, the fiducial
points (P, QRS, T) materialize more frequently within the ECG signal. This heightened frequency enhances
their distinctiveness amidst the backdrop of potential noise, thereby augmenting the SNR within the ECG
signal.
Figure 14. SNR of mother wavelets with different heart rates
Figure 15. Comparison between the mother wavelet in terms of the mean SNR
6.27
6.27
6.54
6.69
6.77
6.44
6.67
6.73
6.93
7.06
6.28
6.54
6.69
6.71
6.92
6.43
6.67
6.90
6.79
6.87
6.39
6.54
6.75
6.68
6.85
5.54
5.74
5.95
5.83
6.09
6.39
6.65
6.71
6.92
6.92
5.0
5.2
5.4
5.6
5.8
6.0
6.2
6.4
6.6
6.8
7.0
7.2
HR = 65 HR = 70 HR = 75 HR = 80 HR = 85
SNR
Heart rate (beats per minute)
Haar db4 db5 db9 coif5 bior3.3 Sym4
6.51
6.77
6.63
6.73
6.64
5.83
6.72
5.00
5.50
6.00
6.50
7.00
Haar db4 db5 db9 coif5 bior3.3 Sym4
SNR
Mother wavelet
 ISSN: 2088-8708
Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543
1540
Figure 16 show the correlation coefficient between the original ECG signal and the processed
ECG signal, wherein a value close to 1 indicates that the signal processing algorithm can eliminate a
significant amount of noise and that the processed ECG signal is similar to the original signal. From
Figure 16, it was observed that as the heart rate increased, the correlation coefficient also increased. This
observation corresponds to the SNR illustrated in Figure 14 because a high SNR indicates that the
algorithm can eliminate noise and leave only the original ECG signal, resulting in a high correlation
coefficient. Upon considering each mother wavelet, it was found that all mother wavelets yielded similar
correlation coefficients. However, db4, db9, coif5, and sym4 produced the highest correlation coefficients.
Figure 17 shows the average correlation coefficients of all heart rates, which demonstrated that the mother
wavelet with the highest correlation coefficient, db4 was 0.955. Figure 18. illustrates the RMSE for each
heart rate. It was discovered that when heart rates were at 65, 80, and 85, the utilization of the mother
wavelet db4 resulted in the lowest RMSE values of 28.95, 30.23, and 30.69, respectively. Meanwhile, the
mother wavelet db9 resulted in the lowest RMSE values at heart rates of 70 and 75, with values of 28.71
and 29.24, respectively. On the other hand, the mother wavelet bior3.3 produced the highest error, which
is consistent with the SNR and the lowest correlation coefficient. Figure 19. illustrates the average RMSE
across all heart rates, which was found to be the lowest for db4 at 29.74. A suitable mother wavelet for
ECG signals depends on several factors, including the characteristics of the ECG signal, the required
resolution in time and frequency domains, and the specific application of interest. One commonly used
mother wavelet for ECG signals is the Daubechies wavelet. It has a compact support, which means that it
is localized in time and frequency domains. This property makes it well-suited for analyzing signals with
abrupt changes, such as ECG signals that contain QRS complexes. Another commonly used mother
wavelet for ECG signals is the Symlet wavelet. It has similar properties to the Daubechies wavelet but
with slightly better time-frequency localization. Other wavelets that can be used for ECG signal analysis
include the Coiflet wavelet, the Biorthogonal wavelet, and the Harr wavelet. The choice of the mother
wavelet can also depend on the specific application of interest. It is important to note that the choice of the
mother wavelet is not the only factor that determines the performance of wavelet-based ECG signal
analysis methods. Other factors such as the decomposition level, thresholding method, and feature
extraction techniques should also be considered.
Figure 16. Correlation coefficient of mother wavelets with different heart rates
Figure 17. Comparison between the mother wavelet in terms of the mean correlation coefficient
0.933
0.938
0.946
0.952
0.960
0.940
0.948
0.955
0.961
0.968
0.939
0.945
0.952
0.958
0.966
0.941
0.949
0.955
0.960
0.968
0.941
0.948
0.955
0.960
0.967
0.931
0.938
0.946
0.950
0.959
0.940
0.949
0.955
0.960
0.967
0.85
0.87
0.89
0.91
0.93
0.95
0.97
0.99
HR = 65 HR = 70 HR = 75 HR = 80 HR = 85
Correlation
coefficient
Heart rate (beats per minute)
Haar db4 db5 db9 coif5 bior3.3 Sym4
0.946
0.955
0.952
0.954 0.953
0.945
0.954
0.940
0.945
0.950
0.955
0.960
Haar db4 db5 db9 coif5 bior3.3 Sym4
Correlation
coefficient
Mother wavelet
Int J Elec & Comp Eng ISSN: 2088-8708 
Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin)
1541
Figure 18. RMSE of mother wavelets with different heart rates
Figure 19. Comparison between the mother wavelet in terms of the mean RMSE
In the context of R-wave identification, our algorithm stands out as a straightforward and efficient
solution suitable for implementation in microcontrollers. It exhibits a commendable ability to precisely
pinpoint the R-peaks within the array data, enabling us to subsequently compute the temporal separation
between these R-peaks in alignment with the data sampling frequency. However, it is worth noting that more
sophisticated algorithms, as referenced in [22], [23] are available for the accurate localization of QRS peaks.
When such algorithms are applied to determine the positions of these peaks with precision, the timing of
these peak occurrences can prove valuable in the diagnosis of heart diseases.
5. CONCLUSION
The article describes a study on the use of wavelet transform principles for analyzing ECG signals to
eliminate interference that may occur during measurement. The article presents an algorithm that can
eliminate interference using wavelet transform principles processed in a node MCU and a peak detection
algorithm for calculating heart rate. The algorithm was tested on both simulated and real ECG signals using
parameters such as SNR, correlation coefficient, and RMSE to evaluate performance. In the study of the
performance of the ECG signal processing algorithm, we conducted two tests. The first test aimed to validate
the accuracy of the wavelet transform algorithm used in the node MCU by comparing it with the computer
program’s built-in function. The results showed that the algorithm was accurate with a correlation coefficient
of 0.99. The second test aimed to determine the most suitable mother wavelet for selecting heart rate in the
range of 65-85 beats per minute, which is the normal human heart rate. The db4 mother wavelet was found to
be the most suitable, based on the best values of average SNR, correlation coefficient, and RMSE, which
were 6.77, 0.954, and 29.74, respectively. The results showed that the most appropriate mother wavelet for
signal processing in the simulation model was the db4 wavelet, which provided the highest average SNR and
correlation coefficient values. The db9 wavelet also provided a low average RMSE value and SNR and
correlation coefficient values that were similar to those of the db4 wavelet. In this paper, we demonstrate the
feasibility of implementing complex algorithms, such as the wavelet transform, for ECG noise elimination on
a small microcontroller. Furthermore, the test results demonstrate the accurate performance of the algorithm
for detecting the two R-peaks within the ECG array data, facilitating precise heart rate calculations.
Furthermore, we present the results obtained from employing various mother waveforms to analyze and
assess their efficiency. However, due to memory constraints, the frequency sampling rate was limited to
125 Hz, and the filter bank output frequency was reduced by half. This resulted in the wavelet transform
29.50
30.07
30.47
31.08
31.76
28.95
28.99
29.81
30.23
30.69
29.49
29.14
29.97
31.00
31.18
28.96
28.71
29.24
30.70
31.37
29.10
28.71
29.76
31.09
31.46
32.10
31.96
32.62
34.31
34.32
29.12
28.78
29.88
30.25
31.21
25
26
27
28
29
30
31
32
33
34
35
HR = 65 HR = 70 HR = 75 HR = 80 HR = 85
RMSE
Heart rate (beats per minute)
Haar db4 db5 db9 coif5 bior3.3 Sym4
30.57
29.74
30.16
29.79
30.02
33.06
29.85
29.0
29.5
30.0
30.5
31.0
31.5
32.0
32.5
33.0
33.5
34.0
Haar db4 db5 db9 coif5 bior3.3 Sym4
RMSE
Mother wavelet
 ISSN: 2088-8708
Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543
1542
being performed on only one level, which allowed some noise to remain in the signal. Increasing the
sampling rate or using more complex multiresolution algorithms to process the signals would be a challenge
in future research. Finally, the proposed algorithm prototype exhibits significant potential for a diverse range
of applications that extend beyond the realm of remote medicine. Notable among these applications are the
utilization in wearable health devices, remote monitoring, health and wellness Apps, healthcare facilities in
resource-limited areas, education and training, as well as home monitoring for chronic patients. These
identified applications underscore the algorithm's adaptability and its capacity to thrive within a spectrum of
healthcare and medical technology contexts, rendering it an asset for advancing cardiac care and diagnosis.
Within the constraints of price accessibility to the general public and the requisite quality standards.
REFERENCES
[1] K. Okereafor, O. Adebola, R. Djehaiche, M. El, and B. El, β€œExploring the potentials of telemedicine and other non-contact
electronic health technologies in controlling the spread of the novel coronavirus disease (Covid-19),” SSRN Electronic Journal,
vol. 8, pp. 1–14, Apr. 2020.
[2] J. Kaminski, β€œInformatics in the time of COVID-19,” Canadian Journal of Nursing Informatics, vol. 15, no. 1, 2020.
[3] A. Doshi, Y. Platt, J. R. Dressen, B. K. Mathews, and J. C. Siy, β€œKeep calm and log on: Telemedicine for COVID-19 pandemic
response,” Journal of Hospital Medicine, vol. 15, no. 5, pp. 302–304, Apr. 2020, doi: 10.12788/jhm.3419.
[4] J. E. Hollander and B. G. Carr, β€œVirtually perfect? telemedicine for Covid-19,” New England Journal of Medicine, vol. 382,
no. 18, pp. 1679–1681, Apr. 2020, doi: 10.1056/nejmp2003539.
[5] S. Nataraja and P. Nataraja, β€œIoT based application for e-health an improvisation for lateral rotation,” in RTEICT 2017 - 2nd IEEE
International Conference on Recent Trends in Electronics, Information and Communication Technology, Proceedings, May 2017,
vol. 2018-Janua, pp. 1018–1021. doi: 10.1109/RTEICT.2017.8256753.
[6] M. F. Domingues et al., β€œInsole optical fiber sensor architecture for remote gait analysis - an e-health solution,” IEEE Internet of
Things Journal, vol. 6, no. 1, pp. 207–214, Feb. 2019, doi: 10.1109/JIOT.2017.2723263.
[7] E. Patti, M. Donatelli, E. Macii, and A. Acquaviva, β€œIoT software infrastructure for remote monitoring of patients with chronic
metabolic disorders,” in Proceedings - 2018 IEEE 6th International Conference on Future Internet of Things and Cloud, FiCloud
2018, Aug. 2018, pp. 311–317. doi: 10.1109/FiCloud.2018.00052.
[8] T. N. Gia et al., β€œIoT-based continuous glucose monitoring system: A feasibility study,” Procedia Computer Science, vol. 109,
pp. 327–334, 2017, doi: 10.1016/j.procs.2017.05.359.
[9] L. Ungurean and A. Brezulianu, β€œAn internet of things framework for remote monitoring of the healthcare parameters,” Advances
in Electrical and Computer Engineering, vol. 17, no. 2, pp. 11–16, 2017, doi: 10.4316/AECE.2017.02002.
[10] V. Choudhari, V. Dandge, N. Choudhary, and R. G. Sutar, β€œA portable and low-cost 12-lead ECG device for sustainable remote
healthcare,” in Proceedings - 2018 International Conference on Communication, Information and Computing Technology,
ICCICT 2018, Feb. 2018, vol. 2018-Janua, pp. 1–6. doi: 10.1109/ICCICT.2018.8325879.
[11] M. S. Hossain and G. Muhammad, β€œCloud-assisted industrial internet of things (IIoT) - enabled framework for health
monitoring,” Computer Networks, vol. 101, pp. 192–202, Jun. 2016, doi: 10.1016/j.comnet.2016.01.009.
[12] T. Nguyen Gia et al., β€œLow-cost fog-assisted health-care IoT system with energy-efficient sensor nodes,” in 2017 13th
International Wireless Communications and Mobile Computing Conference, IWCMC 2017, Jun. 2017, pp. 1765–1770. doi:
10.1109/IWCMC.2017.7986551.
[13] M. Neyja, S. Mumtaz, K. M. S. Huq, S. A. Busari, J. Rodriguez, and Z. Zhou, β€œAn IoT-based e-health monitoring system using
ECG signal,” in 2017 IEEE Global Communications Conference, GLOBECOM 2017 - Proceedings, Dec. 2017, vol. 2018-Janua,
pp. 1–6. doi: 10.1109/GLOCOM.2017.8255023.
[14] M. R. F. Nurdin, S. Hadiyoso, and A. Rizal, β€œA low-cost Internet of Things (IoT) system for multi-patient ECG’s monitoring,” in
ICCEREC 2016 - International Conference on Control, Electronics, Renewable Energy, and Communications 2016, Conference
Proceedings, Sep. 2017, pp. 7–11. doi: 10.1109/ICCEREC.2016.7814958.
[15] M. I. Rizqyawan, M. F. Amri, R. P. Pratama, and A. Turnip, β€œDesign and development of Android-based cloud ECG monitoring
system,” in Proceedings - 2016 3rd International Conference on Information Technology, Computer, and Electrical Engineering,
ICITACEE 2016, 2017, pp. 1–5. doi: 10.1109/ICITACEE.2016.7892444.
[16] M. D’Aloia, A. Longo, and M. Rizzi, β€œNoisy ECG signal analysis for automatic peak detection,” Information (Switzerland),
vol. 10, no. 2, p. 35, Jan. 2019, doi: 10.3390/info10020035.
[17] A. S. Ahmed, K. S. Rijab, and S. A. Alagha, β€œA study of chosen an optimum type of wavelet filter for de-noising an ECG
signal,” International Journal of Current Engineering and Technology, vol. 10, no. 05, pp. 749–756, Oct. 2020, doi:
10.14741/ijcet/v.10.5.9.
[18] P. Karthikeyan, M. Murugappan, and S. Yaacob, β€œECG signal denoising using wavelet thresholding techniques in human stress
assessment,” International Journal on Electrical Engineering and Informatics, vol. 4, no. 2, pp. 306–319, Jun. 2012, doi:
10.15676/ijeei.2012.4.2.9.
[19] V. M. Kaviri, M. Sabaghi, and S. Marjani, β€œDe-noising of ECG signals by design of an optimized wavelet,” Circuits and Systems,
vol. 07, no. 11, pp. 3746–3755, 2016, doi: 10.4236/cs.2016.711314.
[20] D. Zhang et al., β€œAn ECG signal de-noising approach based on wavelet energy and sub-band smoothing filter,” Applied Sciences
(Switzerland), vol. 9, no. 22, p. 4968, Nov. 2019, doi: 10.3390/APP9224968.
[21] A. D. S. Majumdar, β€œComparative analysis of Coiflet and Daubechies wavelets using global threshold for image de-noising,”
International Journal of Advances in Engineering and Technology, vol. 6, pp. 2247–2252, 2013.
[22] V. Gupta and M. Mittal, β€œQRS complex detection using STFT, chaos analysis, and PCA in standard and real-time ECG
databases,” Journal of The Institution of Engineers (India): Series B, vol. 100, no. 5, pp. 489–497, Mar. 2019, doi:
10.1007/s40031-019-00398-9.
[23] V. Gupta, N. K. Saxena, A. Kanungo, P. Kumar, and S. Diwania, β€œPCA as an effective tool for the detection of R-peaks in an
ECG signal processing,” International Journal of System Assurance Engineering and Management, vol. 13, no. 5, pp. 2391–2403,
Oct. 2022, doi: 10.1007/s13198-022-01650-0.
[24] V. Gupta, M. Mittal, and V. Mittal, β€œChaos Theory: An emerging tool for arrhythmia detection,” Sensing and Imaging, vol. 21,
no. 1, Feb. 2020, doi: 10.1007/s11220-020-0272-9.
Int J Elec & Comp Eng ISSN: 2088-8708 
Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin)
1543
[25] K. Balasubramanian and N. P. Ananthamoorthy, β€œRobust retinal blood vessel segmentation using convolutional neural network
and support vector machine,” Journal of Ambient Intelligence and Humanized Computing, vol. 12, no. 3, pp. 3559–3569, Oct.
2021, doi: 10.1007/s12652-019-01559-w.
[26] X. Xu et al., β€œMulti-feature fusion method for identifying carotid artery vulnerable plaque,” Irbm, vol. 43, no. 4, pp. 272–278,
Aug. 2022, doi: 10.1016/j.irbm.2021.07.004.
[27] M. Harmouche, M. Maasrani, J. P. Verhoye, H. Corbineau, and A. Drochon, β€œCoronary three-vessel disease with occlusion of the
right coronary artery: What are the most important factors that determine the right territory perfusion?,” Irbm, vol. 35, no. 3,
pp. 149–157, Jun. 2014, doi: 10.1016/j.irbm.2013.11.002.
[28] S. Li, J. C. Nunes, C. Toumoulin, and L. Luo, β€œ3D coronary artery reconstruction by 2D motion compensation based on mutual
information,” Irbm, vol. 39, no. 1, pp. 69–82, Feb. 2018, doi: 10.1016/j.irbm.2017.11.005.
[29] J. Velut, P. A. Lentz, D. Boulmier, J. L. Coatrieux, and C. Toumoulin, β€œAssessment of qualitative and quantitative features in
coronary artery MRA,” Irbm, vol. 32, no. 4, pp. 229–242, Sep. 2011, doi: 10.1016/j.irbm.2011.05.002.
[30] D. Popov, A. Gapochkin, and A. Nekrasov, β€œAn algorithm of daubechieswavelet transform in the final field when processing
speech signals,” Electronics (Switzerland), vol. 7, no. 7, p. 120, Jul. 2018, doi: 10.3390/electronics7070120.
[31] B. A. Rajoub, β€œAn efficient coding algorithm for the compression of ECG signals using the wavelet transform,” IEEE
Transactions on Biomedical Engineering, vol. 49, no. 4, pp. 355–362, Apr. 2002, doi: 10.1109/10.991163.
[32] I. Haider, M. Shahbaz, M. Abdullah, and M. Nazim, β€œFeature extraction for identification of extension and flexion movement of
wrist using EMG signals,” in Canadian Conference on Electrical and Computer Engineering, May 2015, vol. 2015-June,
no. June, pp. 792–795. doi: 10.1109/CCECE.2015.7129375.
[33] B. R. de Oliveira, M. A. Q. Duarte, C. C. E. de Abreu, and J. V. Filho, β€œA wavelet-based method for power-line interference
removal in ECG signals,” Research on Biomedical Engineering, vol. 34, no. 1, pp. 73–86, 2018, doi: 10.1590/2446-4740.01817.
[34] M. K. Islam, A. N. M. M. Haque, G. Tangim, T. Ahammad, and M. R. H. Khondokar, β€œStudy and analysis of ECG signal using
MATLAB & LABVIEW as effective tools,” International Journal of Computer and Electrical Engineering, pp. 404–408, 2012,
doi: 10.7763/ijcee.2012.v4.522.
[35] R. Haddadi, E. Abdelmounim, M. El Hanine, and A. Belaguid, β€œDiscrete wavelet transform based algorithm for recognition of
QRS complexes,” in International Conference on Multimedia Computing and Systems -Proceedings, Apr. 2014, pp. 375–379, doi:
10.1109/ICMCS.2014.6911261.
[36] Z. F. Apandi, R. Ikeura, S. Hayakawa, and S. Tsutsumi, β€œAn analysis of the effects of noisy electrocardiogram signal on heartbeat
detection performance,” Bioengineering, vol. 7, no. 2, pp. 1–15, Jun. 2020, doi: 10.3390/bioengineering7020053.
BIOGRAPHIES OF AUTHORS
Akkachai Phuphanin received the B.Eng., M.Eng. and Ph.D degree in
Telecommunication engineering from Suranaree University of Technology, Thailand, in 2019,
2011 and 2017, respectively. Currently, he is lecturer at the Department of Electrical
Engineering, Rajamangala University of Technology Isan Sakonnakhon Campus. His research
interests include wireless sensor networks and applications, reinforcement learning, learning
(artificial intelligence), smart farm and home technology, coverage control, internet of thing,
and signal processing. He can be contacted at email: akkachai.ph@rmuti.ac.th.
Metha Tasakorn received the B.Eng. degree in industrial electrical technology
from King Mongkut’s Institute of Technology North Bangkok (KMITNB), Bangkok,
Thailand, in 1993, M.Sc. degree in electronics electrotechnics and automatics from UniversitΓ©
Paris-Est CrΓ©teil Val-de-Marne, CrΓ©teil, France, in 2002. He is a lecturer with the Department
of Electrical Engineering, Faculty of Industry and Technology, Rajamangala University of
Technology Isan Sakon Nakhon Campus, Sakon Nakhon, 47160 Thailand. His research
interests include biosensor, optical tweezer, robotics, power electronics, learning (artificial
intelligence), smart farm and home technology and internet of thing. He can be contacted at
email: metha.ta@rmuti.ac.th.
Jeerapong Srivichai received the B.Eng. degree in electrical engineering from
Pathumwan Institute of Technology, Bangkok, Thailand, in 2003 and the M.S. degree in
electrical engineering from Kasetsart University, Bangkok, Thailand, in 2008 and Ph.D.
degrees in electric engineering from Suranaree University of Technology, Nakhon Ratchasima,
Thailand, in 2020. Currently, he is an assistant professor at the Department of Electrical
Engineering, Rajamangala University of Technology Isan Sakonnakhon Campus. His research
interests include railway electrification, electric vehicle, power electronics, induction heating.
He can be contacted at email: geerapong.sr@rmuti.ac.th.

More Related Content

Similar to Electrocardiogram signal processing algorithm on microcontroller using wavelet transform method

Smart hospital technology
Smart hospital technologySmart hospital technology
Smart hospital technologyhiij
Β 
Health Care Monitoring for the CVD Detection using Soft Computing Techniques
Health Care Monitoring for the CVD Detection using Soft Computing TechniquesHealth Care Monitoring for the CVD Detection using Soft Computing Techniques
Health Care Monitoring for the CVD Detection using Soft Computing Techniquesijfcstjournal
Β 
Health Monitoring
Health MonitoringHealth Monitoring
Health MonitoringPravin Burute
Β 
Low-cost central monitor based personal computer with electrocardiogram and h...
Low-cost central monitor based personal computer with electrocardiogram and h...Low-cost central monitor based personal computer with electrocardiogram and h...
Low-cost central monitor based personal computer with electrocardiogram and h...TELKOMNIKA JOURNAL
Β 
Design and implementation of portable electrocardiogram recorder with field ...
Design and implementation of portable electrocardiogram  recorder with field ...Design and implementation of portable electrocardiogram  recorder with field ...
Design and implementation of portable electrocardiogram recorder with field ...IJECEIAES
Β 
SMART HOSPITAL TECHNOLOGY
SMART HOSPITAL TECHNOLOGYSMART HOSPITAL TECHNOLOGY
SMART HOSPITAL TECHNOLOGYhiij
Β 
Telemedicine-equipped android interface-based heart rate monitoring
Telemedicine-equipped android interface-based heart rate  monitoringTelemedicine-equipped android interface-based heart rate  monitoring
Telemedicine-equipped android interface-based heart rate monitoringnooriasukmaningtyas
Β 
Implementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring systemImplementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring systemkchakrireddy
Β 
A simple portable ecg monitor with iot
A simple portable ecg monitor with iotA simple portable ecg monitor with iot
A simple portable ecg monitor with iotArhamSheikh1
Β 
1475 925 x-13-160
1475 925 x-13-1601475 925 x-13-160
1475 925 x-13-160ArhamSheikh1
Β 
03 cjece-2018-0001
03 cjece-2018-000103 cjece-2018-0001
03 cjece-2018-0001Stefan Oniga
Β 
Ijigsp v10-n5-3
Ijigsp v10-n5-3Ijigsp v10-n5-3
Ijigsp v10-n5-3ArhamSheikh1
Β 
Transmission of arm based real time ecg for monitoring remotely located patient
Transmission of arm based real time ecg for monitoring remotely located patientTransmission of arm based real time ecg for monitoring remotely located patient
Transmission of arm based real time ecg for monitoring remotely located patienteSAT Publishing House
Β 
An IoT Based Patient Health Monitoring System Using Arduino Uno
An IoT Based Patient Health Monitoring System Using Arduino UnoAn IoT Based Patient Health Monitoring System Using Arduino Uno
An IoT Based Patient Health Monitoring System Using Arduino UnoLeonard Goudy
Β 
A Real Time Electrocardiogram (ECG) Device for Cardiac Patients
A Real Time Electrocardiogram (ECG) Device for Cardiac PatientsA Real Time Electrocardiogram (ECG) Device for Cardiac Patients
A Real Time Electrocardiogram (ECG) Device for Cardiac PatientsIJERD Editor
Β 
Ecis final paper-june2017_two way architecture between iot sensors and cloud ...
Ecis final paper-june2017_two way architecture between iot sensors and cloud ...Ecis final paper-june2017_two way architecture between iot sensors and cloud ...
Ecis final paper-june2017_two way architecture between iot sensors and cloud ...Oliver Neuland
Β 
U-healthcare monitoring and reporting using smartphone
U-healthcare monitoring and reporting using smartphoneU-healthcare monitoring and reporting using smartphone
U-healthcare monitoring and reporting using smartphoneRajeev Piyare
Β 
Implementation of electronic stethoscope for online remote monitoring with mo...
Implementation of electronic stethoscope for online remote monitoring with mo...Implementation of electronic stethoscope for online remote monitoring with mo...
Implementation of electronic stethoscope for online remote monitoring with mo...journalBEEI
Β 
IOT_BASED_AUTOMATED_HEALTHCARE_SYSTEM.pptx
IOT_BASED_AUTOMATED_HEALTHCARE_SYSTEM.pptxIOT_BASED_AUTOMATED_HEALTHCARE_SYSTEM.pptx
IOT_BASED_AUTOMATED_HEALTHCARE_SYSTEM.pptx21l120
Β 

Similar to Electrocardiogram signal processing algorithm on microcontroller using wavelet transform method (20)

Smart hospital technology
Smart hospital technologySmart hospital technology
Smart hospital technology
Β 
Health Care Monitoring for the CVD Detection using Soft Computing Techniques
Health Care Monitoring for the CVD Detection using Soft Computing TechniquesHealth Care Monitoring for the CVD Detection using Soft Computing Techniques
Health Care Monitoring for the CVD Detection using Soft Computing Techniques
Β 
Health Monitoring
Health MonitoringHealth Monitoring
Health Monitoring
Β 
Low-cost central monitor based personal computer with electrocardiogram and h...
Low-cost central monitor based personal computer with electrocardiogram and h...Low-cost central monitor based personal computer with electrocardiogram and h...
Low-cost central monitor based personal computer with electrocardiogram and h...
Β 
Design and implementation of portable electrocardiogram recorder with field ...
Design and implementation of portable electrocardiogram  recorder with field ...Design and implementation of portable electrocardiogram  recorder with field ...
Design and implementation of portable electrocardiogram recorder with field ...
Β 
SMART HOSPITAL TECHNOLOGY
SMART HOSPITAL TECHNOLOGYSMART HOSPITAL TECHNOLOGY
SMART HOSPITAL TECHNOLOGY
Β 
Telemedicine-equipped android interface-based heart rate monitoring
Telemedicine-equipped android interface-based heart rate  monitoringTelemedicine-equipped android interface-based heart rate  monitoring
Telemedicine-equipped android interface-based heart rate monitoring
Β 
Implementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring systemImplementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring system
Β 
A simple portable ecg monitor with iot
A simple portable ecg monitor with iotA simple portable ecg monitor with iot
A simple portable ecg monitor with iot
Β 
1475 925 x-13-160
1475 925 x-13-1601475 925 x-13-160
1475 925 x-13-160
Β 
03 cjece-2018-0001
03 cjece-2018-000103 cjece-2018-0001
03 cjece-2018-0001
Β 
Ijigsp v10-n5-3
Ijigsp v10-n5-3Ijigsp v10-n5-3
Ijigsp v10-n5-3
Β 
Transmission of arm based real time ecg for monitoring remotely located patient
Transmission of arm based real time ecg for monitoring remotely located patientTransmission of arm based real time ecg for monitoring remotely located patient
Transmission of arm based real time ecg for monitoring remotely located patient
Β 
An IoT Based Patient Health Monitoring System Using Arduino Uno
An IoT Based Patient Health Monitoring System Using Arduino UnoAn IoT Based Patient Health Monitoring System Using Arduino Uno
An IoT Based Patient Health Monitoring System Using Arduino Uno
Β 
B1103010918
B1103010918B1103010918
B1103010918
Β 
A Real Time Electrocardiogram (ECG) Device for Cardiac Patients
A Real Time Electrocardiogram (ECG) Device for Cardiac PatientsA Real Time Electrocardiogram (ECG) Device for Cardiac Patients
A Real Time Electrocardiogram (ECG) Device for Cardiac Patients
Β 
Ecis final paper-june2017_two way architecture between iot sensors and cloud ...
Ecis final paper-june2017_two way architecture between iot sensors and cloud ...Ecis final paper-june2017_two way architecture between iot sensors and cloud ...
Ecis final paper-june2017_two way architecture between iot sensors and cloud ...
Β 
U-healthcare monitoring and reporting using smartphone
U-healthcare monitoring and reporting using smartphoneU-healthcare monitoring and reporting using smartphone
U-healthcare monitoring and reporting using smartphone
Β 
Implementation of electronic stethoscope for online remote monitoring with mo...
Implementation of electronic stethoscope for online remote monitoring with mo...Implementation of electronic stethoscope for online remote monitoring with mo...
Implementation of electronic stethoscope for online remote monitoring with mo...
Β 
IOT_BASED_AUTOMATED_HEALTHCARE_SYSTEM.pptx
IOT_BASED_AUTOMATED_HEALTHCARE_SYSTEM.pptxIOT_BASED_AUTOMATED_HEALTHCARE_SYSTEM.pptx
IOT_BASED_AUTOMATED_HEALTHCARE_SYSTEM.pptx
Β 

More from IJECEIAES

Cloud service ranking with an integration of k-means algorithm and decision-m...
Cloud service ranking with an integration of k-means algorithm and decision-m...Cloud service ranking with an integration of k-means algorithm and decision-m...
Cloud service ranking with an integration of k-means algorithm and decision-m...IJECEIAES
Β 
Prediction of the risk of developing heart disease using logistic regression
Prediction of the risk of developing heart disease using logistic regressionPrediction of the risk of developing heart disease using logistic regression
Prediction of the risk of developing heart disease using logistic regressionIJECEIAES
Β 
Predictive analysis of terrorist activities in Thailand's Southern provinces:...
Predictive analysis of terrorist activities in Thailand's Southern provinces:...Predictive analysis of terrorist activities in Thailand's Southern provinces:...
Predictive analysis of terrorist activities in Thailand's Southern provinces:...IJECEIAES
Β 
Optimal model of vehicular ad-hoc network assisted by unmanned aerial vehicl...
Optimal model of vehicular ad-hoc network assisted by  unmanned aerial vehicl...Optimal model of vehicular ad-hoc network assisted by  unmanned aerial vehicl...
Optimal model of vehicular ad-hoc network assisted by unmanned aerial vehicl...IJECEIAES
Β 
Improving cyberbullying detection through multi-level machine learning
Improving cyberbullying detection through multi-level machine learningImproving cyberbullying detection through multi-level machine learning
Improving cyberbullying detection through multi-level machine learningIJECEIAES
Β 
Comparison of time series temperature prediction with autoregressive integrat...
Comparison of time series temperature prediction with autoregressive integrat...Comparison of time series temperature prediction with autoregressive integrat...
Comparison of time series temperature prediction with autoregressive integrat...IJECEIAES
Β 
Strengthening data integrity in academic document recording with blockchain a...
Strengthening data integrity in academic document recording with blockchain a...Strengthening data integrity in academic document recording with blockchain a...
Strengthening data integrity in academic document recording with blockchain a...IJECEIAES
Β 
Design of storage benchmark kit framework for supporting the file storage ret...
Design of storage benchmark kit framework for supporting the file storage ret...Design of storage benchmark kit framework for supporting the file storage ret...
Design of storage benchmark kit framework for supporting the file storage ret...IJECEIAES
Β 
Detection of diseases in rice leaf using convolutional neural network with tr...
Detection of diseases in rice leaf using convolutional neural network with tr...Detection of diseases in rice leaf using convolutional neural network with tr...
Detection of diseases in rice leaf using convolutional neural network with tr...IJECEIAES
Β 
A systematic review of in-memory database over multi-tenancy
A systematic review of in-memory database over multi-tenancyA systematic review of in-memory database over multi-tenancy
A systematic review of in-memory database over multi-tenancyIJECEIAES
Β 
Agriculture crop yield prediction using inertia based cat swarm optimization
Agriculture crop yield prediction using inertia based cat swarm optimizationAgriculture crop yield prediction using inertia based cat swarm optimization
Agriculture crop yield prediction using inertia based cat swarm optimizationIJECEIAES
Β 
Three layer hybrid learning to improve intrusion detection system performance
Three layer hybrid learning to improve intrusion detection system performanceThree layer hybrid learning to improve intrusion detection system performance
Three layer hybrid learning to improve intrusion detection system performanceIJECEIAES
Β 
Non-binary codes approach on the performance of short-packet full-duplex tran...
Non-binary codes approach on the performance of short-packet full-duplex tran...Non-binary codes approach on the performance of short-packet full-duplex tran...
Non-binary codes approach on the performance of short-packet full-duplex tran...IJECEIAES
Β 
Improved design and performance of the global rectenna system for wireless po...
Improved design and performance of the global rectenna system for wireless po...Improved design and performance of the global rectenna system for wireless po...
Improved design and performance of the global rectenna system for wireless po...IJECEIAES
Β 
Advanced hybrid algorithms for precise multipath channel estimation in next-g...
Advanced hybrid algorithms for precise multipath channel estimation in next-g...Advanced hybrid algorithms for precise multipath channel estimation in next-g...
Advanced hybrid algorithms for precise multipath channel estimation in next-g...IJECEIAES
Β 
Performance analysis of 2D optical code division multiple access through unde...
Performance analysis of 2D optical code division multiple access through unde...Performance analysis of 2D optical code division multiple access through unde...
Performance analysis of 2D optical code division multiple access through unde...IJECEIAES
Β 
On performance analysis of non-orthogonal multiple access downlink for cellul...
On performance analysis of non-orthogonal multiple access downlink for cellul...On performance analysis of non-orthogonal multiple access downlink for cellul...
On performance analysis of non-orthogonal multiple access downlink for cellul...IJECEIAES
Β 
Phase delay through slot-line beam switching microstrip patch array antenna d...
Phase delay through slot-line beam switching microstrip patch array antenna d...Phase delay through slot-line beam switching microstrip patch array antenna d...
Phase delay through slot-line beam switching microstrip patch array antenna d...IJECEIAES
Β 
A simple feed orthogonal excitation X-band dual circular polarized microstrip...
A simple feed orthogonal excitation X-band dual circular polarized microstrip...A simple feed orthogonal excitation X-band dual circular polarized microstrip...
A simple feed orthogonal excitation X-band dual circular polarized microstrip...IJECEIAES
Β 
A taxonomy on power optimization techniques for fifthgeneration heterogenous ...
A taxonomy on power optimization techniques for fifthgeneration heterogenous ...A taxonomy on power optimization techniques for fifthgeneration heterogenous ...
A taxonomy on power optimization techniques for fifthgeneration heterogenous ...IJECEIAES
Β 

More from IJECEIAES (20)

Cloud service ranking with an integration of k-means algorithm and decision-m...
Cloud service ranking with an integration of k-means algorithm and decision-m...Cloud service ranking with an integration of k-means algorithm and decision-m...
Cloud service ranking with an integration of k-means algorithm and decision-m...
Β 
Prediction of the risk of developing heart disease using logistic regression
Prediction of the risk of developing heart disease using logistic regressionPrediction of the risk of developing heart disease using logistic regression
Prediction of the risk of developing heart disease using logistic regression
Β 
Predictive analysis of terrorist activities in Thailand's Southern provinces:...
Predictive analysis of terrorist activities in Thailand's Southern provinces:...Predictive analysis of terrorist activities in Thailand's Southern provinces:...
Predictive analysis of terrorist activities in Thailand's Southern provinces:...
Β 
Optimal model of vehicular ad-hoc network assisted by unmanned aerial vehicl...
Optimal model of vehicular ad-hoc network assisted by  unmanned aerial vehicl...Optimal model of vehicular ad-hoc network assisted by  unmanned aerial vehicl...
Optimal model of vehicular ad-hoc network assisted by unmanned aerial vehicl...
Β 
Improving cyberbullying detection through multi-level machine learning
Improving cyberbullying detection through multi-level machine learningImproving cyberbullying detection through multi-level machine learning
Improving cyberbullying detection through multi-level machine learning
Β 
Comparison of time series temperature prediction with autoregressive integrat...
Comparison of time series temperature prediction with autoregressive integrat...Comparison of time series temperature prediction with autoregressive integrat...
Comparison of time series temperature prediction with autoregressive integrat...
Β 
Strengthening data integrity in academic document recording with blockchain a...
Strengthening data integrity in academic document recording with blockchain a...Strengthening data integrity in academic document recording with blockchain a...
Strengthening data integrity in academic document recording with blockchain a...
Β 
Design of storage benchmark kit framework for supporting the file storage ret...
Design of storage benchmark kit framework for supporting the file storage ret...Design of storage benchmark kit framework for supporting the file storage ret...
Design of storage benchmark kit framework for supporting the file storage ret...
Β 
Detection of diseases in rice leaf using convolutional neural network with tr...
Detection of diseases in rice leaf using convolutional neural network with tr...Detection of diseases in rice leaf using convolutional neural network with tr...
Detection of diseases in rice leaf using convolutional neural network with tr...
Β 
A systematic review of in-memory database over multi-tenancy
A systematic review of in-memory database over multi-tenancyA systematic review of in-memory database over multi-tenancy
A systematic review of in-memory database over multi-tenancy
Β 
Agriculture crop yield prediction using inertia based cat swarm optimization
Agriculture crop yield prediction using inertia based cat swarm optimizationAgriculture crop yield prediction using inertia based cat swarm optimization
Agriculture crop yield prediction using inertia based cat swarm optimization
Β 
Three layer hybrid learning to improve intrusion detection system performance
Three layer hybrid learning to improve intrusion detection system performanceThree layer hybrid learning to improve intrusion detection system performance
Three layer hybrid learning to improve intrusion detection system performance
Β 
Non-binary codes approach on the performance of short-packet full-duplex tran...
Non-binary codes approach on the performance of short-packet full-duplex tran...Non-binary codes approach on the performance of short-packet full-duplex tran...
Non-binary codes approach on the performance of short-packet full-duplex tran...
Β 
Improved design and performance of the global rectenna system for wireless po...
Improved design and performance of the global rectenna system for wireless po...Improved design and performance of the global rectenna system for wireless po...
Improved design and performance of the global rectenna system for wireless po...
Β 
Advanced hybrid algorithms for precise multipath channel estimation in next-g...
Advanced hybrid algorithms for precise multipath channel estimation in next-g...Advanced hybrid algorithms for precise multipath channel estimation in next-g...
Advanced hybrid algorithms for precise multipath channel estimation in next-g...
Β 
Performance analysis of 2D optical code division multiple access through unde...
Performance analysis of 2D optical code division multiple access through unde...Performance analysis of 2D optical code division multiple access through unde...
Performance analysis of 2D optical code division multiple access through unde...
Β 
On performance analysis of non-orthogonal multiple access downlink for cellul...
On performance analysis of non-orthogonal multiple access downlink for cellul...On performance analysis of non-orthogonal multiple access downlink for cellul...
On performance analysis of non-orthogonal multiple access downlink for cellul...
Β 
Phase delay through slot-line beam switching microstrip patch array antenna d...
Phase delay through slot-line beam switching microstrip patch array antenna d...Phase delay through slot-line beam switching microstrip patch array antenna d...
Phase delay through slot-line beam switching microstrip patch array antenna d...
Β 
A simple feed orthogonal excitation X-band dual circular polarized microstrip...
A simple feed orthogonal excitation X-band dual circular polarized microstrip...A simple feed orthogonal excitation X-band dual circular polarized microstrip...
A simple feed orthogonal excitation X-band dual circular polarized microstrip...
Β 
A taxonomy on power optimization techniques for fifthgeneration heterogenous ...
A taxonomy on power optimization techniques for fifthgeneration heterogenous ...A taxonomy on power optimization techniques for fifthgeneration heterogenous ...
A taxonomy on power optimization techniques for fifthgeneration heterogenous ...
Β 

Recently uploaded

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
Β 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
Β 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
Β 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
Β 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
Β 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
Β 
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”soniya singh
Β 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
Β 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
Β 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
Β 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
Β 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
Β 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
Β 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoΓ£o Esperancinha
Β 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
Β 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
Β 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
Β 

Recently uploaded (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
Β 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Β 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
Β 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
Β 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
Β 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
Β 
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Β 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Β 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
Β 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
Β 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
Β 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
Β 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
Β 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
Β 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Β 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
Β 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Β 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
Β 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
Β 

Electrocardiogram signal processing algorithm on microcontroller using wavelet transform method

  • 1. International Journal of Electrical and Computer Engineering (IJECE) Vol. 14, No. 2, April 2024, pp. 1530~1543 ISSN: 2088-8708, DOI: 10.11591/ijece.v14i2.pp1530-1543  1530 Journal homepage: http://ijece.iaescore.com Electrocardiogram signal processing algorithm on microcontroller using wavelet transform method Akkachai Phuphanin, Metha Tasakorn, Jeerapong Srivichai Department of Electrical Engineering, Faculty of Industry and Technology, Rajamangala University of Technology Isan, Sakon Nakhon, Thailand Article Info ABSTRACT Article history: Received Sep 7, 2023 Revised Oct 26, 2023 Accepted Nov 17, 2023 The electrocardiogram (ECG) is an important parameter for analyzing the cardiac system. It serves as the primary diagnostic tool for patients with suspected heart disease, guiding appropriate cardiac investigations according to the disease or condition suspected. However, ECG measurements may generate noise, leading to false diagnoses. The wavelet transform is an effective and widely-used technique for eliminating noise. Typically, analysis and generation algorithms are developed on computer and using software built in. This paper presents a noise elimination algorithm based on the wavelet transform method, designed to operate on resource-limited Node microcontroller unit (MCU). An efficiency study was conducted to determine the optimum mother wavelet implementation of the algorithm, and the results showed that, when considering synthetic ECG signals, db4 was the most suitable for eliminating interference by achieving the highest signal to noise ratio (SNR) and correlation coefficient. In addition, this algorithm prototype can analyze ECG signals using the wavelet transform method processed in a microcontroller and is accurate compared to reliable programs. It has the potential to be further developed into a low-cost portable ECG signal measurement tool for use in remote medicine, healthcare facilities in resource-limited areas, education and training, as well as home monitoring for chronic patients. Keywords: De-noise signal Electrocardiogram Microcontroller Mother wavelet Signal processing Wavelet transform This is an open access article under the CC BY-SA license. Corresponding Author: Akkachai Phuphanin Department of Electrical Engineering, Faculty of Industry and Technology, Rajamangala University of Technology Isan Sakon Nakhon Campus, 47160, Thailand Email: akkachai.ph@rmuti.ac.th 1. INTRODUCTION Medical professionals and patients may be shielded from coronavirus disease starting in 2019 (COVID-19) exposure by telemedicine and eHealth platforms, which use high-speed communications networks and application software for the delivery, management, and monitoring of medical services [1]. It is evident that eHealth and telemedicine systems are crucial for addressing COVID-19 on a worldwide scale [2]. As the disease spreads around the globe, medical facilities utilize telemedicine and eHealth platforms in a variety of ways to improve patient care [3]. These include decreased medical expenses, diminished worker tiredness, more worker sustainability, diminished physician exposure, and diminished need of personal protective equipment (PPE) suits, such as dust filter masks and respirators [4]. In addition to the remote medical software platform, there are algorithms embedded in the remote medical system. An algorithm that makes it easier to administer patient summaries that have been analyzed by remote analytics [5], [6]. In order to deliver the most recent information, artificial intelligence (AI)
  • 2. Int J Elec & Comp Eng ISSN: 2088-8708  Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin) 1531 chatbot is used. Regarding COVID-19, it offers prevention recommendations as well as potential societal remedies. It also provides real-time situation reports to medical practitioners [5]. A COVID-19 screening tool is now being developed using AI to offer preliminary testing for patients with symptoms. and, if required, suggest additional medical care. However, when there is sufficient and reliable data, both application software platforms and AI chatbots will become more valuable and significant. As a result, a lot of research has been done on developing mobile medical devices that include internet of things (IoT) technologies. Patients can independently measure the fundamental variables required for diagnosis and transmission to medical staff. One of the most crucial physiological measures is pulse. The term "pulse" describes the pressure produced as blood vessels expand and same in time with the heart's rhythmic contraction and expansion. Therefore, the blood flow wave in the aorta that causes an aneurysm is caused by pulse rate [6]. Thus, heart rate can be determined using pulse physiological parameters [7]. The study [6] presented an autonomous bed shifting system for long-term bedridden patients using the patient's pulse rate as a measure of discomfort. Disease monitoring is necessary because some medical problems necessitate long-term patient care, especially in the case of chronic diseases [8]. Therefore, it is crucial to continuously check for such occurrences. The monitoring of blood sugar levels, for instance, will vary depending on the individual. This aids in scheduling activities, medications, and meals [9]. The architecture system was created using sensing technology. The technology attempts to deliver real-time information on glucose levels and body temperature. This also contains other data such as environmental temperature. This information is presented graphically and is easily legible by humans for end users such as patients and healthcare professionals. A remote monitoring system for individuals with persistent metabolic problems is described in the paper [8]. These include blood pressure and glucose monitors, smart scales, pulse oximeters, activity trackers, and blood pressure monitors. The device is also capable of performing analyses that will help with medical diagnostics. Tele-ECG is a new IoT-based electrocardiogram (ECG) monitoring device that enables remote medical monitoring of the condition of the heart [10]. The systems are still inferior to instruments used by experts. However, by monitoring the patient's ECG over time, the procedure offers basic surveillance. The ECG, which displays the heart's recorded electrical activity via electrodes on the body's surface, is thought to be one of the most recognizable representations of heart function [10]. Heart electrical activity and heart rate fluctuations are measured by physiological parameters ECG [11]. Applications for IoT and health surveillance are presented in the research [12]. Through sensors and portable devices, the system is intended to capture ECG data together with other healthcare data. The author also discusses on safely uploading these data to the cloud. This enables immediate access to medical specialists. Given that earlier systems were expensive and had huge mounting locations, some researchers [11] have suggested a 12-lead ECG system. Because of this, the suggested solution is portable and has produced successful outcomes for home isolate systems. Additionally, ECG data can be sent from a distant area to any point in the world to a medical specialist. Neyja et al. [13] proposed low-cost ECG health monitoring system using internet of things with automated analytics and alarms includes energy-efficient wearable sensor devices. The systems are linked to a smart gateway that can be accessed by cardiovascular caregivers. To monitor patients' ECG signals using a mobile tele-ECG application and do health assessments without a doctor's involvement, was developed by Choudhari et al. [10]. The hidden Markov model (HMM) and ECG sensors-based healthcare system implementation proposal was proposed by Nurdin et al. [14] with the intention of enhancing patient monitoring and immediate patient assistance in case patients with diseases related to the cardiovascular system. The construction of an ECG monitoring system was then described by Rizqyawan et al. [15], in which the user can use the system while ECG signals are being transmitted. Finally, D’Aloia et al. [16] suggested that the design, execution, and development of ECG follow-up research. According to research articles [10]–[16], it is a remote medical system that transmits ECG signals obtained from sensors and transmitted via the Internet to medical personnel via the internet of things. These studies, however, only send the raw sensor data collected from them without filtering the ECG signal, which can result in inaccuracies in the ECG. The medical professionals will diagnose patients incorrectly if they receive muddled signals because of noise. Only study [12], [14] suggested a technique to measure R-R peaks to calculate heart rate, and the algorithm may be prone to errors if the ECG data contains noise. The measured ECG readings are contaminated by noise. ECG noise can take many different forms, including: Random noise called as gaussian noise occurs during transmission, Muscular artifacts or noise caused by muscle contractions (MA). Electrode motion interference caused by the movement of the body, which moves the electrode and amplifies the signal. The chest region moves equally as a result of breathing, creating baseline wander (BW) noise [17]. The ECG activity data is obscured by all four noises, which can also lead to incorrect heart rate estimations and difficult R peak detection.
  • 3.  ISSN: 2088-8708 Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543 1532 In paper [18] discusses the results of using different types of wavelet filters with various thresholds and levels to de-noise ECG signals. The study concludes that the wavelet filter is a good choice for de- noising ECG signals due to its ability to suit many signals and applications. However, it is crucial to choose the appropriate wavelet filter type that is similar to the signal in shape or close to its shape. The study finds that the four-level Daubechies (db4) type is optimal for the Massachusetts institute of technology-Beth Israel arrhythmia (MIT-BIH) database, while the level two of Symlets 4 (sym4) is suitable for ECG signals from the monitoring system. The discrete wavelet transform (DWT) based wavelet denoising technique is used with three different wavelet functions and four different thresholding methods [19]. The study involved the analysis of ECG signals collected from a cohort of ten female participants aged between 20 and 25 years. These signals were obtained while employing the Stroop color-word test as a means of inducing mental stress. The result shows that the Coiflets 5 (coif5) wavelet function and the and rigrsure thresholding rule are the most effective for removing noise from ECG signals, as demonstrated. Within the scope of study [20], an innovative approach is introduced for the purpose of reducing noise in ECG signals through the utilization of wavelets. The methodology centers around the application of a genetic algorithm, which systematically explores an extensive array of quadrature filter banks. Its objective is to identify the optimal filter bank that results in the minimal signal-to-noise ratio (SNR). Consequently, the wavelet and scaling functions associated with the selected filters are acknowledged as the most effective choice for achieving the task of de-noising. Simulation results show that using the proposed method and the obtained wavelet improves the SNR of the noisy ECG signal by about 2.5 dB. While Majumdar [21] describes a proposed method for de-noising ECG signals using wavelet energy and a sub-band smoothing filter. In contrast to the conventional approach of wavelet threshold de-noising, this novel method exclusively targets wavelet coefficients necessitating threshold de-noising, determined through wavelet energy analysis. Meanwhile, it retains the original values of other coefficients. Furthermore, the technique incorporates a sub-band smoothing filter to amplify the ECG signal's quality through advanced noise reduction. The experimental results show that the proposed method effectively removes noise from the noisy ECG signals compared to existing methods. In recent years, advancements in medical research have led to significant breakthroughs in the field of cardiac health and diagnostics. One notable area of progress has been the development of innovative techniques for analyzing ECG signals, aiming to detect critical features like the QRS complex and R-peaks with remarkable accuracy and efficiency. Research such as study [22] highlights the integration of chaos analysis, short-time Fourier transform (STFT), and principal component analysis (PCA) to automate QRS complex detection, offering impressive sensitivity and accuracy rates. In a similar vein, Gupta et al. [23] introduces a novel application of PCA for R-peak detection, avoiding the need for pre-processing in noisy ECG signals. Meanwhile, Gupta et al. [24] presents a computer-aided diagnosis system utilizing chaos analysis to extract non-linear patterns in ECG signals, enhancing arrhythmia detection. Beyond ECG analysis, other studies such as studies [25] and [26] apply machine learning techniques to retinal blood vessel segmentation and the identification of high-risk carotid artery plaques, demonstrating the potential for automated disease detection and prevention. Additionally, research like [27] explores the importance of collateral circulation in preserving myocardium during coronary artery occlusion, emphasizing the need for accurate collateral flow assessment in surgical planning. Furthermore, Li et al. [28] introduces a motion compensation method for 3D coronary artery reconstruction, which proves effective in reducing artifacts and improving image quality. Finally, Velut et al. [29] analyzes coronary trees using magnetic resonance angiography (MRA) to estimate the capability of MRA in providing insights into the vascular network. This collective body of research represents a significant leap forward in the diagnosis and treatment of cardiovascular and arterial conditions, promising enhanced accuracy, automation, and patient care in the field of cardiac health. The utilization of wavelet transform, an advanced and effective technique for noise reduction, has gained prominence in enhancing the performance of ECG signal processing algorithms, as demonstrated in previous studies [18]-[29]. However, it is noteworthy that, up to this point, wavelet transform-based signal processing has primarily been confined to traditional computer-based processing platforms and software applications like MATLAB and LabVIEW. One notable gap in the existing research landscape is the limited exploration of implementing wavelet transform algorithms for ECG signal processing within embedded systems, specifically microcontrollers. To date, there has been a dearth of investigations into the adaptation of wavelet transform techniques to microcontroller-based ECG signal processing. This represents an uncharted territory in which the potential benefits of wavelet transform, known for its efficacy in noise reduction, have yet to be fully realized. Therefore, this research endeavors to bridge this gap by presenting a novel approach: the application of wavelet transforms principles for ECG signal processing on a microcontroller, specifically the node MCU. This pioneering effort seeks to unlock the advantages of wavelet transform in noise elimination within the context of resource-constrained embedded systems, potentially extending its utility to a broader range of real-world applications.
  • 4. Int J Elec & Comp Eng ISSN: 2088-8708  Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin) 1533 2. ECG SIGNAL PROCESSING PROCESS There is noise in the measured ECG data. A data processing step is required to get rid of the noise and get a clear signal. Signal processing entails two steps: Wideband noise removal and baseline wandering noise removal both employ the wavelet transform approach. Wavelet transform: wavelet transform is a commonly used method for signal estimation [30], [31] and signal compression [32]. Since the Fourier transform simply analyzes the signal in terms of frequency, the wavelet transform transforms the signal to be considered in terms of position and frequency [30]. So, the wavelet transforms signal exhibits less distortion as a result. The ECG signal is also a type of non-stationary signal since it represents the electrical activity of the heart during each heartbeat, which changes over time [33]. A Fourier transform that is appropriate for the analysis of discrete signals is therefore inappropriate. The wavelet transform's foundation is the extraction of the signal's edge components so that each sub-characteristics components can be considered [31]. Definition of wavelet transformation in mathematics constant is π‘Š(π‘Ž, 𝑏) = ∫ 𝑓(𝑑)πœ“π‘Ž,𝑏(𝑑)𝑑𝑑 ∞ βˆ’βˆž (1) πœ“π‘Ž,𝑏(𝑑) = 1 βˆšπ‘Ž πœ“βˆ— ( π‘‘βˆ’π‘ π‘Ž ) (2) When 𝑓(𝑑) is signal, πœ“π‘Ž,𝑏(𝑑) is an analytical function with a time shift, scalability feature. In practice, we can use the discreate wavelet transform to calculate the coefficients for each order of subcomponents (decomposition). The decomposition can use a set of finite impulse response (FIR) filters that act as low pass filters and high pass filters. Then, reduce the sample frequency in half (down sampling). It is possible to employ the discrete wavelet transform algebraically; the fundamental convolution procedures are given π‘Žπ‘› (𝑖) = βˆ‘ π‘”π‘˜π‘Ž2π‘›βˆ’π‘˜ (π‘–βˆ’1) 𝑖 = 1, 2, … , 𝑗 π‘βˆ’1 π‘˜=0 (3) 𝑑𝑛 (𝑖) = βˆ‘ β„Žπ‘˜π‘Ž2π‘›βˆ’π‘˜ (π‘–βˆ’1) π‘Žπ‘› (0) = π‘₯𝑛 π‘βˆ’1 π‘˜=0 (4) When π‘Žπ‘› (𝑖) is approximation coefficients in component 𝑖 of low pass filters and 𝑑𝑛 (𝑖) is detail coefficients in component 𝑖 of high pass filters. For input signal N and the coefficient of the low-pass filter (π‘”π‘˜) and high pass filter (β„Žπ‘˜) defined by the mother wave function [34]. The Daubechies 6 function (db06), which has a signal structure resembling the ECG signal, was used for this study [35]. 3. ECG SIGNAL PROCESSING ALGORITHM ON NODE MCU An algorithm for ECG signal analysis using wavelet transform techniques on a node MCU microcontroller consists of five blocks: ECG signal acquisition, moving average, wavelet transform, peak detection, and heart rate calculation, as shown in Figure 1. The signal acquisition function stores the ECG signal (block 1), which has a frequency of 125 Hz, in a data array. The data array requires two R-peaks for heart rate calculations. To accurately capture both peaks of the heart rate data, a minimum of 200 data points need to be collected in the array. Nonetheless, if the number of arrays is fewer than 200, it is possible that two R-peaks may not be present in the louder array, potentially leading to erroneous heart rate calculations by the algorithm. The captured ECG signal is affected by two types of noise: baseline noise, caused by breathing or body movements, which has a low frequency, and wideband noise, caused by muscle artifacts and instrumentation noise. Baseline noise and wideband noise are two types of noise that can affect the quality of an electrocardiogram (ECG) signal. ECG is a vital medical test used to record the electrical activity of the heart over time. Noise in the ECG signal can obscure important information and make it difficult to interpret the results accurately. Therefore, both signals are incorporated into the original data for processing, allowing us to assess the effectiveness of our proposed algorithm. Hence, within the program designed for embedded into the microcontroller, it utilizes a total of 54,886 bytes of global memory (equivalent to 67% of the total memory). In our simulation, all 10-second ECG signals are stored on an external memory card. The Node MCU reads the data from the memory card and stores it in a data buffer as if it were reading from an ECG sensor. When executing a single cycle of the program to process ECG signals, the average total execution time is 249 milliseconds. This duration is deemed suitable for real-time display should the algorithm be employed in real-life scenarios in the future. The moving average function (block 2) is an alternative form of averaging that differs from the conventional averaging method in which all data are averaged. Moving averages employ a fixed number of windows to average and shift the windows according to the position of the data. In signal processing, moving
  • 5.  ISSN: 2088-8708 Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543 1534 averages are utilized to smooth signals from short-term overshoots or fluctuations caused by noise, serving as a high-pass filter. However, there exist filters that are more effective than moving average filters but are also more complex and unwieldy. Thus, to reduce complexity and processing time to suit the capabilities of the node MCU, this article utilizes a moving average for baseline noise elimination. Figure 2 illustrates the working process of the moving average function. The process begins by initializing the window size to 49 and calculating the mean of the data in the window range. By adjusting the size of the moving window, you can control the degree of noise reduction versus the level of detail preservation. Larger window sizes result in greater noise reduction but can also smooth out genuine signal variations. Window scaling experiments show that a window size of 49 is suitable for eliminating low-frequency noise generated in ECG signals. A window size of 49 was chosen for the implementation of the moving average filter to effectively mitigate low- frequency noise, such as baseline noise, in our simulations. The mean is computed using the position of the data as the middle position of that window, and the position of the data is shifted until it reaches the data in the last position. As a result of the moving average, we obtain a signal that resembles baseline noise. Consequently, when we subtract this signal from the noisy ECG signal, we eliminate the baseline noise. However, it is important to note that while moving average filters are effective for reducing low-frequency noise, they may not be as effective at removing high-frequency noise or preserving sharp transitions in the signal. The choice of filter type and parameters should be based on the specific characteristics of the noise and the desired signal fidelity. Hence, an additional step is necessary to eliminate noise by employing wavelet transform. Figure 1. Flow diagram of algorithm ECG signal processing on Node MCU Initialization: window=49, sum=0, k=0 for i=0 until i<length of ECG_noise for j= –(window–1)/2 until j=(window–1)/2 if (i–j) not in range of ECG_noise do nothing; else sum=sum+ECG_noise(i–j); k=k+1; end if end for base_line(i)=sum/k; ECG_remove_baseline(i)=ECG_noise(i)–base_line(i); k=0; end for Figure 2. Pseudo code of moving average part In wavelet transform function (block 3), a wideband noise elimination technique using wavelet transform is employed. The wavelet transform is utilized to decompose a signal into its frequency components, similar to the Fourier transform. However, the Fourier transform only provides the frequencies contained in the signal and may not be applicable to all signals, such as ECG signals with sudden changes of short duration. In contrast, wavelet transformation separates time-domain signal components by utilizing two
  • 6. Int J Elec & Comp Eng ISSN: 2088-8708  Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin) 1535 fundamental properties: scale and location. While the Fourier transform primarily provides frequency information, the wavelet transform exhibits a distinct advantage when applied to signals characterized by abrupt, short-duration changes, as is often the case with ECG signals. It is worth emphasizing that the wavelet transform provides a dual perspective, offering insights into both frequency and time-domain characteristics, rendering it particularly well-suited for the comprehensive analysis of ECG signals. Moreover, wavelet transformations reduce the size of the data to half of the original size while preserving all important characteristics. Therefore, wavelet transform was chosen to eliminate wideband confounding. Figure 3 illustrates the discrete wavelet transform utilizing the convolution principle. The input signal (x) that has been processed with baseline noise is convolved with the signal h, which is the filter coefficient of the mother wavelet. The convolution process results in a signal with a length of (x) + length (mother wave) – 1. Only the odd-numbered indices, which are the sum of the low-frequency component signals, are selected from this result, known as the approximation coefficients. The approximation coefficients eliminate wideband noise and reduce the size of the ECG signal by half, while preserving its essential characteristics. This process also reduces the time required to calculate the maximum peak in the next step. Initialization: Size of variable x, y, z =length of (x+h)–1 for i=0 until i<length of x for j=0 until j≀i y(i)=y(i)+x(j)*h(i–j); end for end for ECG_decomposition=odd index of y Figure 3. Pseudo code of wavelet transform part The function 4,5 in ECG signal processing is peak detection (block 4) and the calculation of the heart rate (block 5) value of the data set. As the ECG signal data stored in the array (ECG_decomposition array) only has two peaks, we can split the data into two parts and determine the maximum value in each segment. The highest value in the first part corresponds to the highest peak R1, and the highest value in the second part corresponds to the highest peak R2. The program will then store the position of each peak value. The position values of the two R peaks are subsequently subtracted to determine the time difference, which is then multiplied by 0.016 (βˆ†T=1/62.5) to find the heart rate frequency, expressed as the number of beats per minute by multiplying by 60 seconds. This process is show in Figure 4. Initialization: peak_1=0; peak_2=0; Pos_peak1=0; Pos_peak2=0; for i=0 until length(ECG_decomposition)/2 if ECG_decomposition(i)>peak_1 Pos_peak1=i; end if end for for i=length(ECG_decomposition)/2 until length(ECG_decomposition) if ECG_decomposition(i)>peak_2 Pos_peak2=i; end if end for HR=(1/(Pos_peak2–Pos_peak2)*0.016)*60; Figure 4. Pseudo code of peak detection part and heartrate calculation 4. RESULTS AND DISCUSSION As part of the experimental and performance analysis, as well as validation of the algorithm for analyzing ECG signals using the wavelet transform technique developed for use on the node MCU board presented in this article. We have divided the experiment into two parts to study the efficiency of using the wavelet transform principle for noise elimination in ECG signals. Part one validates the noise elimination algorithm for node MCU compared to reliable wavelet transform programs. The second part examines the algorithm's performance against the normal human heart rate range (65-85 bpm), and analyzes and tests the performance of the selected mother wavelet for synthetic ECG signal analysis.
  • 7.  ISSN: 2088-8708 Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543 1536 To validate the ECG signal analysis algorithm employing the wavelet transform method implemented on the node MCU board, we performed a comparative analysis of the results with a widely recognized function in the reliable computer programs, known for its established credibility in ECG signal analysis. Figure 5 illustrates an example of the comparative results, showing that the ECG signal analysis algorithm utilizing the wavelet transform technique, executed on the node MCU board, exhibits similarities to the use of pre-existing functions in reliable computer programs, with a correlation coefficient of 0.99. The correlation coefficient indicates that the ECG signals processed by the algorithm running on the node MCU exhibit similarity to those processed using the function within the robust program. This observation serves as empirical evidence supporting the correctness and suitability of the wavelet transform algorithm implemented on the node MCU for ECG signal analysis. Figure 5. Comparison of the results of wavelet (Micro) with the function of computer programs The second part of our study aims to analyze the selection of an appropriate mother wavelet for processing ECG signals without interference to validate the true capabilities of the ECG signal processing algorithms. To simulate pure ECG signals without any interference, we generated a simulated ECG signal with varying heart rates of 65, 70, 75, 80, and 85 beats per minute at a sampling frequency of 125 Hz. Investigating algorithm efficiency often involves introducing noise to the original signal. In a previous study [36], noise was incorporated within a range of -12 to 12 dB to assess the performance of beat detection algorithms. In our current research, we have introduced two specific types of noise: baseline noise with an amplitude of 50 mV and wideband noise with a power level of 15 dB. Figure 6 provides an example of a simulated ECG signal with a heart rate of 85 beats per minute. Figure 5 has been to visually represent the ECG signal illustrating the efficacy of a window size of 49 in effectively eliminating the baseline noise in Figure 6. Figure 6. Synthetic ECG and Noisy synthetic ECG with heart rate 85 bmp As mentioned earlier, the wavelet transform method relies on wavelet coefficients that function as weights for each frequency component level. Therefore, it is essential to select a coefficient function for the mother wavelet that is suitable for the signal being processed. However, previous studies have shown that the use of different mother wavelets for ECG signal analysis yields varying performance results. Since ECG signal analysis and noise elimination are typically performed on computers with ample computational resources, wavelet transform method can be applied at multiple levels to obtain the best possible signal. However, due to resource constraints on microcontroller boards, the ECG signal analysis algorithm presented -100 0 100 200 300 400 0 1 2 3 4 5 6 7 8 9 10 ECG (mV) Time (sec) Wavelet (computer programs) Wavelet (Micro) -100 0 100 200 300 400 0 1 2 3 4 5 6 7 8 9 10 ECG (mV) Time (sec) Original Noisy
  • 8. Int J Elec & Comp Eng ISSN: 2088-8708  Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin) 1537 here only performs a one-level wavelet transform. Therefore, to determine the most efficient and suitable mother wavelet for the ECG signal analysis algorithm, we apply the wavelet transform method on a microcontroller board. We evaluate the performance of several commonly used mother wavelets, including db4, db5, db9, coif5, bior3.3, and Sym4, which have demonstrated high efficiency in past research. Additionally, we test the basic mother wavelet Haar, which has the fewest coefficients among the mother wavelets and requires less memory, to assess its performance and compare it with the other mother wavelets commonly used for analyzing ECG signals. The choice of mother wavelets, including Harr, db4, db5, db9, coif5, bior3.3, and Sym4, for evaluating their performance in ECG noise elimination is based on several factors relevant to wavelet analysis and signal processing. These wavelets are part of a broader family of wavelets with distinct properties, and their selection is motivated by various considerations. Firstly, the selected wavelets belong to different wavelet families (e.g., Daubechies, Coifman, Biorthogonal, Symlet), each characterized by unique properties and filtering capabilities. This diversity enables us to investigate the influence of various wavelet families on the efficacy of ECG noise elimination. Figures 7 to 13 depicts a comparison between the original ECG signal and the ECG signal processed to eliminate noise by the wavelet transform method using different mother wavelets, namely Harr, db4, db5, db9, coif5, bior3.3, and Sym4. As observed from the figure, the signal processing technique successfully eliminates the baseline noise with an amplitude of 50 mV. However, for the wideband noise, the power of 15 dB can be eliminated but still leaving a little amount. Moreover, the wavelet transform method resulted in higher amplitude peaks of ECG signals Q, R, S, and T. However, the lowest amplitude P peak, which is close to the amplitude of the wideband noise, is almost absent. Figure 7. Result of ECG data processing algorithm using Harr wavelet with heart rate 85 bmp Figure 8. Result of ECG data processing algorithm using db4 wavelet with heart rate 85 bmp Figure 9. Result of ECG data processing algorithm using db5 wavelet with heart rate 85 bmp -100 0 100 200 300 400 0 1 2 3 4 5 6 7 8 9 10 ECG (mV) Time (sec) Original Wavelet (Micro) -100 0 100 200 300 400 0 1 2 3 4 5 6 7 8 9 10 ECG (mV) Time (sec) Original Wavelet (Micro) -100 0 100 200 300 400 0 1 2 3 4 5 6 7 8 9 10 ECG (mV) Time (sec) Original Wavelet (Micro)
  • 9.  ISSN: 2088-8708 Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543 1538 Figure 10. Result of ECG data processing algorithm using db9 wavelet with heart rate 85 bmp Figure 11. Result of ECG data processing algorithm using coif5 wavelet with heart rate 85 bmp Figure 12. Result of ECG data processing algorithm using bior3.3 wavelet with heart rate 85 bmp Figure 13. Result of ECG data processing algorithm using Sym4 wavelet with heart rate 85 bmp We consider the simulated ECG signal as a pristine reference signal, characterized by its cleanliness and clarity. This reference signal is subsequently subjected to the addition of both baseline and wideband noise, thereby serving as a benchmark for evaluating the efficacy of the noise removal algorithm based on the wavelet transform principle. To substantiate the effectiveness of ECG signal processing employing the wavelet transform principle and to select the appropriate mother wavelet, we rely on quantitative measures frequently employed in prior research. These measures encompass signal-to-noise ratio (SNR), correlation coefficients between the original ECG signals and the processed signal (r), as well as the root mean square error (RMSE), as defined by (5) to (7): -100 0 100 200 300 400 0 1 2 3 4 5 6 7 8 9 10 ECG (mV) Time (sec) Original Wavelet (Micro) -100 0 100 200 300 400 0 1 2 3 4 5 6 7 8 9 10 ECG (mV) Time (sec) Original Wavelet (Micro) -100 0 100 200 300 400 0 1 2 3 4 5 6 7 8 9 10 ECG (mV) Time (sec) Original Wavelet (Micro) -100 0 100 200 300 400 0 1 2 3 4 5 6 7 8 9 10 ECG (mV) Time (sec) Original
  • 10. Int J Elec & Comp Eng ISSN: 2088-8708  Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin) 1539 𝑆𝑁𝑅(𝑑𝑏) = 10π‘™π‘œπ‘”10 ( βˆ‘ [π‘ π‘œ(𝑛)]2 π‘βˆ’1 𝑛=0 βˆ‘ [π‘ π‘Ÿπ‘’(𝑛)βˆ’π‘ π‘œ(𝑛)]2 π‘βˆ’1 𝑛=0 ) (5) π‘Ÿ = βˆ‘ (π‘ π‘œβˆ’π‘ π‘œ Μ…Μ…Μ…)βˆ™(π‘ π‘Ÿπ‘’βˆ’π‘ π‘Ÿπ‘’ Μ…Μ…Μ…Μ…Μ…) π‘βˆ’1 𝑛=0 βˆšβˆ‘ (π‘ π‘œβˆ’π‘ π‘œ Μ…Μ…Μ…)2 π‘βˆ’1 𝑛=0 βˆ‘ (π‘ π‘Ÿπ‘’βˆ’π‘ π‘Ÿπ‘’ Μ…Μ…Μ…Μ…Μ…)2 π‘βˆ’1 𝑛=0 (6) 𝑅𝑀𝑆𝐸 = √ 1 𝑁 βˆ‘ (π‘ π‘Ÿπ‘’(𝑛) βˆ’ π‘ π‘œ(𝑛))2 π‘βˆ’1 𝑛=0 (7) when π‘ π‘œ is the original ECG signal and π‘ π‘Ÿπ‘’ is the processed ECG signal. The SNR is a measure of the quality of a signal, indicating how much the signal power in a given signal compares to the noise power. Figure 14 show the SNR of each mother wavelet used with different heart rates, ranging from 65 to 85 bpm in increments of 5 bpm. The results indicate that the SNR of every mother wavelet increases with increasing heart rate. Among the mother wavelets, the db4 wavelet exhibited the highest SNR values for heart rates of 65, 70, 80, and 85 bpm, with values of 6.44, 6.67, 6.93, and 7.06, respectively. In contrast, the db9 wavelet yielded the highest SNR at 75 bpm with a value of 6.90, while the bior3.3 wavelet had the lowest SNR values overall. Figure 15 presents the average SNR values of all heart rates to determine the mother wavelet that yielded the highest SNR. The db4 wavelet yielded the highest mean SNR of 6.77, while the bior3.3 wavelet had the lowest mean SNR of 5.83. Heart rate, denoting the frequency of heart beats per minute, serves as a fundamental physiological parameter. A higher heart rate signifies an increased rate of cardiac contractions, resulting in a greater number of cardiac cycles occurring within a specified temporal interval. In the context of ECG data, each cardiac cycle manifests as a distinctive pattern characterized by key waveforms, including the P-wave, QRS complex, and T-wave. These waveforms, collectively termed fiducial points, hold invaluable diagnostic information. Elevations in heart rate correspond to a heightened occurrence of cardiac cycles per unit of time. Consequently, the fiducial points (P, QRS, T) materialize more frequently within the ECG signal. This heightened frequency enhances their distinctiveness amidst the backdrop of potential noise, thereby augmenting the SNR within the ECG signal. Figure 14. SNR of mother wavelets with different heart rates Figure 15. Comparison between the mother wavelet in terms of the mean SNR 6.27 6.27 6.54 6.69 6.77 6.44 6.67 6.73 6.93 7.06 6.28 6.54 6.69 6.71 6.92 6.43 6.67 6.90 6.79 6.87 6.39 6.54 6.75 6.68 6.85 5.54 5.74 5.95 5.83 6.09 6.39 6.65 6.71 6.92 6.92 5.0 5.2 5.4 5.6 5.8 6.0 6.2 6.4 6.6 6.8 7.0 7.2 HR = 65 HR = 70 HR = 75 HR = 80 HR = 85 SNR Heart rate (beats per minute) Haar db4 db5 db9 coif5 bior3.3 Sym4 6.51 6.77 6.63 6.73 6.64 5.83 6.72 5.00 5.50 6.00 6.50 7.00 Haar db4 db5 db9 coif5 bior3.3 Sym4 SNR Mother wavelet
  • 11.  ISSN: 2088-8708 Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543 1540 Figure 16 show the correlation coefficient between the original ECG signal and the processed ECG signal, wherein a value close to 1 indicates that the signal processing algorithm can eliminate a significant amount of noise and that the processed ECG signal is similar to the original signal. From Figure 16, it was observed that as the heart rate increased, the correlation coefficient also increased. This observation corresponds to the SNR illustrated in Figure 14 because a high SNR indicates that the algorithm can eliminate noise and leave only the original ECG signal, resulting in a high correlation coefficient. Upon considering each mother wavelet, it was found that all mother wavelets yielded similar correlation coefficients. However, db4, db9, coif5, and sym4 produced the highest correlation coefficients. Figure 17 shows the average correlation coefficients of all heart rates, which demonstrated that the mother wavelet with the highest correlation coefficient, db4 was 0.955. Figure 18. illustrates the RMSE for each heart rate. It was discovered that when heart rates were at 65, 80, and 85, the utilization of the mother wavelet db4 resulted in the lowest RMSE values of 28.95, 30.23, and 30.69, respectively. Meanwhile, the mother wavelet db9 resulted in the lowest RMSE values at heart rates of 70 and 75, with values of 28.71 and 29.24, respectively. On the other hand, the mother wavelet bior3.3 produced the highest error, which is consistent with the SNR and the lowest correlation coefficient. Figure 19. illustrates the average RMSE across all heart rates, which was found to be the lowest for db4 at 29.74. A suitable mother wavelet for ECG signals depends on several factors, including the characteristics of the ECG signal, the required resolution in time and frequency domains, and the specific application of interest. One commonly used mother wavelet for ECG signals is the Daubechies wavelet. It has a compact support, which means that it is localized in time and frequency domains. This property makes it well-suited for analyzing signals with abrupt changes, such as ECG signals that contain QRS complexes. Another commonly used mother wavelet for ECG signals is the Symlet wavelet. It has similar properties to the Daubechies wavelet but with slightly better time-frequency localization. Other wavelets that can be used for ECG signal analysis include the Coiflet wavelet, the Biorthogonal wavelet, and the Harr wavelet. The choice of the mother wavelet can also depend on the specific application of interest. It is important to note that the choice of the mother wavelet is not the only factor that determines the performance of wavelet-based ECG signal analysis methods. Other factors such as the decomposition level, thresholding method, and feature extraction techniques should also be considered. Figure 16. Correlation coefficient of mother wavelets with different heart rates Figure 17. Comparison between the mother wavelet in terms of the mean correlation coefficient 0.933 0.938 0.946 0.952 0.960 0.940 0.948 0.955 0.961 0.968 0.939 0.945 0.952 0.958 0.966 0.941 0.949 0.955 0.960 0.968 0.941 0.948 0.955 0.960 0.967 0.931 0.938 0.946 0.950 0.959 0.940 0.949 0.955 0.960 0.967 0.85 0.87 0.89 0.91 0.93 0.95 0.97 0.99 HR = 65 HR = 70 HR = 75 HR = 80 HR = 85 Correlation coefficient Heart rate (beats per minute) Haar db4 db5 db9 coif5 bior3.3 Sym4 0.946 0.955 0.952 0.954 0.953 0.945 0.954 0.940 0.945 0.950 0.955 0.960 Haar db4 db5 db9 coif5 bior3.3 Sym4 Correlation coefficient Mother wavelet
  • 12. Int J Elec & Comp Eng ISSN: 2088-8708  Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin) 1541 Figure 18. RMSE of mother wavelets with different heart rates Figure 19. Comparison between the mother wavelet in terms of the mean RMSE In the context of R-wave identification, our algorithm stands out as a straightforward and efficient solution suitable for implementation in microcontrollers. It exhibits a commendable ability to precisely pinpoint the R-peaks within the array data, enabling us to subsequently compute the temporal separation between these R-peaks in alignment with the data sampling frequency. However, it is worth noting that more sophisticated algorithms, as referenced in [22], [23] are available for the accurate localization of QRS peaks. When such algorithms are applied to determine the positions of these peaks with precision, the timing of these peak occurrences can prove valuable in the diagnosis of heart diseases. 5. CONCLUSION The article describes a study on the use of wavelet transform principles for analyzing ECG signals to eliminate interference that may occur during measurement. The article presents an algorithm that can eliminate interference using wavelet transform principles processed in a node MCU and a peak detection algorithm for calculating heart rate. The algorithm was tested on both simulated and real ECG signals using parameters such as SNR, correlation coefficient, and RMSE to evaluate performance. In the study of the performance of the ECG signal processing algorithm, we conducted two tests. The first test aimed to validate the accuracy of the wavelet transform algorithm used in the node MCU by comparing it with the computer program’s built-in function. The results showed that the algorithm was accurate with a correlation coefficient of 0.99. The second test aimed to determine the most suitable mother wavelet for selecting heart rate in the range of 65-85 beats per minute, which is the normal human heart rate. The db4 mother wavelet was found to be the most suitable, based on the best values of average SNR, correlation coefficient, and RMSE, which were 6.77, 0.954, and 29.74, respectively. The results showed that the most appropriate mother wavelet for signal processing in the simulation model was the db4 wavelet, which provided the highest average SNR and correlation coefficient values. The db9 wavelet also provided a low average RMSE value and SNR and correlation coefficient values that were similar to those of the db4 wavelet. In this paper, we demonstrate the feasibility of implementing complex algorithms, such as the wavelet transform, for ECG noise elimination on a small microcontroller. Furthermore, the test results demonstrate the accurate performance of the algorithm for detecting the two R-peaks within the ECG array data, facilitating precise heart rate calculations. Furthermore, we present the results obtained from employing various mother waveforms to analyze and assess their efficiency. However, due to memory constraints, the frequency sampling rate was limited to 125 Hz, and the filter bank output frequency was reduced by half. This resulted in the wavelet transform 29.50 30.07 30.47 31.08 31.76 28.95 28.99 29.81 30.23 30.69 29.49 29.14 29.97 31.00 31.18 28.96 28.71 29.24 30.70 31.37 29.10 28.71 29.76 31.09 31.46 32.10 31.96 32.62 34.31 34.32 29.12 28.78 29.88 30.25 31.21 25 26 27 28 29 30 31 32 33 34 35 HR = 65 HR = 70 HR = 75 HR = 80 HR = 85 RMSE Heart rate (beats per minute) Haar db4 db5 db9 coif5 bior3.3 Sym4 30.57 29.74 30.16 29.79 30.02 33.06 29.85 29.0 29.5 30.0 30.5 31.0 31.5 32.0 32.5 33.0 33.5 34.0 Haar db4 db5 db9 coif5 bior3.3 Sym4 RMSE Mother wavelet
  • 13.  ISSN: 2088-8708 Int J Elec & Comp Eng, Vol. 14, No. 2, April 2024: 1530-1543 1542 being performed on only one level, which allowed some noise to remain in the signal. Increasing the sampling rate or using more complex multiresolution algorithms to process the signals would be a challenge in future research. Finally, the proposed algorithm prototype exhibits significant potential for a diverse range of applications that extend beyond the realm of remote medicine. Notable among these applications are the utilization in wearable health devices, remote monitoring, health and wellness Apps, healthcare facilities in resource-limited areas, education and training, as well as home monitoring for chronic patients. These identified applications underscore the algorithm's adaptability and its capacity to thrive within a spectrum of healthcare and medical technology contexts, rendering it an asset for advancing cardiac care and diagnosis. Within the constraints of price accessibility to the general public and the requisite quality standards. REFERENCES [1] K. Okereafor, O. Adebola, R. Djehaiche, M. El, and B. El, β€œExploring the potentials of telemedicine and other non-contact electronic health technologies in controlling the spread of the novel coronavirus disease (Covid-19),” SSRN Electronic Journal, vol. 8, pp. 1–14, Apr. 2020. [2] J. Kaminski, β€œInformatics in the time of COVID-19,” Canadian Journal of Nursing Informatics, vol. 15, no. 1, 2020. [3] A. Doshi, Y. Platt, J. R. Dressen, B. K. Mathews, and J. C. Siy, β€œKeep calm and log on: Telemedicine for COVID-19 pandemic response,” Journal of Hospital Medicine, vol. 15, no. 5, pp. 302–304, Apr. 2020, doi: 10.12788/jhm.3419. [4] J. E. Hollander and B. G. Carr, β€œVirtually perfect? telemedicine for Covid-19,” New England Journal of Medicine, vol. 382, no. 18, pp. 1679–1681, Apr. 2020, doi: 10.1056/nejmp2003539. [5] S. Nataraja and P. Nataraja, β€œIoT based application for e-health an improvisation for lateral rotation,” in RTEICT 2017 - 2nd IEEE International Conference on Recent Trends in Electronics, Information and Communication Technology, Proceedings, May 2017, vol. 2018-Janua, pp. 1018–1021. doi: 10.1109/RTEICT.2017.8256753. [6] M. F. Domingues et al., β€œInsole optical fiber sensor architecture for remote gait analysis - an e-health solution,” IEEE Internet of Things Journal, vol. 6, no. 1, pp. 207–214, Feb. 2019, doi: 10.1109/JIOT.2017.2723263. [7] E. Patti, M. Donatelli, E. Macii, and A. Acquaviva, β€œIoT software infrastructure for remote monitoring of patients with chronic metabolic disorders,” in Proceedings - 2018 IEEE 6th International Conference on Future Internet of Things and Cloud, FiCloud 2018, Aug. 2018, pp. 311–317. doi: 10.1109/FiCloud.2018.00052. [8] T. N. Gia et al., β€œIoT-based continuous glucose monitoring system: A feasibility study,” Procedia Computer Science, vol. 109, pp. 327–334, 2017, doi: 10.1016/j.procs.2017.05.359. [9] L. Ungurean and A. Brezulianu, β€œAn internet of things framework for remote monitoring of the healthcare parameters,” Advances in Electrical and Computer Engineering, vol. 17, no. 2, pp. 11–16, 2017, doi: 10.4316/AECE.2017.02002. [10] V. Choudhari, V. Dandge, N. Choudhary, and R. G. Sutar, β€œA portable and low-cost 12-lead ECG device for sustainable remote healthcare,” in Proceedings - 2018 International Conference on Communication, Information and Computing Technology, ICCICT 2018, Feb. 2018, vol. 2018-Janua, pp. 1–6. doi: 10.1109/ICCICT.2018.8325879. [11] M. S. Hossain and G. Muhammad, β€œCloud-assisted industrial internet of things (IIoT) - enabled framework for health monitoring,” Computer Networks, vol. 101, pp. 192–202, Jun. 2016, doi: 10.1016/j.comnet.2016.01.009. [12] T. Nguyen Gia et al., β€œLow-cost fog-assisted health-care IoT system with energy-efficient sensor nodes,” in 2017 13th International Wireless Communications and Mobile Computing Conference, IWCMC 2017, Jun. 2017, pp. 1765–1770. doi: 10.1109/IWCMC.2017.7986551. [13] M. Neyja, S. Mumtaz, K. M. S. Huq, S. A. Busari, J. Rodriguez, and Z. Zhou, β€œAn IoT-based e-health monitoring system using ECG signal,” in 2017 IEEE Global Communications Conference, GLOBECOM 2017 - Proceedings, Dec. 2017, vol. 2018-Janua, pp. 1–6. doi: 10.1109/GLOCOM.2017.8255023. [14] M. R. F. Nurdin, S. Hadiyoso, and A. Rizal, β€œA low-cost Internet of Things (IoT) system for multi-patient ECG’s monitoring,” in ICCEREC 2016 - International Conference on Control, Electronics, Renewable Energy, and Communications 2016, Conference Proceedings, Sep. 2017, pp. 7–11. doi: 10.1109/ICCEREC.2016.7814958. [15] M. I. Rizqyawan, M. F. Amri, R. P. Pratama, and A. Turnip, β€œDesign and development of Android-based cloud ECG monitoring system,” in Proceedings - 2016 3rd International Conference on Information Technology, Computer, and Electrical Engineering, ICITACEE 2016, 2017, pp. 1–5. doi: 10.1109/ICITACEE.2016.7892444. [16] M. D’Aloia, A. Longo, and M. Rizzi, β€œNoisy ECG signal analysis for automatic peak detection,” Information (Switzerland), vol. 10, no. 2, p. 35, Jan. 2019, doi: 10.3390/info10020035. [17] A. S. Ahmed, K. S. Rijab, and S. A. Alagha, β€œA study of chosen an optimum type of wavelet filter for de-noising an ECG signal,” International Journal of Current Engineering and Technology, vol. 10, no. 05, pp. 749–756, Oct. 2020, doi: 10.14741/ijcet/v.10.5.9. [18] P. Karthikeyan, M. Murugappan, and S. Yaacob, β€œECG signal denoising using wavelet thresholding techniques in human stress assessment,” International Journal on Electrical Engineering and Informatics, vol. 4, no. 2, pp. 306–319, Jun. 2012, doi: 10.15676/ijeei.2012.4.2.9. [19] V. M. Kaviri, M. Sabaghi, and S. Marjani, β€œDe-noising of ECG signals by design of an optimized wavelet,” Circuits and Systems, vol. 07, no. 11, pp. 3746–3755, 2016, doi: 10.4236/cs.2016.711314. [20] D. Zhang et al., β€œAn ECG signal de-noising approach based on wavelet energy and sub-band smoothing filter,” Applied Sciences (Switzerland), vol. 9, no. 22, p. 4968, Nov. 2019, doi: 10.3390/APP9224968. [21] A. D. S. Majumdar, β€œComparative analysis of Coiflet and Daubechies wavelets using global threshold for image de-noising,” International Journal of Advances in Engineering and Technology, vol. 6, pp. 2247–2252, 2013. [22] V. Gupta and M. Mittal, β€œQRS complex detection using STFT, chaos analysis, and PCA in standard and real-time ECG databases,” Journal of The Institution of Engineers (India): Series B, vol. 100, no. 5, pp. 489–497, Mar. 2019, doi: 10.1007/s40031-019-00398-9. [23] V. Gupta, N. K. Saxena, A. Kanungo, P. Kumar, and S. Diwania, β€œPCA as an effective tool for the detection of R-peaks in an ECG signal processing,” International Journal of System Assurance Engineering and Management, vol. 13, no. 5, pp. 2391–2403, Oct. 2022, doi: 10.1007/s13198-022-01650-0. [24] V. Gupta, M. Mittal, and V. Mittal, β€œChaos Theory: An emerging tool for arrhythmia detection,” Sensing and Imaging, vol. 21, no. 1, Feb. 2020, doi: 10.1007/s11220-020-0272-9.
  • 14. Int J Elec & Comp Eng ISSN: 2088-8708  Electrocardiogram signal processing algorithm on microcontroller using wavelet … (Akkachai Phuphanin) 1543 [25] K. Balasubramanian and N. P. Ananthamoorthy, β€œRobust retinal blood vessel segmentation using convolutional neural network and support vector machine,” Journal of Ambient Intelligence and Humanized Computing, vol. 12, no. 3, pp. 3559–3569, Oct. 2021, doi: 10.1007/s12652-019-01559-w. [26] X. Xu et al., β€œMulti-feature fusion method for identifying carotid artery vulnerable plaque,” Irbm, vol. 43, no. 4, pp. 272–278, Aug. 2022, doi: 10.1016/j.irbm.2021.07.004. [27] M. Harmouche, M. Maasrani, J. P. Verhoye, H. Corbineau, and A. Drochon, β€œCoronary three-vessel disease with occlusion of the right coronary artery: What are the most important factors that determine the right territory perfusion?,” Irbm, vol. 35, no. 3, pp. 149–157, Jun. 2014, doi: 10.1016/j.irbm.2013.11.002. [28] S. Li, J. C. Nunes, C. Toumoulin, and L. Luo, β€œ3D coronary artery reconstruction by 2D motion compensation based on mutual information,” Irbm, vol. 39, no. 1, pp. 69–82, Feb. 2018, doi: 10.1016/j.irbm.2017.11.005. [29] J. Velut, P. A. Lentz, D. Boulmier, J. L. Coatrieux, and C. Toumoulin, β€œAssessment of qualitative and quantitative features in coronary artery MRA,” Irbm, vol. 32, no. 4, pp. 229–242, Sep. 2011, doi: 10.1016/j.irbm.2011.05.002. [30] D. Popov, A. Gapochkin, and A. Nekrasov, β€œAn algorithm of daubechieswavelet transform in the final field when processing speech signals,” Electronics (Switzerland), vol. 7, no. 7, p. 120, Jul. 2018, doi: 10.3390/electronics7070120. [31] B. A. Rajoub, β€œAn efficient coding algorithm for the compression of ECG signals using the wavelet transform,” IEEE Transactions on Biomedical Engineering, vol. 49, no. 4, pp. 355–362, Apr. 2002, doi: 10.1109/10.991163. [32] I. Haider, M. Shahbaz, M. Abdullah, and M. Nazim, β€œFeature extraction for identification of extension and flexion movement of wrist using EMG signals,” in Canadian Conference on Electrical and Computer Engineering, May 2015, vol. 2015-June, no. June, pp. 792–795. doi: 10.1109/CCECE.2015.7129375. [33] B. R. de Oliveira, M. A. Q. Duarte, C. C. E. de Abreu, and J. V. Filho, β€œA wavelet-based method for power-line interference removal in ECG signals,” Research on Biomedical Engineering, vol. 34, no. 1, pp. 73–86, 2018, doi: 10.1590/2446-4740.01817. [34] M. K. Islam, A. N. M. M. Haque, G. Tangim, T. Ahammad, and M. R. H. Khondokar, β€œStudy and analysis of ECG signal using MATLAB & LABVIEW as effective tools,” International Journal of Computer and Electrical Engineering, pp. 404–408, 2012, doi: 10.7763/ijcee.2012.v4.522. [35] R. Haddadi, E. Abdelmounim, M. El Hanine, and A. Belaguid, β€œDiscrete wavelet transform based algorithm for recognition of QRS complexes,” in International Conference on Multimedia Computing and Systems -Proceedings, Apr. 2014, pp. 375–379, doi: 10.1109/ICMCS.2014.6911261. [36] Z. F. Apandi, R. Ikeura, S. Hayakawa, and S. Tsutsumi, β€œAn analysis of the effects of noisy electrocardiogram signal on heartbeat detection performance,” Bioengineering, vol. 7, no. 2, pp. 1–15, Jun. 2020, doi: 10.3390/bioengineering7020053. BIOGRAPHIES OF AUTHORS Akkachai Phuphanin received the B.Eng., M.Eng. and Ph.D degree in Telecommunication engineering from Suranaree University of Technology, Thailand, in 2019, 2011 and 2017, respectively. Currently, he is lecturer at the Department of Electrical Engineering, Rajamangala University of Technology Isan Sakonnakhon Campus. His research interests include wireless sensor networks and applications, reinforcement learning, learning (artificial intelligence), smart farm and home technology, coverage control, internet of thing, and signal processing. He can be contacted at email: akkachai.ph@rmuti.ac.th. Metha Tasakorn received the B.Eng. degree in industrial electrical technology from King Mongkut’s Institute of Technology North Bangkok (KMITNB), Bangkok, Thailand, in 1993, M.Sc. degree in electronics electrotechnics and automatics from UniversitΓ© Paris-Est CrΓ©teil Val-de-Marne, CrΓ©teil, France, in 2002. He is a lecturer with the Department of Electrical Engineering, Faculty of Industry and Technology, Rajamangala University of Technology Isan Sakon Nakhon Campus, Sakon Nakhon, 47160 Thailand. His research interests include biosensor, optical tweezer, robotics, power electronics, learning (artificial intelligence), smart farm and home technology and internet of thing. He can be contacted at email: metha.ta@rmuti.ac.th. Jeerapong Srivichai received the B.Eng. degree in electrical engineering from Pathumwan Institute of Technology, Bangkok, Thailand, in 2003 and the M.S. degree in electrical engineering from Kasetsart University, Bangkok, Thailand, in 2008 and Ph.D. degrees in electric engineering from Suranaree University of Technology, Nakhon Ratchasima, Thailand, in 2020. Currently, he is an assistant professor at the Department of Electrical Engineering, Rajamangala University of Technology Isan Sakonnakhon Campus. His research interests include railway electrification, electric vehicle, power electronics, induction heating. He can be contacted at email: geerapong.sr@rmuti.ac.th.