Noise Reduction from ECG Signal using Adaptive Filter Algorithm

DOI : 10.17577/IJERTV3IS070474

Download Full-Text PDF Cite this Publication

Text Only Version

Noise Reduction from ECG Signal using Adaptive Filter Algorithm

Shivani Sharma

Department of Electronics Engineering Madhav Institute of Technology and Science, Gwalior

Ravindra Pratap Narwaria

Department of Electronics Engineering Madhav Institute of Technology and Science, Gwalior

Abstract ECG plays an important role in the primary diagnosis, prognosis and survival analysis of heart diseases. ECG signals are weak and easily susceptible to noise and interference. In this paper we have presented an implementation of Least Mean Squares (LMS) and Normalised Least Mean Squares (NLMS) algorithm on MATLAB platform with the intention to compare their performances in noise reduction application. The ECG samples are recorded from MIT-BIH database and additive white Gaussian noise (AWGN) is added to the raw ECG signal. We simulate the adaptive filter in MATLAB with a noisy ECG signal and analyze the performance of algorithms in terms of SNR improvement and average power.

Keywords- Adaptive filter, LMS, NLMS, and Signal to Noise Ratio (SNR).

  1. INTRODUCTION Electrocardiography has had a profound influence on the

    practise of medicine. It has been always advantageous in the

    diagnosis of the cardiac problems. ECG elucidates the cardiac problems which makes it easier in diagnosis. During the last five decades the analysis of the ECG signal evolved from the simple visual inspection to completely automated diagnosis system. ECG detects changes in cardiac muscles like myocardial infarction, conduction defects and arrhythmia [1]. It recognises the variabilitys of heart activity, so it is very important to get the ECG signal clean and free from noise. Electrocardiogram is the trans-thoracic interpretation of the electrical activity of heart over a period of time, by electrodes attached to the outer surface of the skin and recorded by a device external to the body known as Electrocardiogram.

    ECG Signals generated from human body are often very weak so as to be easily covered by background noise. The noise in the ECG signals occur due to various reasons like electromagnetic interference due to ubiquitous supply lines and plugs, movement of patient, signals generated by other organs and impedance mismatching between electrodes[2]. Hence the ECG signals can be corrupted by various types of noises such as Power line interference, Electrode contact noise, Motion artifact, Muscle contraction, Base line drift, Instrumental noise generated by electronic devices [3]. Various methods have been employed for the removal of artifacts from ECG signals. One of them is using a 50 Hz Notch filter. Due to interference, the power supply might wander between 47 Hz – 53Hz [3]. FIR and IIR filters are also used for the removal of noise from ECG Signal. Several

    window techniques of FIR filters are also used for effective noise removal. A static filter excessively degrades the quality of the ECG signal resulting in loss of quality information. An Adaptive filter has the property of self adjusts the transfer function according to an optimization algorithm driven by an error signal. It undergoes filtering till error signal become minimum [4]. The construction flexibility of the adaptive filter hence improves the SNR of the filtered signal.

    Figure 1 Adaptive Filtering

  2. LITERATURE SURVEY

    Syed Zahurul Islam et. al. [4] proposed a performance study for LMS and RLS algorithm on various parameters like computational time, step size, correlation coefficients. The ECG signal was mixed with four types of AC and DC noises. These noises were nullified with the help of LMS and RLS algorithm. Results indicated that the DC bias noises cannot be handled by LMS algorithm whereas RLS algorithm can handle both type of noises. RLS has achieved best effective noise cancellation performance although its convergence time is slightly high.

    Sigi Hussain et. al. [5] proposed a comparative study of different algorithms of adaptive filter. LMS, NLMS and CSLMS (Constrained stability least mean square) algorithms are applied with real ECG signal from MIT-BIH database and compared the performance of each filter outputs. CSLMS has an ability to remove both stationary and non-stationary noise in an ECG signal. Hence CSLMS works best in terms of mean square error and signal to noise ratio.

    Yuzhong Jiao et. al. [6] proposed a new approach of adaptive filtering known as log LMS algorithm which

    quantised signals by the function of log2. It was introduced to decrease the complexity of LMS algorithm based adaptive filter. To avoid serious signal distortion of the signal, a modified approach which divides the convergence process into two different stages is applied. This method achieves fast convergence and low signal distortion in ECG signals.

    Sorror Behbahani et. al. [7] compared LMS algorithm of adaptive filter and the non-fault tolerant adaptive filters. LMS algorithm requires little computational power while the non- fault tolerant technique is highly reliable. The adaptive filter approach hence can be applied to readily remove 60 Hz noise while minimally distorting the true ECG signal.

    Chinmay Chandrakar et. al. [8] used RLS based adaptive filter for the noise removal of ECG signal. The SNR of the proposed method gives best results. Also the convergence rate is faster than LMS and computational complexity is less in the proposed implementation than its time domain.

    Mohammad Zia Ur Rahman et al. [9] proposed a simple and efficient Normalized Sign-Sign LMS algorithm for the removal of different kind of noises from ECG signals. The algorithm is used for acquiring high signal to noise ratio and less computational complexity. Hence the proposed method works best as compared to other LMS algorithms.

    Maryam Butt et. al. [10] presented an adaptive approach for the tracking of Power Line Interference (PLI) from ECG signal. The method used is State Space Recursive least squares (SSRLS) algorithm. A comparative study is done between 50 Hz notch filter and SSRLS algorithm. SSRLS algorithm works well in case of low SNR.

  3. PROPOSED IMPLEMENTATION

    An adaptive filter may be understood as a self-modifying digital filter that adjusts its coefficients in order to minimize an error function. This error function is also referred to as cost function, is a distance measurement between the reference or desired signal and the output of the adaptive filter. An adaptive algorithm is a procedure of adjusting the parameters of an adaptive filter. The desired signal is represented by d (n). The error signal is denoted by e (n) which is the difference between the desired response and the output of the filter y (n).

    = . . (1)

    Figure 2 Adaptive Algorithm.

    The reference noise is processed by an adaptive filter, with time varying parameters w0 (n), w1 (n), …………., w M-1 (n) , to produce the output signal y (n)

    1

    = () 1 . . . . . (2)

    =0

    The adaptive algorithms used in the paper are LMS and NLMS. The filter is designed by updating the filter co- efficient in each iteration by using the previous filter co- efficient and error signal. The updated filter co-efficient for LMS algorithm is as below:-

    + 1 = w (n) + µx (n) e (n)……………………………………(3)

    where w (n) = [w0 (n), w1 (n)……]t , is the taped weight vector at the nth index. The output of the filter is given by

    = (4)

    Another class of LMS algorithm is NLMS. NLMS is different from LMSin its weight updating rule. In NLMS step size parameter is not constant. The step size parameter changes from µ to µ (n) and the equation is given below

    µ (n) = µ / [p+ xt (n) x (n)]……………………………………………. (5)

    The weight updating rule for NLMS is

    w (n+1)= w (n) + (µ/ [p+ xt (n)x (n)]) x(n)e(n)……………….. (6)

    NLMS leads to fast convergence and is also stable as compared to LMS. The major disadvantage of LMS and NLMS algorithm is the excessive mean square error that causes signal distortion.

  4. METHODOLOGY

    The Dataset used in the study is taken from MIT-BIH Arrhythmia (mitdb) database of record 100 from Physio bank ATM [11]. Physio bank is a collection of well-characterized digital recordings of ECG signals. Many of the databases were developed at MIT and Bostons Beth Israel Hospital. It currently contains over 40,000 recordings of annotated, digitized physiologic signals and time series, organized in over 60 databases. Each database consists of a set of records, identified by a record name. The samples are taken for a time limit of one minute. The sampling frequency of the recorded samples comes out to be 360 Hz.

    Additive White Gaussian Noise of 10 db is added to the signal after the removal of baseline wander from the original ECG signal. In this simulation we collected 21600 samples of ECg signal of record 100. For the design of adaptive filter, MATLAB version 7.8.0.2009a is used. For analysis a comparison is made between LMS and NLMS algorithms. Average Power and SNR improvement is measured. Filter structures of LMS and NLMS are implemented for removing the noise from ECG signal and its results are plotted in the figures below.

  5. RESULT

    The noisy ECG signal which is taken as input is filtered using adaptive filter algorithms LMS and NLMS. The original ECG signal is passed through the LMS and NLMS adaptive algorithms and hence improving the SNR ratio of the signal to a greater extent. The noise reduction is effective in NLMS algorithm as compared to LMS algorithm. The figures of the signal before and after filtering are given below.

    Figure 3 Original ECG Signal.

    Figure 4 ECG signal with added 10 db AWGN noise.

    Figure 6 Filtered ECG signal by NLMS algorithm.

    Figure 7 Filter coefficients of LMS algorithm.

    Figure 8 Filter coefficients of LMS algorithm.

    Table 1 illustrates the SNR ratio evaluation of the ECG signal after being filtered through LMS and NLMS algorithm. The SNR of record 100 are noted down. Similarly Table 2 gives the details of the average power of the ECG signal after being filtered through LMS and NLMS algorithm. The SNR improvement is better in case of NLMS algorithm as compared to LMS algorithm but on the cost of excessive mean square error.

    Table 1 SNR evaluation

    Adaptive algorithm

    SNR

    SNR before filtering

    SNR after filtering

    SNR improvement

    LMS

    -8.6948

    2.3801

    11.0749

    NLMS

    -8.6948

    10.4057

    19.1005

    Figure 5 Filtered ECG signal by LMS algorithm.

    Table 2 Average Power evaluation

    Adaptive algorithm

    Average Power before filtering

    Average Power after filtering

    LMS

    -17.9462

    -6.8705

    NLMS

    -17.9462

    1.3305

  6. CONCLUSION

