You are on page 1of 6

ECG Signal Processing using Offline-Wavelet

Transform Method based on ECG-IoT Device


M. Faizal Amri, Muhammad I. Rizqyawan, and Arjon Turnip
Technical Implementation Unit for Instrumentation
Development
Indonesian Institute of Sciences, Bandung, Indonesia
E-mails: mfai001@lipi.go.id

Abstract— In this paper, a wireless system for human heart subjects. This module can record, pre-processing the signals
monitoring/Electrocardiograph (ECG) based on Android and can transmit the signals wirelessly via Bluetooth with
Smartphones was proposed. The Cardiac signals was recorded other devices (in this experiment using a mobile phone based
from three electrodes and attached to a subject’s body that Android OS). The output signal from the module that
connected to the ECG amplifier module. In this module, the transmitted to the phone, monitored real time, and saved in
signals were pre-prosessed and sending the result to the database through cloud server via internet, simultaneously.
smartphone via Bluetooth. Next step, the result of signals stored
in the database (computer server) and SD card from Moreover, the recorded ECG signals can be processed
smartphones. Furthermore, the signals that stored were offline with signal processing algorithms for deeper analysis.
synchronized with Cloud Server through the Internet using the The acquired RAW signals need some process for canceling
Rest API as Final Data. The final data signal was displayed on the noises that contain in the signals. For the ECG signal
the web to be used by users in real time. Its can be used and processing, using wavelet transform (WT) is one of the
processed by algorithms of signal processing for further analysis methods for signal processing. Canceling the noises from the
using Wavelet Transform (WT). Finally, this system well used ECG signal in the time and frequency domain simultaneously
for application monitoring heart signals accurately . are some advantages using WT algorithm.
Keywords— ECG; Android; Signal Processing; IoT; Wavelet
Transform;
II. METHOD
I. INTRODUCTION
A. ECG recording
The development of communication technologies has
changed the way people in conducting their lives. One of the The ECG signals are widely used to analyze the
advances in the development of communications technologies abnormalities of the heart. The characters of ECGs are simple,
is a mobile phone with a variety of technologies that non-invasive and relatively inexpensive using by the
embedded in it. Particularly, mobile phones with Android OS researchers. The ECGs features extremely beneficial for health
and iOS operating system have developed impressively, both experiments. ECG signal recording is required to obtain
in hardware and software. Android OS and iOS have changed signals which are able to be analyzed and exploited.
mobile phones become sophisticated to be developed and Meanwhile, to get the ECG signal which able to analyze, the
utilized for different applications. One of them is the signals need to be processed to eliminate the noises caused by
utilization of smartphones with wireless communication outside factors, such as the movement of the subject when the
technologies in the health sector. The application has helped signal recording process performed.
the process of monitoring the patients condition by the doctors The ECG signal has a distinctive waveform that is shown
real time and wirelessly [1]. The simplicity of supervising in Fig. 1. One period of ECG waveform indicated one cycle
condition of the patients will enhance the effectiveness and distribution of blood transfer from heart to the arteries. Thus,
efficiency in the health sector. The doctors do not need to one cycle of ECG waveform consists of PQRST waves [4, 5].
meet the patients to monitoring the condition. It has done
remotely, wirelessly. For the experiment, we used phones with
androidOS as the device for monitoring that able to
synchronize with the server/cloud using the internet. The
monitoring patient’s system will be more enhanced with this
facility [2, 3] compared to the ordinary systems.
In this paper, the system for recording and monitoring
ECG signals using the internet based mobile phone and the
cloud system are proposed. ECG signals processing based on
offline system also conducted. The system consists of an ECG Fig. 1. Normal ECG Wave.
recording module attached to the body of the observed

Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on April 22,2021 at 00:14:33 UTC from IEEE Xplore. Restrictions apply.
The PQRST waves have some distinctive character for The recording experimental data are obtained from several
detecting abnormalities on the cardiac system. On a normal subjects with the age 25 ± 3 years old. The subjects didn’t
ECG waveform, interval of PQRST wave has described: P-R have any illness which are related to cardiac system. For
interval = 0.12 - 0.20 Sec, QRS width = 0.08 - 0.12 Sec, Q-T further experiment, a research of medical devices that
interval 0.35 - 0.43 Sec, P wave interval = 0.11 Sec. The involving human subjects, requires a system with clinical
amplitude of normal ECG wavefrom represents : P wave : examination. Rather than using subjects with normal
0.25 mV, R wave : 1.60mV, Q wave : 25% or R wave, T wave condition, the patients with the actual illness are needed. The
: 0.1 -0.5 mV [6], 7]. Fig. 4 displayed experiment with all subjects.
ECG recording has done with 3 Electrodes from ECG
module attached at the subject bodies. The placement of
electrodes is shown at Fig. 2.

