Design and Analysis of Electrocardiograph (ECG) Signal for long
term continuous heart rate monitoring system
Dr.M.Anto Bennet
1,Bhavani.B
2, Hema Priya.C.A
3
1 Professor of Electronics and Communication Engineering, Vel Tech,Chennai,India
2,3UG Scholar,Department of Electronics and Communication Engineering,Vel Tech,Chennai,India
* Corresponding author’s Email:[email protected]
ABSTRACT
Long term continuous monitoring of electrocardiogram (ECG) in a free living environment
provides valuable information for prevention on the heart attack and other high risk
diseases. This paper describes the design of real-time wearable ECG monitoring system
with associated cardiac arrhythmia classification algorithms. However these techniques are
severely hampered by motion artifacts they are limited to heart rate detection. To address
these shortcomings we present a new ECG wearable that is similar to the clinical approach
for heart monitoring. Our device is weightless and is ultra-low power, extending the battery
lifetime to over a month to make the device more appropriate for in-home health care
applications. This device uses two electrodes activated by the user to measure the voltage
across the wrists. The electrodes are made of a flexible ink and can be painted on to the
device casing, making it adaptable for different shapes and users. Also show the result of
heart rate of beats per minute (bpm) based on the R-R interval (peaks) calculation. That
means whether the heart function is normal or abnormal (Tachycardia, Bradycardia).
Keywords: Electrocardiogram (ECG), standard deviation of all NN intervals (SDNN),
chronic heart failure (CHF)
INTRODUCTION
Electrocardiogram (ECG) represents electrical activity of human heart. ECG is composed
from 5 waves - P, Q, R, S and T. This signal could be measured by electrodes in human
body with typical engagement. Signals from these electrodes are brought into simple
electrical circuits with amplifiers and analogue digital converters. The main problem of
digitalized signal is interference with other noisy signals like power supply network 50 Hz
frequency and breathing muscle artefacts[1-3]. These noisy elements have to be removed
before the signal is used for next data processing like heart rate frequency detection. Digital
filters and signal processing should be designed very effective for next real-time
applications in embedded devices. Heart rate frequency is very important health status
information. The frequency measurement is used in many medical or sport applications like
stress tests or life treating situation prediction. One of possible ways how to get heart rate
frequency is compute it from the ECG signal. Heart rate frequency can be detected from
ECG signal by many methods and algorithms. Many algorithms for heart rate detection are
based on QRS complex detection and hear rate is computed like distance between QRS
complexes. QRS complex can be detected using for example algorithms from the field of
artificial neural networks, genetic algorithms, wavelet transforms or filterbanks. Moreover
the next way how to detect QRS complex is to use adaptive threshold. The direct methods
International Journal of Pure and Applied MathematicsVolume 119 No. 15 2018, 99-110ISSN: 1314-3395 (on-line version)url: http://www.acadpubl.eu/hub/Special Issue http://www.acadpubl.eu/hub/
99
for heart rate detection are ECG signal spectral analyze and Short- Term Autocorrelation
method[4,5]. Disadvantage of all these methods is their complicated implementation to
microprocessor unit for real time heart rate frequency detection. Real time QRS detector and
heart rate computing algorithm from resting 24 hours ECG signal for 8-bit microcontroller
is described in. This algorithm is not designed for physical stress testwith artefacts. The
designed digital filters and heart rate frequency detection algorithms are very simple but
robust. They can be used for ECG signal processing during physical stress test with muscle
artefacts. They are suitable for easy implementation in C language to microprocessor unit in
embedded device. Design of these methods has been very easy with Matlab tools and
functions[7,8,9,10].
PROPOSEDSYSTEM
ECG signal get from patient by electrodes and give to the controller. Then it process by
image processing. Butterworth Notch filter is also used to remove power-line interference
of 50 and 100 Hz .Take FFT (Fast Fourier Transform) for frequency domain conversion
from time domain to calculate the spectrum of our signal. Developed coding for threshold,
peak detection, heart rate and get result shown in fig 1.
Figure 1. Block diagram of proposed system
This example shows (Fig 2) how to detect the QRS complex of electrocardiogram
(ECG) signal in real-time. Model based design is used to assist in the development, testing
and deployment of the algorithm.The electrocardiogram (ECG) is a recording of body
surface potentials generated by the electrical activity of the heart. Clinicians can evaluate
an individual's cardiac condition and overall health from the ECG recording and perform
further diagnosis.A normal ECG waveform is illustrated in the following figure [3].
Because of the physiological variability of the QRS complex and various types of noise
present in the real ECG signal, it is challenging to accurately detect the QRS complex.
International Journal of Pure and Applied Mathematics Special Issue
100
Fig 2. Block diagram for real time QRS detection
ECG SignalSource
The ECG signals used in the development and testing of the biomedical signal processing
algorithms are mainly from three sources: 1) Biomedical databases (e.g., MIT-BIH
Arrhythmia Database) or other pre-recorded ECG data; 2) ECG simulator; 3) Real-time
ECG data acquisition.In this example, the following pre-recorded and simulated ECG
signals are used. The signals all have sampling frequencies of 360Hz.one set of recorded
real ECG data sampled from a healthy volunteer with a mean heart rate of 82 beats per
minute (bpm). This ECG data was pre-filtered and amplified by the analog front end before
feeding it to the 12 bitADC.four sets of synthesized ECG signals with different mean heart
rates ranging from 45 bpm to 220 bpm. ECGSYN is used to generate synthetic ECG signals
in MATLAB.
Fig 3. ECG signal source
A real-time QRS detection algorithm, which references developed in Simulink with the
assumption that the sampling frequency of the input ECG signal is always 200 Hz (or 200
samples/s). However the recorded real ECG data may have different sampling frequencies
ranging from 200 Hz to 1000 Hz, e.g., 360 Hz . To bridge the different sampling
frequencies, a sample rate converter block is used to convert the sample rate to 200 Hz. A
buffer block is inserted to ensure the length of the input ECG signal is a multiple of the
calculated decimation factor of the sample-rate converter block.
International Journal of Pure and Applied Mathematics Special Issue
101
Real-Time QRS Detection of ECGSignal
The QRS detection block detects peaks of the filtered ECG signal in real-time. The detection
threshold is automatically adjusted based on the mean estimate of the average QRS peak and
the average noise peak. The detected peak is classified as a QRS complex or as noise,
depending on whether it is above the threshold.
The following QRS detection rules reference the PIC-based QRS detector implemented in.
Rule 1: Ignore all peaks that precede or follow larger peaks by less than 196 ms (306bpm).
Rule 2: If a peak occurs, check to see whether the raw signal contains both positive and
negative slopes. If true, report a peak being found. Otherwise, the peak represents a baseline
shift.
Rule 3: If the peak is larger than the detection threshold, classify it as a QRS complex.
Otherwise classify it as noise.
Rule 4: If no QRS has been detected within 1.5 R-to-R intervals, but there is a peak that
was larger than half the detection threshold, and that peak followed the preceding detection
by at least 360ms, classify that peak as a QRScomplex.
Simulate and Deploy
1. Open the examplemodel.
2. Change your current folder in MATLAB® to a writablefolder.
3. On the model tool strip, click Run to start the simulation. Observe the Heart Rate display
and the raw and filtered ECG signal in the scope, which also illustrates the updating of
peaks, threshold and estimated mean heartrate.
4. Open the dialog of ECG Signal Selector block. Select the ECG signal mean heart rate in
the drop down menu. Click Apply and observe the real-time detection results in the scopes
and Heart Ratedisplay.
5. Click Stop to endsimulation.
6. After selecting target hardware, you can generate code from the ECGSignal Processing
subsystem and deploy it to thetarget.
Time-DomainAnalysis
So far, research in time-domain analysis has been aiming at obtaining roughly estimated
ranges of each statistical measure, which might lead to better indicative results for various
cardiovascular diseases. In general, time domain measures used for signal analysis include
standard deviation of all NN intervals (SDNN) in seconds, standard deviation of the
averages of NN intervals in all 5- min segments of the entire recording (SDANN) in
milliseconds, the square root of the mean of the sum of the squares of differences between
adjacent NN intervals (RMSSD) in milliseconds, mean of the standard deviations of all NN
International Journal of Pure and Applied Mathematics Special Issue
102
intervals for all 5-min segments of the entire recording (SDNN index) in milliseconds,
standard deviation of differences between adjacent NN intervals (SDSD), and number of
pairs of adjacent NN intervals differing by more than 50 ms in the entirerecording.In this
regard, three variants are possible, namely, counting all such NN interval pairs, only pairs in
which the first or the second interval is longer (NN50 count), or NN50 count divided by the
total number of all NN intervals (pNN50) in percentage. The resulting numbers that fall out
of the normal case may be due to either lower or higher number of heart beats. Previous
studies showed apparent implications of SDNN and pNN50 in patients with chronic heart
failure (CHF) and acute myocardial infarction (AMI). Although RMSSD has been preferred
over pNN50 due to its robustness, pNN50 indicates cardiovascular risk levels more clearly.
Having a value of SDNN that is less than 50 ms or a pNN50 value lower than 3% is
regarded as an implication of high risk. In contrast, if SDNN falls between 50 ms and 100
ms, implies moderate risk and having SDNN greater than 100 ms or pNN50 over 3% is
considered normal. Most of the time-domain measures are related to the evaluation of
cardiovascular high-risklevels.Still, however, their beneficial reference data could also be
supportive in simplifying the judgment of cardiovascular health state via analyzing HRV at
rest. Time-domain measures are characterized by simplicity of calculation, but are not
sufficiently informative when utilized in a stand-alone manner. However, frequency-domain
and geometry-based analysis techniques do not have reference data such as those of time-
domain. Therefore, to maintain a reliable HRV-related study, data interpretation should be
performed by combining more than one analysis technique. The validity of normal values of
HRV at rest in a young (18 to 25 years old), healthy and active Mexican population was
investigated. The argument involved time-domain, frequency- domain analysis methods,
and a Poincare plot. A thirty-minute time window of HR recordings is acquired for 200
individuals. Significant variations were found between athletes and active subjects. These
major differences, however, were not based on gender. Percentile ranges and distributions
were obtained for all predefined population categories that can be used as a reference for
future researches.
Frequency-DomainAnalysis
Time domain measures are easy to compute, but they lack the capability of distinguishing
between sympathetic and parasympathetic contributions to HRV. In comparison, frequency
domain methods evaluate HRVs by examining the frequency content of each acquired ECG
signal. The two main frequencies that resemble ANS activity are the low frequency
component (LF) ranging from 0.04 to 0.15 Hz, and the high frequency component (HF)
falling between 0.15 and 0.4 Hz. It is established that LF indicates physiologically the
sympathetic modulation of heart rate while HF exploits the vagal or parasympathetic
activity of ANS and matches the respiratory activities. The index ratio LF/HF describes the
sympathovagal balance and shows which part of the ANS is dominating. Each parameter
(LH or HF) is computed by integrating with respect to frequency and expressed in units of
(ms)2. The result is also expressed in terms of Power Spectral Density (PSD). To obtain LF
and HF components, avariety of approaches can be implemented one of which is FFT that
transforms the signal to computation of the PSD from the measured parameters. However,
FFT is not an adequate approach for analyzing non-stationary signals as previously
expressed. As indicated earlier in the text, HHT has the capabilities to handle the FFT
shortcomings related to the nonlinear and non-stationary nature of the signal. Initially, EMD
International Journal of Pure and Applied Mathematics Special Issue
103
is applied to the signal, which resolves the signal into smaller IMFs or components. Each
obtained IMF is then transformed into its own frequency domains by applying Hilbert
transform. However, previous investigations demonstrated that there exists an approximate
correlation between time domain and frequency domain measures such that both are related
to each other and also contribute to HRVassessment.
Butterworthfilter
The Butterworth filter is a type of signal processing filter designed to have as flat a
frequency response as possible in the passband. Butterworth had a reputation for solving
"impossible" mathematical problems. At the time, filterdesign required a considerable
amount of designer experience due to limitations of the theory then in use. The filter was not
in common use for over 30 years after its publication. Butterworth stated that:"An ideal
electrical filter should not only completely reject the unwanted frequencies but should also
have uniform sensitivity for the wanted frequencies".Such an ideal filter cannot be achieved
but Butterworth showed that successively closer approximations were obtained with
increasing numbers of filter elements of the right values.
EXPERIMENTAL RESULTS
The simulation results are in the heart rate calculator in matlab algorithm. In this
workmatlab 2013a is used. In this we get the result are using Butterworth filter for removing
the noise shown in fig 4.
Fig 4. ECG waveform
International Journal of Pure and Applied Mathematics Special Issue
104
Fig 5. ECG FFT waveform
Basically ECG signals are received within the sort of time domain. so as to convert it into
frequency domain we tend to square measure opting FFT here. The on top of image explains
the conversion of signals from time domain to frequency domainshown in fig 5.
Figure 6 Total Filtered Signal
By exploiting FFT, noise signal plays a significant role in it. So as to get rid of noise signals
we have a tendency to are exploitation Butterworth second order filter here. By exploitation
International Journal of Pure and Applied Mathematics Special Issue
105
it, we've got determined clear wave form of our signal shown in fig 6.
Figure 7. ECG conditioned result
Threshold for QRS detection. Threshold could be a technique distributed for police work the
R wave peak. This method is performed by employing a try of threshold limits knownas
higher restricted threshold (hth) and lower restricted threshold (lth) shown in fig 7.
Fig 8. Peak Detector
Once the information has been processed the peaks it ought to be known. Peaks square
measure detected as native maxima. The trace curve is that the total of all peak signals.
Little peaks will even hide in additional outstanding peaks. With the assistance of peak
detector solely able to notice whether or not the patient is Tachycardia or Bradycardia or
normal shown in fig 8.
International Journal of Pure and Applied Mathematics Special Issue
106
Fig 9. Hardware module
The higher than kit in the main consists of PIC Microcontroller, TTL logic device, Opto
coupler, electrical device and GSM module. The data’s that is received from the electrodes
goes to the PIC microcontroller then to the TTL logic device then to the Opto coupler and
eventually the output are received to the mobile through GSM module shown in fig 9.
Fig 10. Hardware output display
The electrocardiogram data's area unit collected from the patient supply passes through all
the electrical devices and eventually the output gets received through GSM to the the
registered mobile number. Hence the higher than image clearly shown the results of the
patients shown in fig 10.
International Journal of Pure and Applied Mathematics Special Issue
107
CONCLUSION
Combined use of MATLAB and Simulink is very useful in ECG signal analysis.
Different digital filters are used in simulink to remove noise from raw ECG signal. The
noise free ECG signal obtained from filter circuit is used as input for ECG analysis to find
various intervals and peaks in MATLAB environment. Many works are done in the field of
ECG analysis and they involve complicated calculations and hence difficult to design.The
algorithm used in this work is very efficient and simple, so it can be easily implemented on
ECG signal. In this case the waveform is divided into positive and negative parts and each
section is analyzed separately. Various peaks are detected by finding local maxima and
minima of the signal and then setting minimum threshold limit for them according to the
standard values. The results obtained can be used for clinical diagnosis by the physician and
will be very helpful in finding various abnormalities in theheart. This work is done using the
Butterworth filter. This Butterworth filter used to remove the noise like interferences and
while using electrode that paste also a one type of nose ,so avoid this type of noise this
project using the Butterworth filter. In future using the electrodes we will get real time ECG
signal after that calculate the heart rate.We have to implement in tiny wearable device with
low value for all because it is compact device it leads as a transportable device for patients.
The foremost aim is power consumption with charge in device. It'll be associate degree easy
device. We have a tendency to square measure operating it on to store info in cloud.
REFERENCES
[1] Aulia A. Iskandar; Reiner Kolla; Klaus Schilling;A wearable 1-lead necklace ECG
for continuous heart rate monitoring Wolfram Voelker 2016 IEEE 18th International
Conference on e-Health Networking, Applications and Services (Healthcommission)
[2]E. Aguilar-Pelaez and E. Rodriguez-Villegas, “LED power reduction trade-offs for
ambulatory pulse oximetry,” in IEEE EMBC, Lyon, August 2007.
[3]Gavin P. Shorten; Martin J. Burke “A precision ECG signal generator providing full
Lead II QRS amplitude variability and an accurate timing profile” 2009 Annual
International Conference of the IEEE Engineering in Medicine and Biology Society.
[4]N. Kohli, N. K. Verma, and A. Roy, “Svm based methods for arrhythmia
classification in ecg,” in Computer and Communication Technology (ICCCT), 2010
International Conference on. IEEE, 2010, pp. 486–490.
[5]S.Z.Mahmoodabadi,A.Ahmadian,M.D.Abolhasani,M.Eslami,andJ.H. Bidgoli. "ECG
feature extraction based on multiresolution wavelet transform", Proceedings of IEEE
27th Annual International Conference of the Engineering in Medicine and Biology
Society, pp. 3902-3905, Jan 2006.
[6] Dr.AntoBennet, M , Sankaranarayanan S, Ashokram S ,Dinesh Kumar T R,“Testing
of Error Containment Capability in can Network”, International Journal of Applied
Engineering Research, Volume 9, Number 19 (2014) pp. 6045-6054.
International Journal of Pure and Applied Mathematics Special Issue
108
[7]Dr.AntoBennet, M, SankarBabu G, Natarajan S, “Reverse Room Techniques for
Irreversible Data Hiding”, Journal of Chemical and Pharmaceutical Sciences 08(03):
469-475, September 2015.
[8] Dr.AntoBennet, M ,Sankaranarayanan S, SankarBabu G, “ Performance & Analysis
of Effective Iris Recognition System Using Independent Component Analysis”, Journal
of Chemical and Pharmaceutical Sciences 08(03): 571-576, August 2015
.
[9] Dr. AntoBennet, M ,Sankaranarayanan S, SankarBabu G, “ Performance & Analysis
of Effective Iris Recognition System Using Independent Component Analysis”, Journal
of Chemical and Pharmaceutical Sciences 08(03): 571-576, August 2015.
[10] Dr. AntoBennet, M, Suresh R, Mohamed Sulaiman S, “Performance &analysis of
automated removal of head movement artifacts in EEG using brain computer interface”,
Journal of Chemical and Pharmaceutical Research 07(08): 291-299, August 2015.
International Journal of Pure and Applied Mathematics Special Issue
109
110