i-manager's Journal on Digital Signal Processing

View PDF

Volume :4 No :1 Issue :-2016 Pages :1-8

Filtering of ECG Signal Using Adaptive and Non Adaptive Filters

Abhishek Sahu *  Jitendra Kumar **
* PG Scholar, Department of Electronics and Telecommunication, SSTC, Bhilai, India.
** Assistant Professor, Department of Electronics and Instrumentation, SSTC, Bhilai, India.

Abstract

Electrocardiogram (ECG) is an important diagnostic tool for the diagnosis of cardiac abnormalities. In this paper, the authors introduce a study on different types of noises, For example, Power Line Interference (PLI), Motion Artifacts, Electrode Contact Noise, Muscle Contraction, Base Line Drift, Electromyography/noise (EMG), Instrumentation Noise, etc. To eliminate the above mentioned noises, various algorithms of adaptive filter are used and authors also used Discrete Wavelet Transform (DWT) to remove Random Artifacts and filter with constant coefficients as because, hum manner is not accurate. To solve this problem, digital filters are used such as Adaptive filters as Least Mean Square (LMS), Normalized Least Mean Square (NLMS), Recursive Least Square (RLS), sign LMS, sign-sign LMS algorithms and Discrete Wavelet Transform (DWT). The performance of algorithms are evaluated by Signal to Noise Ratio (SNR), Mean Square Error (MSE), Percentage Root Mean Square (%PRD) and Normalized Mean Square (NMSE). In comparison to various adaptive algorithms, SSLMS gives better result for all parameters with MSE = 0.0262, NRMSE = 0.0033 , %PRD = 0.3331, RMSE = 0.331, and SNR = -4.3914 .

Keywords :

  • ECG,
  • LMS,
  • NLMS
  • RLS,
  • SLMS,
  • DWT,
  • SNR,
  • MSE
  • NMSE,
  • % PRD.

Introduction

The ECG signal is the most important tool for the diagnosis and finding of various cardiac problems. When ECG signal is recorded, it may be corrupted by different types of noises such as, Power line interference, Base line Wandering, Motion Artifacts, Electrode contact noise, Muscle Contraction, Instrumentation, Electro Surgical noise, etc [1]. The power line interference is the main source of interference due to 50Hz, because it lies in the ECG signal band (0.05-100Hz). This artifacts affects the ST Segment and degrade the quality of Signal, Frequency Resolution and gives high amplitude signals in ECG that hide the features which are important for clinical monitoring and diagnosis. Removal of these artifacts in ECG signal is an important task for better diagnosis. Removal of high resolution ECG signal from unwanted ECG signal which are contaminated with background noise is an important work of research. The ECG signal enhancement is to filter the desired signal component from the undesired artifacts. So to present an ECG that facilitates ECG and accurate interpretation is a necessity. Many techniques have been reported in the literature to address ECG enhancement using adaptive techniques [1-13]. Adaptive filtering techniques permit to find time varying potentials and to track the variations of signals [3]. Thakor et al. proposed an LMS based adaptive recurrent filter to acquire the impulse response of normal QRS complexes and then applied it for arrhythmia detection in ambulatory ECG recordings. In case LMS algorithm operates on an instantaneous basis, then weight vector is updated for each sample. The computational complexity can be reduced by using the sign based algorithms, namely, the signed regressor algorithm, the sign algorithm and the sign-sign algorithm[14, 15]. In order to work with both the complexity and convergence issues, the authors proposed various adaptive filter structures based on Normalized Signed Regressor LMS (NSRLMS) algorithm, Normalized sign LMS (NLMS) algorithm and Normalized Sign-Sign Least Mean Square error (NSSLMS) algorithm. These algorithms find less arithmetic complexity because of the sign present in the algorithm and best filtering capability because of the normalized terms [16, 17]. Discrete Wavelet Transform (DWT) can be realized by dividing the signal into low frequency and high frequency coefficients. All the adaptive algorithms are compared with the performance parameters such as Signal to Noise Ratio (SNR), Mean Square Error (MSE), Normalized Mean Square Error (NMSE), Percentage Root square Difference (%PRD), and after the comparison sign LMS gives better result.

1. Materials and Methods

1.1 ECG Record

MIT-BIH arrhythmia database [17] records the ECG signal. It consist of 48 annotated records obtained from 47 subjects studied by the arrhythmia laboratory of bath Israel hospital in Boston between 1975 and 1979. The database contains several records in the 100 series, which were chosen for the authors for research purpose where every record in the arrhythmia database is slightly over 30 min. It has a sampling frequency 360 Hz. Header file includes information about leads like the patient's age, sex and medications [18, 19].

1.2 Different Types of Noises

1.2.1 Power Line Interference