Fig. 4. Data Acquistion.

B. Internet of Things (IoT)


Fig. 2. 2 Methods Placement of the Electrodes.
The acquisition system for ECG monitoring is conducting
The electrodes of ECG consist of +, -, and reference on online topography based on Internet of Thing (IoT) through
electrodes. The electrode with + amount is installed on the smartphone. The source of ECG signals from the module,
patient’s arm on the right side, the - electrode installed on the wirelessly transported the data via Bluetooth to mobile
left arm and the last one, reference electrode piece attached at phones. The data that have been processed on the phone, then
the hip of the patient. The real placement of the electrodes are transferred to the cloud or server through the Internet. Fig. 5
shown in Fig. 3. Therefore, for the installation of the ECG shown the block diagram of the system.
module, electrodes must be attached on the surface of the
human body/skin. This condition will lead to the obtained
signals have noises that derived from the muscles of the body
or the patients skin. Consequently, We required signal
processings for the recorded RAW signals to obtain the
necessary ECG signal for further analysis.

Fig. 5. block diagram of the system.

C. Wavelet Transform (WT)


In this research, discrete wavelet transform (DWT) is used
as denoising method for canceling noises from the recorded
ECG signal [8–10]. The ECG signal-to-noise ratio (SNR) is
low and not stationary is the reason why the wavelet
transform has been selected as processing algorithm .
The work of DWT system has basic principle for
Fig. 3. The placement of the Electrodes. separating the signal. The DWT uses multi filter banks and
special wavelet filters for the analysis and reconstruction of

Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on April 22,2021 at 00:14:33 UTC from IEEE Xplore. Restrictions apply.
signals from wavelet domain. This method provides a compact ∞

representation of the signal in time and frequency that was cAi [ k ] = ¦ (cDi +1[ k ] g[− n + 2k ] + cAi +1[k ]h[− n + 2k ]), (1)
calculated efficiently. The method calculates the wavelet −∞

coefficients at discrete intervals of time and scale instead of at with cAi are approximation coefficients and cDi are the
all scales. coefficients detail.
2.3.1. Discrete Wavelet Transform (DWT)
The signals processing for ECG must have good III. EXPERIMENTAL RESULTS
capabilities for signal compression and denoising of the RAW
signal. This function capable to do using wavelet transform In this research, data collection was performed on several
(DWT). The WT features have good ability to time-frequency subjects, aged around 25 ± 3 years. The subjects have normal
analysis of signal processing [11 – 13]. condition, without any cardiac diseases. Data recording is
done in two circumstances, the normal state and while doing
The Discrete Wavelet Transform (DWT) using filters as
less exercise, in this case, the subjects did jog using the
filter banks for signal computationanl-analysis. With this
structure, signal processing will be done with a brief treadmill.
processing time and multi range resolution signal. Filter Fig. 6 shown ECG data recording process real time
Banks composed by Low Pass Filter (LPF) and High Pass through mobile phone. The format data *json was used for
Filter (HPF) with the cut-off frequency are half of processed storing data to the phone. Over the internet, ECG data sent by
signals [14 – 16]. The wavelet filter banks have functioned a the system and affordable to be accessed through the website
scaling process for a signal. Its combine filtering and wherever located via IoT technology.
downsampling before reconstruct the output signals. The
construction equation is shown as:

