ECG Signal Processing Using Digital Signal Processing Techniques
ECG Signal Processing Using Digital Signal Processing Techniques
ISSN 2229-5518
IJSER
the ECG preamplifier is acquired through of the information available in the signal lies
the Codec input of the DSP starter kit. The in the range 0.5-150 Hz “Ref. [1-4]”.
acquired data is subjected to signal Therefore, the removal of higher frequencies
processing techniques such as removal of is necessary to eliminate the unwanted
power line frequencies and high frequency signals, which reduces only less than 1% of
component removal using wavelet-denoising the useful information. ECG signal
technique. ECG component analysis such as processing comprises of two steps viz. (i)
QRS peak detection, heart rate calculation, preliminary processing and (ii) primary
etc is performed using nonlinear filter processing. In preliminary processing,
technique called first order derivative and artifacts like higher peaks due to electrode
moving average filter. The performance of motion and power line interference are
the algorithm is studied in the DSP removed through the application of suitable
environment as well as MATLAB software filters in the DSK system.
environment for comparison. The results of
this study reveal the potentiality of the DSP In primary processing, techniques like
system for routine clinical use. denoising, baseline wandering and detection
of P, QRS, and T waveforms are performed
Index Terms: ECG, DSP, Denoising, through the implementation of suitable
Wavelet, Heart rate, Power line interference algorithms in the DSK system. For
analyzing the ECG signal in DSK system,
1. Introduction the ECG signal is sampled at the frequency
In recent years, there has been increasing of 1 kHz and the sampled data is stored in
interest in the design and implementation of DSP buffer for processing. This sampled
DSP systems for real time ECG signal ECG data are subjected to various signal
IJSER © 2013
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 1625
ISSN 2229-5518
processing algorithms to obtain a noise free environment (IDE), called Code Composer
and clear ECG waveform for analysis. Studio (CCS). The CCS is a high-level
language, which has built-in FFT, Wavelet,
2. Hardware Details and other functions for signal processing
Fig. 1, depicts the complete setup for DSP applications. Also, we can develop our own
based ECG system, which comprises of a set functions in C for dedicated and novel
of electrodes, ECG pre-amplifier board, applications. The TMS320C6711 DSK has a
TMS320C6711 DSP Starter Kit (DSK) with built in CODEC, which has 16-bit register to
3.5mm audio jack, and Pentium IV Desktop acquire the ECG signal directly. The
PC. The DSP based ECG system has been acquired ECG data can be viewed in the
built around the TMS320C6711 DSK. display before processing. Here 2048
samples can be viewed at a time but the data
can be updated in a circular for real time
display of ECG. The DSK can process upto
5000 samples at a time, but the display can
store and view only 2048 samples at a time
IJSER
due to its limitation in video buffer memory.
Hence a circular memory technique is
Fig.1 Block Diagram of the DSP Starter Kit employed in this design to view the
based ECG Analysis Experimental Setup processed data in a sequential manner.
A two-electrode ECG preamplifier “Ref. Fig. 2 is the display of the 2048 raw samples
[5]” is constructed using op-amps of a typical ECG signal acquired using the
MCP607/OPA2336. A set of standard stick- preamplifier hardware and the DSK system.
on disposable electrodes are placed in the Here the X-axis represents the sample
two arms of the subject (patient) picks-up number and the Y-axis represents the
the ECG signal from the body and the signal amplitude of the signal. This view shows 7
is amplified to 1 V level by the ECG QRS peaks and other components of the
preamplifier circuit. The output of the ECG waveforms such as P and T, which are
amplifier is directly connected with the buried in artifacts and noises.
Codec input of the DSK system. The Codec Original signal
sampled the ECG signal at the sampled of 1
kHz. The data is stored in DSK buffer
memory for processing.
IJSER © 2013
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 1626
ISSN 2229-5518
IJSER
basis function graphically shown in Fig 3. reflected in the waveform intervals,
Also, the Daubechies wavelet was chosen morphology of the waveforms, and their
for this work on the basis of the resemblance amplitude values. Most important diagnostic
and similar frequency response information can be obtained by the detection
characteristics of the DB4 basis function of QRS complex, calculation of various
with the ECG waveform. The denoised ECG intervals and heart rate measurement.
signal using the Daubechies DB4 wavelet is Hence, analysis of ECG waveform is
shown in the Fig. 4, which clearly indicates performed mainly on the detection of QRS
that the Daubechies DB4 Wavelet denoising waveform “Ref. [11, 12]” and the
is an efficient method to completely remove localization of other waveforms (S, T, P)
all high frequency as well as power-line with respective to the QRS complex. In this
interferences. work, the detection of QRS complex is
performed using weighted and squared first-
derivative operator (Filtered- Derivative)
and Moving Average (MA) filter proposed
by Murthy et al “Ref. [13]”. A Filtered-
Derivative Operator can be represented as,
Daubechies DB4 wavelet has the exact where x(n) is the digitized ECG sample, N is
response characteristics like the ECG signal the width of a window within which first
except the baseline wandering, which has order differences are computed, squared,
very low frequency of the order of 0.05 Hz and weighted by the factor (N-i+1). The
weighting factor provides a smoothing
IJSER © 2013
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 1627
ISSN 2229-5518
IJSER
percentage of the maximum amplitude of the processor in terms of the execution cycle.
signal is chosen as threshold value for the The total processing time becomes
detection of QRS peaks. T t = T proc + N× Tist ............ (3)
7. Conclusion
Fig. 5 Application of first-Derivative and In this work, the power of the memory on
Moving Average chip DSP was realized by implementing the
various signal processing algorithms for
From the Fig 5, the time duration calculated ECG signal processing and analysis. Novel
between the adjacent R peaks as 825 m sec. signal processing techniques such as
From the R-R interval, the heart rate is Daubechies Wavelet and Filtered-Derivative
calculated using the formula operator are tested for ECG denoising and
Heart Rate = (1/RR interval in sec.) * 60 QRS peak detection respectively. De-
IJSER © 2013
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 1628
ISSN 2229-5518
noising comparison between Coif3 and db4 Proceedings of the IEEE Volume 84, Issue
was also made and achieved the promising 4, Apr 1996 Page(s): 626 – 638
result with db4 wavelet. [7]. Bahoura M., Hassani M., Hubin M,
“DSP implementation of wavelet transform
The wavelet approach is more convenient for real time ECG wave forms detection and
than the conventional filtering techniques, heart rate analysis”, Computer Methods and
which highlights the details of the ECG Programs in Biomedicine, No. 52, 35 – 44,
signal with optimal time-frequency 1997.
resolution. The result of this study reveals [8]. Behzad Mozaffary, Mohammad A.
that the DSP system paves way to Tinati, ECG Baseline Wander Elimination
implement highly complex mathematical using Wavelet Packets, Transactions on
techniques such as Wavelet Transform and Engineering, Computing and Technology
averaging techniques for real time signal V3 Dec 2004 ISSN 1305-5313
processing and analysis of the ECG signal [9]. Fatimah Ibrahim, Noor Azuan Abu
through structured algorithms for routine Osman, Juliana Usman and Nahrizul Adib
clinical use. Kadri, Performance Evaluation of Coifman
IJSER
Wavelet for ECG Signal Denoising, IFMBE
References Proceedings, vol 15, pp 419-422, 2007
[1]. Rangaraj M. Rangayyan. Bio-Medical [10]. D.Nedumaran, S.Stalin and D.
Signal Analysis, Wiley-Interscience (IEEE Balasubramaniam, Application of novel
press), 2002. signal processing techniques for
[2]. Hamilton PS, Tompkins WJ, Electrocardiogram signal, Proceedings of
“Quantitative investigation of QRS detection the National Conference on Bio-
rules using the MITBIH arrhythmia Instrumentation (BINCON-2005), Royal
database”, IEEE Transactions on Institute of Technology and Science, 19th &
Biomedical Engineering 1996, BME-33: 20th March 2005, pp.31-34.
1157-1187 [11]. Aldroubi, M.A. Unser, Wavelets in
[3]. Joseph D. Bronzing, The Biomedical Medicine and Biology, CRC Press, Boca
Engineering Handbook, Published by CRC Raton FL, USA, 1996, 616 pages.
Press, 2000 [12]. Ivaylo I Christov, Real time
[4]. Ivaylo I Christov, Real time electrocardiogram QRS detection using
electrocardiogram QRS detection using combined adaptive threshold, Biomedical
combined adaptive threshold, BioMedical Engineering On Line 2004, 3:28
Engineering Online 2004, 3:28 [13]. Murthy ISN and Rangaraj MR, New
[5]. D. Dobrev, Technical Note: Two- Concepts for PVC detection, IEEE
electrode low supply voltage Transactions on Biomedical Engineering,
electrocardiogram signal amplifier, Med. 26(7): 409-416, 1979.
Biol. Eng. Comput., 2004, 42, 272-276.
[6]. Unser, M.; Aldroubi, A. A review of
wavelets in biomedical applications,
IJSER © 2013
http://www.ijser.org