Power line interference noise occurs due to two mechanisms - Capacitive Coupling and Inductive Coupling [20]. Capacitive coupling refers to the transfer of energy between two circuits by means of coupling capacitance present in the two circuits. Inductive coupling is caused due to mutual inductance between two conductors. Capacitive coupling and inductive coupling is responsible for high frequency and low frequency noise respectively. Inductive coupling is more dominant for power line interference in ECG. The power line interference noise is due to 50 Hz or 60 Hz depending on the power supply [21].

1.2.2 Electrode Contact Noise

It is caused due to variations in the position of the heart with respect to the electrodes and changes in the propagation medium between the electrode position and the heart. This causes changes in the amplitude of the ECG signal, as well as frequency baseline shifts. Poor conductivity between the electrodes and the skin reduces the amplitude of signal [21].

1.2.3 Motion Artifacts

Motion artifacts occurs due to the changes of baseline caused by electrode motion. The main cause of motion artifacts are vibrations, movements, etc. In this ECG signal the baseline drift occurs at low frequency (less than 1Hz). Motion artifacts depend on the electrode properties and electrolyte properties [22].

1.2.4 Electromyography Noise (EMG)

EMG noise is caused due to the contraction of muscles besides the heart. EMG noise is random in nature and modelled by Gaussian distribution function. The mean of this noise is assumed to be zero and variance depends on the environmental changes. Frequency of EMG noise is between 100-500 Hz [22].

1.2.5 Instrumentation Noises

Noises also occurs when measuring instruments. Major source of such noises are electrical probes, cables, Signal amplifier and Analog to Digital converter. Another types of noise is colour noise or flicker noise is a low frequency electronic noise[22].

1.3 Adaptive Filter

Adaptive filter works as a linear filter, transfer function of adaptive filter which is controlled by variable parameters (coefficient). Figure 1 shows the block diagram of an Adaptive Filter. Its function is to adjust the variable parameter according to optimization algorithm and adapt according to the change in signal characteristics in order to minimize the error. It involves changing of filter coefficients over time. The vector representation of input signal [23] X(n) is given as,

(1)

Signal at the input of adaptive filter is corrupted with noise. It becomes the sum of desired signal d(n) and noise e(n).

Adaptive filter has Finite Impulse Response (FIR) structure.

Its impulse response is equal to the filter coefficient. The coefficients for a filter of order N [23] is,

(2)

Output of adaptive filter is y(n) given by,

(3)

Error signal is

(4)

Each and every time the instant variable filter updates the filter coefficients,

(5)

where ΔW(n) is a correction factor for filter coefficients

1.3.1 LMS (Least Mean Square)

It works only on error at the current time, hence filter weights are only adapted based on the error at the current time [23, 24].

According to this algorithm, updated weight is given by

(6)

where µ is step size.

1.3.2 NLMS (Normalized Least Mean Square)

It is an upgraded version of LMS. It updates the coefficient of adaptive filter. Step size of NLMS algorithm varies according to time [23, 24] .

According to this algorithm, the updated weight is given by,

(7)
(8)

 

where µ (n) = µ / [mod of x (n) 2]

1.3.3 SELMS Algorithm

In this algorithm, the sign function is applied to the error signal to update the filter coefficient of an adaptive filter [23, 24].

According to this algorithm, the updated weight is given by,

(9)

1.3.4 SSLMS Algorithm

In this algorithm, the sign function is applied to both input and error signal to update the filter coefficient of the adaptive filter [23].

According to this algorithm, the updated weight is given by,

(10)

1.4 Discrete Wavelet Transform (DWT)

For analysis of non-stationary signals, wavelet transform is a powerful method. ECG signal are non-stationary and time varying signals. So wavelet transform is suitable for the analysis of ECG signal. Wavelet allow both time and frequency analysis of signals. Discrete Wavelet Transform analyze the signal as a linear combination of the sum of the product of Wavelet coefficients [20].

2. Performance Evaluation Parameters

2.1 Time Domain Analysis

If x(n) is the recorded signal or ECG signal, xn, represents the noisy signal and xm is the filtered ECG signal, the Mean Square Error (MSE) is defined as[20, 24],

(11)

The Normalized form of NMSE is,

(12)

The Normalized form of NRMSE is,

(13)

percentage Root mean square error Difference (%PRD) is,

(14)

Signal to Noise Ratio in dB (SNR) is given as,

(15)

3. Result