The paper compares two algorithms of adaptive filtering method. A comparison is made between LMS and NLMS algorithm of adaptive filtering on the basis of two parameters

i.e. signal to noise ratio (SNR) improvement and average power. The SNR improvement is good in NLMS algorithm as compared to LMS algorithm. NLMS algorithm performs better for noise reduction in the ECG signal but on the cost of excessive mean square error. It results in a more stable ECG signal as compared to LMS algorithm. NLMS has better convergence speed as compared to LMS due to the adaptive step size. The disadvantage which is faced in these algorithms is the excess mean square error which results in signal distortion which will be tried to rectify in the future work.

ACKNOWLEDGEMENT

The authors gratefully acknowledge Department of Electronics Engineering, Madhav Institute of Technology and Science, Gwalior, India for providing necessary support and research facilities.

REFERENCES

  1. Mikhled Alfaouri, Khaled Daqrouq, ECG Signal Denoising By Wavelet Transform Thresholding, American Journal of Applied Sciences 5 (3), 276-281, 2008, ISSN: 1546-9239.

  2. Ying-Wen Bai, Wen-Yang Chu, Chien-Yu, et al. Adjustable 60 Hz Noise Reduction by a Notch Filter for ECG Signal, International and Measurement Technology Conference, Como Italy ,1820 May, 2004.

  3. Ying-Wen Bai, Wen-Yang Chu, Chien-Yu, Yi-Ting, Yi-Ching Tsai and Cheng-Hung Tsai. Adjustable 60 Hz Noise Reduction by a Notch Filter for ECG Signal, International and Measurement Technology Conference Como Italy 18-20 May, 2004.

  4. Syed Zahurul Islam, Syed Zahidul Islam, Razali Jidin, Mohd. Alauddin Mohd. Ali, Performance Study of Adative filtering Algorithms for Noise Cancellation of ECG signal ,ICICS-978-1-4244-4657-5, IEEE- 2009.

  5. Sigi Hussian, Babitha M.S. , Noise Removal from Cardiac Signals Using Various Adaptive Algorithms , Proceedings of International Academic Conference on Electrical, Electronics and Computer Engineering , Chennai , ISBN: 978-93-82702-28-3, 2013.

  6. Yuzhong Jiao, Rex Y. P. Cheung, Mark P. C. Mok, A modified Log- LMS Adaptive Filter with Low Signal Distortion for Biomedical Application , 34th Annual International Conference of the IEEE EMBS, San Diego, California USA-978-1-4577-1787-1, 2012.

  7. Soroor Behbahani, Investigation of Adaptive Filtering for Noise Cancellation in ECG Signals , Second International Multisymposium on Computer and Computational Sciences, IEEE, 0-7695-3039-7-2007.

  8. Chinmay Chandrakar, M.K. Kowar. Denoising ECG Signals Using Adaptive Filter Algorithm, International Journal of Soft Computing and Engineering (IJSCE), ISSN: 2231-2307, Volume -2, Issue-1, and March 2012

  9. Mohammad Zia-Ur-Rahman, D V Rama Koti Reddy, Y. Sangeetha. Stationary and Non Stationary noise removal from Cardiac Signals using a Constrained Stability Least Mean Square Algorithm, 978-1- 4244-9799-7/11, IEEE-2011.

  10. Maryam Butt, Nauman Razzaq, Ismail Sadiq, Muhammad Salman, Tahir Zaidi. Power Line Interference Removal from ECG Signal using SSRLS Algorithm, 2013 IEEE 9th International Colloquium on Signal Processing and its Application, 978-1-4673-5609-1/13.

  11. How to use the PhysioBank ATM, Available [online]: http://physionet.org/cgi-bin/atm/ATM

  12. MATLAB version 7.8.0.2009a.

Leave a Reply