Fig. 6. Mobile Phone Display.

The Fig. 7 shown the RAW signal of the subject 1 in From the presence of RAW signal, the trend of the
normal circumstances. The signals still contain noises, so that recorded data are still above baseline. The baseline correction
the signal processing is needed for canceling the noises. Even is necessary to process the shortcomings. Baseline of RAW
with the noises attached, the RAW data has displayed ECG signal has been corrected with the use detrend process. The
form. Therefore, the processing methods must be have good Fig. 8 has been shown the RAW signal that has undergone
computing time and great ability. detrending.

Fig. 7. RAW signal.

Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on April 22,2021 at 00:14:33 UTC from IEEE Xplore. Restrictions apply.
Detrending RAW Data Subject 1: Normal
1.5

Amplitude (mV)
0.75

0.75

1.5

2.25
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

time (s)
Fig. 8. Detrending RAW Signal.

The resulted signal, after the baseline correction, got Among the other methods, meyer (dmey), coiflet, and symlet
another processing due the artifacts interference. In order to wavelet are used in the experiment.
get a clean ECG signal, noise removal process is conducted. The Fig. 9 demonstrated the result of symlet wavelet order
The denoising step must provide process that can eliminate 5 on the ECG data. The filtered ecg wave using symlet
unnecessary signal with the best output. The process that does wavelet for relieve the noises resulted the PQRS wave crest of
not eliminate the critical data of the signal and noise were just the wave from the cardiac. The duration data (7 seconds) when
dumped there. In this research, we concluded comparation captured the data subject with normal activity displayed about
between signal denoising process using various WT methods. 10 beats of the heart.

Fig. 9. Result of Symlet Wavelet .

From the displayed data in the Fig. 10, can be obtained showed any noises or ripples on the wave. The symlet result is
comparison the results of proposed wavelets. The processing the best method for offline signal processing compared to the
result used symlet wavelet filter has the best denoising output others.
than others. From the result, the processed signal is not

Fig. 10. Comparison Result of Wavelets.

Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on April 22,2021 at 00:14:33 UTC from IEEE Xplore. Restrictions apply.
Comparison between a subject when no activity and light amount beats of heart on normal (speed : 0m/s) and light
activity (running light) shown in the Fig. 11 . We can see the excercises state in one minute period. The result of
beats at normal activity is less than when did light exercise. experiments was compared between the calculation by visual
The data retrieval for both analysis are 10 seconds. For more result and algoritm result, we reached a result of computation
complete results has shown in table 1. The table displayed was 98% accuration.

Fig. 11. Comparison Normal Activity and Light excercise ECGS.

[3] H. Xia, I. Asif, and X. Zhao, “Cloud-ECG for real