The values of various performance evaluators (SNR, %PRD, MSE, NRMSE, RMSE) of noisy (colour noise), Adaptive RLS filtered and Adaptive NLMS filtered, Adaptive LMS filtered, Adaptive sign-LMS filtered and Adaptive QDRLS filtered ECG signal are evaluated as shown in Table 1. The high values of SNR and low values of %PRD and MSE are good. From Table 1, the authors find that noisy signal's SNR is very low, but all the filtered signal have high SNR after filtering the signal that have low %PRD and MSE. Noisy ECG signal (Gaussian noise) are filtered using various adaptive algorithms and parameters shown in Table 2. Similarly Table 3 shows the result for noisy ECG signal due to the power line interference noise. In the result, Figure 2, Figure 3, Figure 4, Figure 5, Figure 6 shows Gaussian noise added in ECG signal and filtered using NLMS, RLS, S-LMS, LMS, QDRLS algorithms respectively. After studying the result, the authors finds out the better adaptive filter for removal of ECG noise and showing better result for the performance parameters. Figure 7, Figure 8, Figure 9, Figure 10, Figure 11 shows colour noise added with ECG signal and then filtered using various adaptive algorithms such as NLMS, RLS, SS-LMS, S-LMS, QDRLS respectively. Similarly, Figure 12, Figure 13, Figure 14, Figure 15, Figure 16 shows the power noise. Table 1 shows that comparison of different algorithms using performance parameters for colour noise. Table 2 shows that, comparison of different algorithms using the performance parameters for Gaussian noise. Similarly Table 3 shows the performance evaluation for power line interference noise.

Table 1. Comparison of different Algorithms using Performance Parameters for Colour Noise

Table 2. Comparison of different Algorithms using Performance Parameters for Gaussian Noise

Table 3. Comparison of different Algorithms using Performance Parameters for Power Line Noise

Figure 1. Block Diagram of Adaptive Filter [23]

Figure 2. Gaussian Noise added with ECG Signal and Filtered NLMS algorithms

Figure 3. Gaussian Noise added with ECG Signal and Filtered RLS algorithms

Figure 4. Gaussian Noise added with ECG Signal and filtered using SLMS Algorithm

Figure 5. Gaussian Noise Filtered using LMS Algorithm

Figure 6. Gaussian Noise Filtered using QDRLS Algorithm

Figure 7. Colour Noise Filtered using NLMS Algorithm

Figure 8. Colour Noise Filtered using RLS Algorithm

Figure 9. Colour Noise Filtered using SSLMS Algorithm

Figure 10. Colour Noise Filtered using SLMS Algorithm

Figure 11. Colour Noise Filtered using QDRLS Algorithm

Figure 12. Power Noise Filtered using NLMS Algorithm

Figure 13. Power Noise Filtered using RLS Algorithm

Figure 14. Power Noise Filtered using SLMS Algorithm

Figure 15. Power Noise Filtered using SSLMS Algorithm

Figure 16. Power Noise Filtered using QDRLS Algorithm

4. Discussion

In this paper, simulation result is found in sequence to verify the performance of various techniques, artifacts like baseline wander, Power line interference, EMG noise and muscle artifacts with introduced in the ECG signal and the unwanted ECG signal is introduced to the filters. To ensure the stability of the outcomes, the entire method was repeated over the 7 ECG segments. The filters output SNR, MSE, %PRD finds the filter quality of separate desired signal from the undesired signal.

Conclusion

In this work, the authors have implemented various algorithm of adaptive filter for removing artifacts contaminated with ECG signal during recording. The adaptive algorithms LMS, NLMS, RLS, Sign-LMS, SSLMS were capable to remove noises such as white noise, colour noise, muscle artifacts, electrode contact noise, baseline wander noise, composite noise and power line interference properly. The performance of all algorithms was evaluated by parameters such as SNR, %PRD, MSE, NMSE. In comparison to various adaptive algorithms, SSLMS gives better result for all parameters with MSE = 0.0262, NRMSE = 0.0033, %PRD = 0.3331 and RMSE = 0.331, SNR = -4.3914.

References

