- Open Access
- Total Downloads : 523
- Authors : Rahul Dev, Prof. R. K. Mehrotra
- Paper ID : IJERTV2IS60703
- Volume & Issue : Volume 02, Issue 06 (June 2013)
- Published (First Online): 24-06-2013
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Application Of DSP To Remove Noise From ECG Signal
Application Of DSP To Remove Noise From ECG Signal
Vol. 2 Issue 6, June – 2013
Rahul Dev, Prof. R. K. Mehrotra
1 M.Tech Student,Department Of Electronics and Communication , Ajay Kumar Garg Engg.College,Gzb(UP)
2 Professor, Department Of Electronics and Communication,Ajay Kumar Garg Engg. College.Gzb(UP)
Heart diseases, which are one of the death reasons, are among the several serious problems in this century and as per the latest survey, 60% of the patients die due to Heart problems. In 2011, 10 crores people are suffering from heart diseases in India. Many individuals remain unaware of the symptoms of heart attack or dismiss possible symptoms as being unrelated or not important enough to visit a doctor. Early diagnosis and medical treatment of heart diseases can prevent sudden death of the patient. One of the ways to diagnose heart diseases is to use Electrocardiogram (ECG) signals. ECG measures electrical potentials on the body surface via contact electrodes. However, timely and accurate detection of arrhythmias is a complex decision-making process for a cardiologist due to contamination of ECG signals with different frequencies of noise. For reliable interpretation of real-time ECGs, computer based techniques on digital signal processing (DSP) of ECG waveform have been reported. ECG signals are non-stationary signals including valuable clinical informations, but frequently these informations are corrupted by noise. Many tools, methods and algorithms based on signal processing theory have been proposed and implemented. In this paper, advanced digital signal processing is carried out in Matlab environment. And the present work basically focuses on implementation and evaluation of methods to remove noise from ECG signal.
-
The ECG is one of the oldest and the most popular instrument used in medical applications and has followed the progress of instrumentation technology. Its most recent evolutionary step, to the computer-based system, has allowed patients to wear their computer monitor or has provided an enhanced, high resolution ECG that has opened new scene of ECG analysis and interpretations [1-2].
The ECG is a bioelectric signal, which records the hearts electrical activity time, therefore it is an important diagnostic tool for assessing heart function. The electrical current due to the depolarisation of the Sino-Atrial (SA) node stimulates the surrounding myocardium and spreads into the heart tissues. A small proportion of the electrical current flow to the body surface. By applying electrodes on the skin at the selected points, the electrical potential generated by this
current can be recorded as an ECG signal. Early diagnosis and treatment of heart diseases can prevent sudden death of the patient. One of the ways to diagnose heart diseases is to use electrocardiogram (ECG) signals. ECG signals are formed of P wave, QRS complex, and T wave. They are designated by capital letters P, Q, R, S, and T. In the normal beat phase of a heart, the main parameters, inspected includes; the shape, the duration, and the relationship with each other of P wave, QRS complex, and T wave components and R-R interval [3]. During measurement of ECG noise(Anything other than muscular activity of heart) is superimposed on them, due to AC interference, loose electrode connection, malfunctioning of machine, patient movement like respiration etc all of them collectively called artifacts.
Vol. 2 Issue 6, June – 2013
Many times when ECG signal is recorded from surface electrode that are not tightly in contact with the skin as the patient breath the chest expand and contract producing a relative motion between skin and electrode. This results in shift in the baseline which is also known as low frequency baseline wander. Obviously the fundamental frequency of baseline wander is same as that of respiration frequency. It is required that this baseline wander is to remove from the ECG before extraction of any meaningful feature. Baseline wander makes manual and automatic analysis of ECG records difficult, especially in the detection of ST-segment deviations. This segment is very important and has the information related
In this section, various noise removal techniques are applied to MIT/BIH ECG database data sample, and the performances are studied on the basis of spectral density and average power of signal. In the first step, the simplest approach which is linear trend to remove baseline drift is applied after that various digital filters are applied to the noisy ECG data having baseline noise as shown in Fig 1. The adaptive filter is then applied on the sample ECG signal to remove power-line noise and finally the wavelet approach is used for overall de-noising of ECG signal.
to heart attack, this because the spectrum of baseline wander and low frequency component of ECG signal usually overlaps.
This paper work aims at removing this baseline wander signal while preserving the low frequency ECG clinical information. The main purpose of this study is to implement various digital filters and then wavelet for overall de-noising after that performance of each filter is also discussed. The present work is divided into following steps:
Step 1: selection of standard ECG data and extraction of ECG signal.
Step 2: Design and implementation of FIR and IIR filters for the removal of baseline noise from ECG signal.
1400
1300
1200
sample value
sample value
1100
1000
900
800
700
Noisy ECG data 207.dat
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Fig. 1 The noisy ECG data having baseline noise
Step 3: Implementation of wavelet for overall de-noising. Step 4: Implementation of adaptive filters for the removal of power-line noise from ECG signal.
A major element of this stage was the extraction of ECG signals from the standard database that we have been chosen in this work. After extraction, the signals were subject to processing using several tools available by the MATLAB software.
Digital Filters: In signal processing, the function of a filter is to remove unwanted parts of a signal, such as random noise, or to specify useful parts of the signals, such as components lying in a certain important frequency range. There are two main kinds of filters; Analog and Digital filters. General digital filter design process can be divided into four main steps:
-
Approximation.
-
Synthesis and realization.
-
Performance analysis.
-
Implementation.
Both digital FIR and IIR filters are designed using this filter design procedures in order to approach the required filter specifications.
Implementation of the simplest approach Linear Trend or A Piecewise Linear Trend: The most simple approach is a linear trend or a piecewise linear trend. The MATLAB- function, de-trend performs piecewise linear de-trending.
Noisy ECG data 103.dat
1400
1300
sample value
sample value
1200
1100
1000
900
800
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Fig. 2 Noisy ECG
signal 103.dat after detrending
350
1500
Noisy ECG data 114.dat
Vol. 2 Issue 6, June – 2013
300
250
200
sample value
sample value
150
100
50
1400
sample value
sample value
1300
1200
1100
0
-5
-100
-150
0 1000 2000 3000 4000 5000 6000 7000 8000
1000
900
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
sample number
Fig 3 Signal after de-trending
Fig 5 The noisy ECG having Baseline noise
Filtered by Rectangular Window
But de-trend fails in case of non-linear trends so by setting the option, BP yields a piecewise linear de-trending vector BP contains the indices of the breakpoints between adjacent linear segments. The breakpoint between two segments is defined as the data point that the two segments share.
Advanced DSP Technique to Remove Baseline Noise from ECG Signal
Design and implementation of FIR and IIR filters on ECG Data
FIR-design with MATLAB
500
400
sample value
sample value
300
200
100
0
-100
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Fig 6 ECG signal 114.dat filtered by Rectangular filter
Function signal toolbox
calculation of coefficients
estimation of the order
filtering
type and frequncy of cutoff
frequency response
600
400
sample value
sample value
200
0
-200
-400
Filtered by Hanning Window
Implementations of FIR filter: In this section, FIR Equiripple filter, windowing FIR filters with Kaiser,
-600
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Rectangular, Hanning and Blackman functions are performed.
Fig 7 ECG signal filtered by Hanning window
500
400
300
Filtered by FIR Equiripple Filter
Vol. 2 Issue 6, June – 2013
Implementations of IIR filter: In this case, four IIR filters
i.e. Butterworth filter, Chebyshev Type 1, Chebyshev Type II and Elliptic filter are implemented on ECG signal.
sample value
sample value
200
100
0
-100
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Fig 8 ECG signal filtered by Equiripple Window
1200
1000
800
sample value
sample value
600
400
200
114.dat filtered by Butterworth
450
400
350
300
sample value
sample value
250
200
Filtered by Kaiser Window
0
-200
-400
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Fig 12 ECG signal filtered by Butterworth filter
150
100
50
0
-50
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
1000
800
600
sample value
sample value
400
114.dat filtered by Chebyshev I filter
Fig 9 ECG signal filtered by Kaiser window
200
600
400
200
Filtered by Blackmann Window
0
-200
-400
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
sample value
sample value
0 Fig 13 ECG signal filtered by Chebyshev I filter
-200
-400
-600
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
1200
1000
800
sample value
sample value
600
114.dat filtered by Chebyshev Type II filter
Figure 10 ECG signal filtered by Blackmann window
400
200
Function signal toolbox
calculation of coefficients
estimation of the order
type and frequncy of cutoff
frequency response
0
-200
-400
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
filtering
Fig 14 ECG signal filtered by Chebyshev Type II filter
Fig 11 Block diagram of IIR-design
1000
800
600
sample value
sample value
400
200
0
-200
-400
114.dat filtered by Eliptic filter
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Vol. 2 Issue 6, June – 2013
Advanced DSP Technique to Remove Baseline Noise from ECG Signal
Tables 1 show the comparison of different FIR filters. It has been observed that fall in value of spectral density is very large in case of FIR equiripple filter as compared to all windows. The trade-off between spectral density and average power is best among all the FIR filters. But it can also visualize that the waveform got distorted to some extend in case of FIR equiripple filter. The Kaiser Window and rectangular window is also showing better results at the expense of some more computational load as the order of the filter is large. But, in case of remaining windows i.e. Hanning
Fig 15 ECG signal filtered by Elliptic filter
Calculation of parameters:
The two important parameters to check the suppression of Baseline noises are spectral density and average power of signal. The cut-off frequency used for high pass filters is 0.5Hz, so the spectral density below 0.5 Hz is calculated before and after filtration of ECG signals. The signal should have good trade-off between spectral density and average power after filtration and also minimum order of filter as possible to avoid the computational complexity.
Table 1 Comparison of various filters for Removal of Baseline noise (ECG sample 103.Dat)
and Blackman windows, the order of filter easily grow very much high. It increases the number of filter coefficients which increases the large memory requirement and problems in hardware implementation. So, the FIR Kaiser Window filter can be best choice for the removal of Baseline wandering among FIR filters.
Tables show the comparison of different IIR filters. The best trade-off between spectral density and average power is shown by Chebyshev type II filter. It can also visualize from Fig that baseline noise have removed completely. So, the IIR Chebyshev type II filter can be best choice for the removal of baseline noise among IIR filters.
Implementation of wavelet approach on filtered data for overall de-noising: In this step de-noising oriented function is used. Default values for all the general procedures related to de noising using wavelets. The best combination based on the performance of digital filter is chosen and after applying wavelet on the filtered signal it is visualize that the overall noise have removed without effecting the parameters such as spectral density and average power.
Filter |
Filter Order |
Spectral density before filtration (dB/Hz) |
Spectral density after filtration (dB/Hz) |
IIR Butterworth |
2 |
40.35 |
34.04 |
IIR Chebyshev type I |
2 |
40.35 |
34.08 |
IIR Chebyshev type II |
2 |
40.35 |
7.31 |
IIR Elliptic |
2 |
40.35 |
34.08 |
FIR Equiripple |
320 |
40.35 |
30.62 |
FIR Kaiser |
450 |
40.35 |
29.74 |
FIR Rectangular |
450 |
40.35 |
29.33 |
FIR Hanning |
1200 |
40.35 |
30.83 |
FIR Blackmann |
1500 |
40.35 |
30.98 |
Filter |
Filter Order |
Spectral density before filtration (dB/Hz) |
Spectral density after filtration (dB/Hz) |
IIR Butterworth |
2 |
40.35 |
34.04 |
IIR Chebyshev type I |
2 |
40.35 |
34.08 |
IIR Chebyshev type II |
2 |
40.35 |
7.31 |
IIR Elliptic |
2 |
40.35 |
34.08 |
FIR Equiripple |
320 |
40.35 |
30.62 |
FIR Kaiser |
450 |
40.35 |
29.74 |
FIR Rectangular |
450 |
40.35 |
29.33 |
FIR Hanning |
1200 |
40.35 |
30.83 |
FIR Blackmann |
1500 |
40.35 |
30.98 |
1500
1400
sample value
sample value
1300
1200
1100
1000
900
114.dat
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Fig 16 The noisy ECG having Baseline noise
450
400
350
300
sample value
sample value
250
200
150
100
50
filtered by FIR fillter
1600
1400
1200
sample value
sample value
1000
800
600
400
200
0
comparision of all signals
Vol. 2 Issue 6, June – 2013
0
-50
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
-200
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Fig 21 waveform shows comparison of all signals
450
400
350
300
sample value
sample value
250
Fig 17 ECG signal filtered by FIR filter
filtered by FIR and wavelet combination
10
5
sample value
sample value
0
-5
-10
enlarged view
200
150
100
50
0
-15
1140 1160 1180 1200 1220 1240 1260
sample number
Fig 22 waveform shows the enlarged view of ECG signal
-50
500
400
sample value
sample value
300
200
100
0
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Fig 18 ECG signal filtered by combination
filtered by IIR filter
Table 2 Comparison of parameters with and without wavelet (ECG sample 103.Dat)
Filter |
Spectral density after filtration (dB/Hz) |
Spectral density after filter and wavelet combination (dB/Hz) |
Average power after filtration (dB) |
Average power filter and wavelet combinat ion (dB) |
IIR Butterworth |
34.04 |
34.04 |
38.71 |
38.70 |
IIR Chebyshev type I |
34.08 |
34.08 |
38.30 |
38.29 |
IIR Chebyshev type II |
4.03 |
4.03 |
22.91 |
22.73 |
IIR Elliptic |
34.08 |
34.08 |
38.30 |
38.29 |
FIR Equiripple |
30.62 |
30.62 |
38.80 |
38.79 |
FIR Kaiser |
29.74 |
29.74 |
37.93 |
37.92 |
FIR Rectangular |
29.33 |
29.33 |
38.02 |
38.01 |
FIR Hanning |
30.83 |
30.83 |
37.94 |
37.93 |
FIR Blackmann |
30.98 |
30.98 |
38.08 |
38.08 |
Filter |
Spectral density after filtration (dB/Hz) |
Spectral density after filter and wavelet combination (dB/Hz) |
Average power after filtration (dB) |
Average power filter and wavelet combinat ion (dB) |
IIR Butterworth |
34.04 |
34.04 |
38.71 |
38.70 |
IIR Chebyshev type I |
34.08 |
34.08 |
38.30 |
38.29 |
IIR Chebyshev type II |
4.03 |
4.03 |
22.91 |
22.73 |
IIR Elliptic |
34.08 |
34.08 |
38.30 |
38.29 |
FIR Equiripple |
30.62 |
30.62 |
38.80 |
38.79 |
FIR Kaiser |
29.74 |
29.74 |
37.93 |
37.92 |
FIR Rectangular |
29.33 |
29.33 |
38.02 |
38.01 |
FIR Hanning |
30.83 |
30.83 |
37.94 |
37.93 |
FIR Blackmann |
30.98 |
30.98 |
38.08 |
38.08 |
-100
0 1000 2000 3000 4000 5000 6000 7000 8000
sample number
Fig 19 ECG signal filtered by IIR filter
The above table shows that the overall noise have removed without affecting the parameters such as spectral density and average power.
Removal of power line interference from ECG signal using Adaptive filtering.
-
The adaptive LMS function to use.
-
An unknown system or process to adapt.
-
Appropriate input data to exercise the adaptation process. In terms of the generic LMS model, these are the desired signal and the input signal.
Vol. 2 Issue 6, June – 2013
1200
1000
800
600
400
200
0
original ecg signal
Fig 25 Signal after removal of noise
Table 3 Comparison of Spectral density with and without adaptive filtration at (60 Hz)
MIT/BIH DATABASE |
Spectral density before filtration (dB/Hz) |
Spectral density after filter (dB/Hz) |
100.dat |
1.234 |
-2.914 |
114.dat |
7.081 |
2.197 |
123.dat |
0.6943 |
-1.668 |
207.dat |
5.402 |
-2.809 |
MIT/BIH DATABASE |
Spectral density before filtration (dB/Hz) |
Spectral density after filter (dB/Hz) |
100.dat |
1.234 |
-2.914 |
114.dat |
7.081 |
2.197 |
123.dat |
0.6943 |
-1.668 |
207.dat |
5.402 |
-2.809 |
-200
-400
0 500 1000 1500 2000
Fig 23 ECG signal with noise
noise signal
4
3
2
sample value
sample value
1
0
-1
-2
-3
-4
0 200 400 600 800 1000
sample number
Fig 24 Noise Signal
Advanced DSP Technique to Remove Baseline Noise from ECG Signal
When the spectral density is calculated with and without adaptive filtration the table shows that the 60Hz noise is removed from the database.
Therefore it may be concluded that the choice of the cut-off frequency is very important, however frequency lower than required cut-off frequency, does not filter the actual ECG signal component, while some of the noise successfully, but the ECG signal is distorted in the process. Cut-off frequency varies corresponding to heart rate and baseline noise spectra. Thus, constant cut-off frequency is not always appropriate for baseline noise suppression; it should be selected after a careful examination of the signal spectrum. When FIR filter with wavelet is applied on signal it can be observe that the combination of Kaiser and wavelet yield the smallest phase delay among all the FIR filters combination. It can remove the Baseline noises without distorting the waveform. Furthermore, there is significant delay in the filter result, thus this combination can be applied to long data window. Therefore,
this combination is appropriate only for offline application, but for real time application, in which short intervals of data is filtered and fast implementation is important, FIR is not an appropriate filtering method. IIR and wavelet combination is more appropriate for real time filtering application due to its lower computational complexity, and its better trade-off between average power and spectral density. It completely eliminates the oscillations produced at the starting of the waveform called ringing effect. For performance analysis we use different baseline noise removal methods for the purpose of comparison. The results are presented in the tabulation form. From the table it can be concluded that it outperform the other method.
I would like to express my sincere thanks to my guide Professor R. K. Mehrotra, Department of Electronics and Communication Engineering, Ajay Kumar Garg Engineering College,Ghaziabad for their guidance and support throughout the work.
-
Carr, J. J. and Brown John M. (1998). Introduction to Biomedical Equipment Technology (3rd ed.): Prentice Hall, Inc.
-
Chavan M. S., Agarwala R., and Uplane M.D.,
Suppression of Baseline Wander and power line interference in ECG using Digital IIR Filter International Journal Of Circuits, Systems And Signal Processing, issue 2,volume 2,2008.
-
Dhillon S. S. and Chakrabarti S., Power Line Interference removal From Electrocardiogram Using A Simplified Lattice Based Adaptive IIR Notch Filter, Proceedings of the 23rd Annual EMBS International conference, October 25- 28, Istanbul, Turkey, 2001, pp.3407-12.
-
Einthoven, W. (1906) Tele-cardiogramme. Arch Int de Physiol; vol 4 pp132-164.
-
Goldberger, et al. (2000) PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals Circulation 101(23): pp e215- e220 Circulation Electronic Pages; http://circ.ahajournals.org/ cgi/content/ full/101/23/e215.
-
Jane, R. and Laguna, P., Adaptive Baseline Wander Removal in the ECG: Comparative Analysis with Cubic Spline Technique, IEEE, 0276-6547/92, 1992.
-
Jane, R., Laguna, P. Thakor, and Caminal, P. (1992) Adaptive Baseline Wander Removal in the ECG: Comparative Analysis with Cubic Spline Technique, IEEE proceeding Computers in Cardiology, pp 143 146.
-
Jardins, T. D. (2002). Cardiopulmonary Anatomy Physiology (4th ed.).
Vol. 2 Issue 6, June – 2013
-
Javaid,R.; Besar, R. and Abas, F. S. (2006) Performance
Evaluation of Percent Root Mean Square Difference for ECG Signals Compression, Signal Processing: An International Journal , vol. 2, issue 2, pp 1-9.
-
Kaur M., and Singh B. Power line Interference Reduction in ECG Using Combination of MA Method and IIR Notch, International Journal of Recent Trends in Engineering, Vol 2, No. 6, November 2009.
-
Norbert, H. (2006) A New Class of Digital Filters Designed for ECG Noise Reduction Medical Informatics & Technologies, Proceedings, pp 44-49.
-
Oppenheim, A. V., Schafer R. W., Discrete-Time Signal Processing, Prentice Hall Publishing Company, 1999.