TABLE I. BEAT PER MINUTES (BPM) time ECG monitoring and analysis,” Comput. Methods
Treadmill Speed (m/s) Programs Biomed., vol. 110, no. 3, pp. 253–259,
Subject 2013.
0 1.5 3 4.5 6 [4] P. B. Sakhare, “An Approach for ECG Beats
1 83 99 110 128 136 Classification using Adaptive Neuro Fuzzy Inference
2 87 111 115 129 138 System,” pp. 4–9, 2015.
3 97 111 125 136 159 [5] W. Jenkal, R. Latif, A. Toumanari, A. Dliou, and O.
El B, “Enhanced algorithm for QRS detection using
discrete wavelet transform ( DWT ),” pp. 39–42.
[6] O. Faust, R. J. Martis, L. Min, G. L. Z. Zhong, and W.
IV. CONCLUSIONS Yu, “Cardiac arrhythmia classification using
electrocardiogram,” J. Med. Imaging Heal.
The paper introduced comparison between wavelets Informatics, vol. 3, no. 3, pp. 448–454, 2013.
processing for ECG-IoT application. In the proposed work, a [7] V. N. Hegde, R. Deekshit, and P. S. Satyanarayana,
signal processing using symlet wavelet can significantly “A Review on ECG Signal Processing and HRV
canceling the noises from Offline-RAW ECG signal. The Analysis,” J. Med. Imaging Heal. Informatics, vol. 3,
signal processing method has accuracy average 98% for no. 2, pp. 270–279, 2013.
detecting amount of the cardiac beats. [8] Qibin Zhao and Liqing Zhang, “ECG Feature
Extraction and Classification Using Wavelet
Transform and Support Vector Machines,” 2005 Int.
ACKNOWLEDGMENT Conf. Neural Networks Brain, vol. 2, pp. 1089–1092,
2005.
This research was supported by the thematic program [9] S. A. Shufni, “Wavelet Transform , Time Domain and
throughthe Bandung Technical Management Unit for Frequency Domain Features,” no. March, pp. 30–31,
InstrumentationDevelopment (Deputy for Scientific Services) 2015.
funded by Indonesian Institute of Sciences, Indonesia. [10] H. Y. Lin, S. Y. Liang, Y. L. Ho, Y. H. Lin, and H. P.
Ma, “Discrete-wavelet-transform-based noise removal
REFERENCES and feature extraction for ECG signals,” Irbm, vol. 35,
no. 6, pp. 351–361, 2014.
[11] G. Garg, V. Singh, J. R. P. Gupta, and A. P. Mittal,
[1] D. Bansal, M. Khan, and A. K. Salhan, “A computer “Optimal algorithm for ECG denoising using Discrete
based wireless system for online acquisition, Wavelet Transforms,” 2010 IEEE Int. Conf. Comput.
monitoring and digital processing of ECG Intell. Comput. Res., no. 2, pp. 1–4, 2010.
waveforms,” Comput. Biol. Med., vol. 39, no. 4, pp. [12] X. Xie, L. Wang, S. Lee, K. Lin, X. Wang, Y. Li, and
361–367, 2009. N. Deng, “An ECG Feature Extraction with Wavelet
[2] O. Diallo, J. J. P. C. Rodrigues, M. Sene, and J. Niu, Algorithm for Personal Healthcare,” pp. 3–6, 1991.
“Real-time query processing optimization for cloud- [13] S. V and J. Y, “A Review on Feature Extraction and
based wireless body area networks,” Inf. Sci. (Ny)., Denoising of ECG Signal Using Wavelet,” 2014 2nd
vol. 284, pp. 84–94, 2014. Int. Conf. Device, Circuit Syst., no. 1, pp. 1–6, 2014.

Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on April 22,2021 at 00:14:33 UTC from IEEE Xplore. Restrictions apply.
[14] M. S. Chaudhary, R. K. Kapoor, and A. K. Sharma,
“Comparison between different wavelet transforms
and thresholding techniques for ECG denoising,” 2014
Int. Conf. Adv. Eng. Technol. Res. ICAETR 2014, pp.
1–6, 2015.
[15] U. Biswas, K. R. Hasan, and B. Sana, “Denoising
ECG Signal Using Different Wavelet rl ’ - _ A _ 1----J
D1,” no. May, pp. 21–23, 2015.
[16] V. Adigüzel, “EKG øúaretleri Üzerinde Gürültü
ArÕndÕrmada DalgacÕk TabanlÕ Yöntemlerin
KarúÕlaútÕrÕlmasÕ Comparison of Wavelet Transform
Based Techniques in the Denoising of ECG Signals.”

Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on April 22,2021 at 00:14:33 UTC from IEEE Xplore. Restrictions apply.

You might also like