[1]. E. T. Gar, C. Thomas and M. Friesen, (1990). “Comparison of Noise Sensitivity of QRS Detection Algorithms”. IEEE Tran. Biomed. Eng., Vol. 37, No.1, pp. 85- 98.
[2]. Y. Der Lin, and Y. Hen Hu, (2008). “Power-line interference detection and suppression in ECG signal processing ”. IEEE Transactions on Biomedical Engineering, Vol. 55, pp. 354–357.
[3]. N.V. Thakor, and Y.S. Zhu, (1991). “Applications of adaptive filtering to ECG analysis: noise cancellation and arrhythmia detection”, IEEE Transactions on Biomedical Engineering, Vol. 38, No. 8, pp. 785–794.
[4]. J.A. Van Alste, and T.S. Schilder, (1985). “Removal of base-line wander and power-line interference from the ECG by an efficient FIR filter with a reduced number of taps”. IEEE Transactions on Biomedical Engineering, Vol. 32, No. 12, pp.1052–1060.
[5]. A.K. Ziarani, and A. Konrad, (2002). “A nonlinear adaptive method of elimination of power line interference in ECG signals”. IEEE Transactions on Biomedical Engineering, Vol. 49, No.6, pp. 540–547.
[6]. S. Olmos, J. Garcia, R. Jane, and P. Laguna, (1999). “ECG signal compression plus noise filtering with truncated orthogonal expansions”. Signal Processing, Vol. 79, pp. 97–115.
[7]. J.M. Leski, and N. Henzel, (2005). “ECG baseline wander and power line interference reduction using nonlinear filter bank”. Signal Processing, Vol. 85,pp. 781–793.
[8]. V. Almenar, and A. Albiol, (1999). “A new adaptive scheme for ECG enhancement”. Signal Processing, Vol. 75, pp. 253–263.
[9]. C. Meyer, J.F. Gavela, M. Harris, (2006). “Combining algorithms in automatic detection of QRS complexes in ECG signals”, IEEE Transactions on Information Technology in Biomedicine, Vol.10, No. 3, pp. 468–475.
[10]. C. Brouse, G.A. Bumont, F.J. Herrmann, and J.M. Ansermino, (2006). “A wavelet approach to detecting electrocautery noise in the ECG”. IEEE Engineering in Medicine and Biology Magazine, Vol. 25, No. 4, pp. 76–82.
[11]. C. Vaz, and N.V. Thakor, (1989). “Adaptive Fourier estimation of time-varying evoked potentials”. IEEE Transactions on Biomedical Engineering, Vol. 36, pp. 448–455.
[12]. N.V. Thakor, C. Vaz, R.W. Mc Pherson, and D.F. Hanley, (1991). “Adaptive Fourier series modeling of time varyIng evoked potentials : study of human somatosensory evoked response to etomidate anesthetic”. Electro -encephalography Clinical Neurophysiology, Vol. 80, No. 2, pp.108–118.
[13]. A.K. Barros, M. Yoshizawa, and Y. Yasuda, (1995). “ Filtering non correlated noise in impedance cardiography ”. IEEE Transactions on Biomedical Engineering, Vol. 42, pp. 324–327.
[14]. P. Laguna, R. Jane, S. Olmos, N.V. Thakor, H. Rix, and P. Caminal, (1996). “Adaptive estimation of QRS complex by the Hermite model for classification and ectopic beat detection”. Medical & Biological Engineering & Computing, Vol. 34, No. 1, pp. 58–68.
[15]. B. Farhang-Boroujeny, (1998). Adaptive Filters- Theory and Applications. John Wiley and Sons, Chichester, UK.
[16]. S. Koike, (1999). “Analysis of adaptive filters using normalized signed regressor LMS algorithm”. IEEE Transactions on Signal Processing, Vol. 47, No. 10, pp. 2710–2723.
[17]. E. Eweda, (1990). “Analysis and design of a signed regressor LMS algorithm for stationary and nonstationary adaptive filtering with correlated Gaussian data”. IEEE Transactions on Circuits and Systems, Vol. 37, No. 11, pp.1367–1374.
[18]. de Laboratóio M. Biopac Student Lab. Biopac Systems Inc.
[19]. Moody GB, and Mark RG. (1990). “The MIT-BIH arrhythmia database on CD-ROM and software for use with it”. Proc. 1990 Computers in Cardiology, IEEE; pp. 185–8.
[20]. Manikandan MS, and Dandapat S. (2007). “Wavelet energy based diagnostic distortion measure for ECG”. Biomed Signal Process Control, Vol. 2, pp. 80–96.
[21]. R. Sivakumar, R. Tamilselvi and S. Abinaya, (2012). “Noise Analysis & QRS Detection in ECG Signals”. International Conference on Computer Technologyand Science (ICCTS 2012).
[22]. Smita Kasar, Abbhilasha Mishra, and Madhuri Joshi, (2014). “Performance of digital filters for noise removal from ECG signals in time domain”. International Journal of Innovative Research in Electrical, Electronics, Instrumentation and Control Engineering, Vol. 2, No. 4.
[23]. Uzzal Biswas, and Md. Maniruzzaman, (2014). “ReSmoving power line interference from ECG signal using adaptive filter and notch filter”, International Conference on Electrical Engineering and Information & Communication Technology (ICEEICT) 2014.
[24]. Ashraf A.M. Khalaf, Mostafa. M. Ibrahim, Hesham F, and A. Hamed, (2015). “Performance Study of Adaptive Filtering and Noise Cancellation of Artifacts in ECG Signals”. Department of Electronics & Communications Engineering, Faculty of Engineering, Minia University, Minia, Egypt, ICACT2015, ISBN 978-89-968650-5-6 .