Fifth International Conference on Aerospace Science & Engineering (ICASE 2017)
Proceedings
Performance Comparison of Adaptive Algorithms for ECG Signal Processing Manahil Zulfiqar, Yusra Zaheer Lodhi, Muhammad Nouman, , Muhammad Wajahat, Rizwan Qureshi Department of Electrical Engineering, COMSATS Institute of Information Technology Wah, Pakistan.
Email:
[email protected],
[email protected],
[email protected],
[email protected],
[email protected].
Abstract—ECG signal contains the information about the human cardiac system. A medical expert detects certain anomalies such as arrhythmia. ECG is often contaminated with instru-mental and biological type of artifacts which leads to wrong clinical diagnosis. In E-health system analysis of ECG signal is done automatically so it requires noiseless signal. Different types of artifacts like power line interference(PLI), Electrode contact noise, Electrosurgical noise and Lead wire problem effect the quality of the signal. Certain type of biological artifacts like random movement of the patient will add up a transient to the signal. In this paper, first we discuss different algorithms used for processing of ECG signals, than we perform experiments on ECG Signals for noise removal using adaptive algorithms Our third contribution is the comparison of results in terms of signal to noise ratio convergence rate and computational complexity for multiple type of artifacts.
extended to war zone, remote areas, inaccessible hilly terrain and dessert areas [21].ECG signal has amplitude (0.5-1.2)mV which is very low. While the electrodes maximum offset voltage is 300mV. Desired signal is often contaminated with certain artifacts like PLI, Base line drift and EMG which needs to be filtered for accurate ECG analysis [15]. ECG signal consists of six parameters, as shown in below, these parameters covers all features of blood circulation in one heartbeat. They are
I. INTRODUCTION
Fig. 2: ECG Signal A. Artifacts Fig. 1: E-health Monitoring System The development of electronic and communication technologies coupled with computer algorithms explore new systems for health care like E-health monitoring and automatic ECG analysis [4]. The bulky apparatus of health care are changed into smaller units interfaced with laptop and smart phones. American company Biotelemetry avails this technology for treatment of over one million patients wirelessly. With the help of this technology health care can be
During data acquisition or transmission, ECG signal is contaminated with certain artifacts. Artifacts can be divided into two types. 1. Biological 2. Environmental The cause of biological artifact is subject i.e random move-ment of patient, while PLI, instrumentation error and AWGN cause environmental artifacts. There are several methods avail-able in the literature to suppress these types of artifacts. we discuss some of them below.
317
Fifth International Conference on Aerospace Science & Engineering (ICASE 2017)
Proceedings
E. Empirical Mode Decomposition: It is method for solving non-linear data [7]. In EMD, complicated data set or input signal is decomposed into limited size, known as Intrinsic Mode Functions (IMFA) [1]. ECG signal from IMFs is performed in such a way to remove noise from ECG. F. Neural Network:
Fig. 3: Artifacts II. LITERATURE REVIEW A. Projection Pursuit Gradient Ascent In this technique, the source signal should be statistically independent and should have non Gaussian probability density functions [8]. In this algorithm, source signal is obtained from the mixture of signals by calculating their inner product. [5] 4
Kurt(y) = E(y ) 3
(1)
B. Cubic Spline Curve Fitting This technique is used for elimination of baseline drift from ECG signal. In this algorithm, points of reference are compared with cubic spline to estimate the base line which is then subtracted from the ECG [14]. This is an adaptive technique. C. Linear Spline Curve Fitting
Artificial Neural Network (ANN) is mechanized algorithm for the detection of ischemic periods in long duration electrocardiogram (ECG) recordings. Neural network is a computational model which is inspired by the biological structure of neurons in the human brain. It has mainly three layers. input, hidden and output layer, interconnected by adjustable weights. Single beat linear expansion interval represents the input signal of neural network which specifies beat as ischemic or normal. Through trained system of neural networks we can differentiate normal and ischemic patterns of same patient without requiring the abstraction of ECG. Sampling frequency and cardiac frequency depends on high dimensional space of sampled ECG over an interval of single beat.
G. Particle Swarm Optimization: Particle Swarm Optimization (PSO) is a type of Swarm Algorithm that is used as an optimization technique for maxima and minima of the function, [6].PSO can be used for the minimization of the Baseline Wander noise signal present in the ECG signal.There are mainly two equations of PSO algorithm. One is used for updating the particle velocity and other for updating particle position. These equations are restructured depends upon the present input signal. The output of the PSO algorithm is acting as a coefficient for Adaptive filter.Partical Swarm Optimization algorithm is faster, cheaper and efficient as compared with other optimization techniques.PSO based Adaptive filter is simple to build in MATLAB environment and removes maximum noise from ECG [10].
This method takes ECG signal for a single cardiac cycle X[n], between the start of P wave and end of T wave and subtract its mean value to generate Y[n] [16]. First order polynomial P[n] is compared with Y[n] and the sampled value of QRS complex are replaced with corresponding value of p[n]. This gives y[n], now again p[n] is compared with y[n] and then subtracted from y[n] to obtain baseline variation signal.
III. FILTERS
D. Wavelet Adaptive Filtering Wavelet adaptive filtering is very popular in non-stationary signal processing applications due to its time frequency resolution. In ECG signal processing, ST segments distortion is minimized in ECG signal by baseline removal through WAF [17]. Suppression of baseline is important because it makes inspection of signal difficult. Wavelet adaptive filtering, in ECG has the possibility of decomposing the signal into different bands of frequency. This makes the detection and the reduction of baseline wander in low ECG signals possible.
Fig. 4: Filters Filters can be classified into two types as shown in the fig.4 1. Fixed filter 2. Adaptive filter
318
Fifth International Conference on Aerospace Science & Engineering (ICASE 2017) Since ECG is non-stationary signal, adaptive filters are useful for its processing. They can be classified into three types i-e LMS, NLMS and RLS [18]. Whereas, fixed filters are based on fixed coefficients they cannot change their parameters.
A. Fixed Filter Fixed filters are also used for ECG signal processing.They have no mechanism for predicting the change in environment. In literature we have found various fixed filters used for ECG processing. These filters are designed based on a-priori knowledge about the noise spectrum. Some of the popular types are 1) FIR 2) IIR 3) Median filtering 1) FIR FILTER: In FIR filtering, the output y[n] is sum of weighted values of past input shown in fig 5, [12]. M
Y [n] =
=0
bkx(n k)
(2)
kX In FIR the system function can be describe as, Design Parameters 1) Optimization based design 2) Arbitrary magnitude/phase response 3) Can obtain linear phase 4) Can require large M Properties: 1) Stable 2) No feedback is required 3) Used in phase sensitive application 1 Here x[n] is input, Z is unit delay, b0; b1; b2 and b3 are coefficients and Y [n] is the output response.
2) IIR Filter: It is essentially a feedback loop, IIR filters allows zeros and poles. IIR also called recursive filters [20]. IIR filters are not guaranteed to be stable. mathematically
written as X
Y [n] =
N
i=0
X
N
Proceedings
B. Adaptive Filter Adaptive filter changes its parameters according to change in the environment over time [9]. Different state of the art adaptive algorithms like LMS, NLMS and RLS can be used from processing of non stationary signals. It requires two types of signal. One is the primary signal and other is reference input. It minimizes the error between primary and reference input [22]. Desired signal can be represented as [11]: d(n) = x(n) + v(n)
(4)
e(n) = d(n) y(n): e(n) is error signal,
(5)
1) Adaptive Algorithms: In this paper, we have implemented three state of the art adaptive algorithms for the processing of ECG signals. [24] a) Least Mean Square: The least mean squares algorithm modifies its weights to minimize cost function. Implementation of LMS algorithm is easy and computationally efficient [23]. LMS updates its weight according to the following equation.
W (n + 1) = W (n) + 2 (x(n))e(n)
(6)
Where, denotes the step size. W (n) is the current adaptive filter coefficient. W (n + 1) is the updated AF coefficients. The step size value should be adjusted carefully because it affects the convergence speed, steady state error, and stability of the AF [19]. y(n) is the output of the filter. Error signal is calculated using the equation. e(n) = d(n) y(n)
(7)
The problem with the LMS is slow convergence and selection of step size.
(3) b) Normalized Least Mean Square: To overcome the issue of
aiX[n i] + bjy[n j]
step size, NLMS algorithm is implemented. Step size is adaptive in NLMS such as if the error signal is large the step size becomes large and vice versa. NLMS algorithm follows time varying step size (n) [19]. Convergence speed of adaptive filter can be modified by step size.
j=1
Desired requirements 1) Transform analog filter design 2) Frequency selective gain 3) Nonlinear phase/no control
a
4) Less coefficient than FIR
(n) =
3) Median Filtering: In this technique median of ECG signal is th
subtracted from input ECG which gives ECG*, 5 order polynomial is compared it with to obtain baseline esti-mation at the end this base line estimated signal is subtracted from original ECG signal, median correction is used to further minimize the baseline drift. This approach has advantage that in the absence of baseline variation signal is not distorted thats why it is computationally efficient [2], [13].
2
(c+ k x(n) k )
W (n + 1) = W (n) + e(n)x(n)
(8) (9)
NLMS and LMS filter are exactly same in structural terms. Selection of the step size parameter is one of the draw back of LMS. So we use NLMS algorithm here step size parameter
319
Fifth International Conference on Aerospace Science & Engineering (ICASE 2017)
Proceedings
Fig. 5
Fig. 8: Adaptive Noise Cancellation
Fig. 6: Direct Form 2 IIR
c) Recursive Least Square: In time varying environment RLS is known for excellent performance [3]. The RLS algo-rithms produces very good results but it is computationally very much expensive compared to LMS and NLMS.The weight updating for RLS is given below. d
k
k i2
g (k) = =1
d
k
(10)
Xi k i
g (k) = =1
" (i)
T
[d(i) X (i)w(k)]
2
(11)
Xi IV. SIMULATIONS AND RESULTS Fig. 7: Adaptive Filter
is normalized. Faster convergence is achieved by using NLMS on the cost of computational complexity.
Massachusetts Institute of Technology and Boston Beth Hospital have developed an online database for conducting research in arrhythmia and related cardiac subjects. We have performed experiments on five ECG signals from this data base to validate the results, However the results are shown for only one signal. Simulations are perform in MATLAB 2014 and artifacts generated in MATLAB based on their frequency spectrum. We have eliminated the base line drift and PLI using
320
Fifth International Conference on Aerospace Science & Engineering (ICASE 2017)
Proceedings
three different adaptive algorithms the results are compared in terms of SNR, convergence speed and computational complex-ity. Simulation results shows that LMS is less complex, higher SNR is achieved through RLS, convergence speed of NLMS is faster then others.
Fig. 11: Recursive Least Square-Power Line Interference
Fig. 9: Normalized Least Mean Square-PLI
Fig. 12: Interference
Fig. 10: Least Mean Square-Power Line Interference TABLE I: Simulation Results Noise
NLMS
PLI BW
2.95 2.7619
Time(sec)
SNR
21.86 19.04
LMS
Time(sec)
2.622 3.03
SNR
22.17 21.251
RLS
Time(sec)
3.56 3.45
SNR
27.22 24.25
V. DISCUSSION AND CONCLUSION Remote E-health systems are becoming increasingly popular as they provide time efficient treatment and advanced medical facilities can be extended to remote areas. Since ECG contains important information about the human cardiac system, it is an integral part of E-health systems. These filtration techniques purifies the signal which is necessary for accurate analysis.
Fig. 13: Noise Free ECG signal Research in Biomedical domain is increasing at a rapid pace. The adaptive power of these intelligent algorithms can be
321
Fifth International Conference on Aerospace Science & Engineering (ICASE 2017)
Fig. 14: Least Mean Square-Baseline Wander
Proceedings
Fig. 16: Mean Square Error
[5] J. H. Friedman and J. W. Tukey, “A projection pursuit algorithm for exploratory data analysis,” 1974. [6] V. B. Galphade and P. Bhaskar, “Particle swarm optimization algorithm based adaptive filter for removal of baseline wander noise from ecg signal,” 2015.
[7] N. E. Huang, Z. Shen, S. R. Long, M. C. Wu, H. H. Shih, Q. Zheng, N.-C. Yen, C. C. Tung, and H. H. Liu, “The empirical mode decomposition and the hilbert spectrum for nonlinear and nonstationary time series analysis,” in Proceedings of the Royal Society of London A: Mathemati-cal, Physical and Engineering Sciences, vol. 454, no. 1971. The Royal Society, 1998, pp. 903–995. [8] A. Hyvarinen and E. Oja, “Independent component analysis: algorithms and applications,” Neural networks, vol. 13, no. 4, pp. 411–430, 2000.
[9] S. Z. Islam, S. Z. Islam, R. Jidin, and M. A. M. Ali, “Performance study of adaptive filtering algorithms for noise cancellation of ecg signal,” in Information, Communications and Signal Processing, 2009. ICICS 2009. 7th International Conference on. IEEE, 2009, pp. 1–5.
[10] V. Joshi, A. Verma, Y. Singh, and G. Pant, “Comparing performance of pso and mpso techniques for ecg signal.” [11] S. Khan, S. M. Anwar, W. Abbas, and R. Qureshi, “A novel adaptive algorithm for removal of power line interference from ecg signal,”
Fig. 15: NLMS-Baseline wander exploited to make the existing systems more smarter. More advanced algorithms can be used for producing better results. ECG is an open and extensive area of research. Machine learning algorithms can be used for training of ECG systems which in turns lead to acceptable results.
REFERENCES [1] M. Blanco-Velasco, B. Weng, and K. E. Barner, “Ecg signal denoising and baseline wander correction based on the empirical mode decompo-sition,” Computers in biology and medicine, vol. 38, no. 1, pp. 1–13, 2008. [2] V. Chouhan and S. S. Mehta, “Total removal of baseline drift from ecg signal,” in Computing: Theory and Applications, 2007. ICCTA’07. International Conference on. IEEE, 2007, pp. 512–515.
[3] E. Eleftheriou and D. Falconer, “Tracking properties and steadystate performance of rls adaptive filter algorithms,” IEEE transactions on acoustics, speech, and signal processing, vol. 34, no. 5, pp. 1097–1110, 1986. [4] G. Eysenbach, “What is e-health?” Journal of medical Internet research, vol. 3, no. 2, p. e20, 2001.
Science International, vol. 28, no. 1, 2016. [12] Y. Lim and S. Parker, “Fir filter design over a discrete powers-oftwo coefficient space,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 31, no. 3, pp. 583–591, 1983. [13] J. M. Lkeski and N. Henzel, “Ecg baseline wander and powerline interference reduction using nonlinear filter bank,” Signal processing, vol. 85, no. 4, pp. 781–793, 2005. [14] C. Meyer and H. Keiser, “Electrocardiogram baseline noise estimation and removal using cubic splines and state-space computation tech-niques,” Computers and Biomedical Research, vol. 10, no. 5, pp. 459– 470, 1977. [15] S. Nayak, D. M. Soni, and D. D. Bansal, “Filtering techniques for ecg signal processing,” International Journal of Research in Engineering & Applied Sciences, vol. 2, no. 2, pp. 671–679, 2012. [16] C. Papaloukas, D. Fotiadis, A. Liavas, A. Likas, and L. Michalis, “A knowledge-based technique for automated detection of ischaemic episodes in long duration electrocardiograms,” Medical and Biological Engineering and Computing, vol. 39, no. 1, pp. 105–112, 2001. [17] K. Park, K. Lee, and H. Yoon, “Application of a wavelet adaptive filter to minimise distortion of the st-segment,” Medical and Biological Engineering and Computing, vol. 36, no. 5, pp. 581–586, 1998.
[18] I. Romero, D. Geng, and T. Berset, “Adaptive filtering in ecg denoising: A comparative study,” in 2012 Computing in Cardiology. IEEE, 2012, pp. 45–48. [19] H.-C. Shin, A. H. Sayed, and W.-J. Song, “Variable step-size nlms and
322
Fifth International Conference on Aerospace Science & Engineering (ICASE 2017) affine projection algorithms,” IEEE signal processing letters, vol. 11, no. 2, pp. 132–135, 2004. [20] R. Storn, “Differential evolution design of an iir-filter,” in Evolutionary Computation, 1996., Proceedings of IEEE International Conference on. IEEE, 1996, pp. 268–273. [21] S. Tachakra, X. Wang, R. S. Istepanian, and Y. Song, “Mobile ehealth: the unwired evolution of telemedicine,” Telemedicine Journal and E-health, vol. 9, no. 3, pp. 247–257, 2003. [22] Abbas, Ghulam, Muhammad Jaleed Khan, Rizwan Qureshi, and Khurram Khurshid. "Scope of Video Magnification in Human Pulse Rate Estimation." In Machine Vision and Information Technology (CMVIT), International Conference on, pp. 69-75. IEEE, 2017. [23] B. Widrow, J. M. McCool, M. G. Larimore, and C. R. Johnson, “Stationary and nonstationary learning characteristics of the lms adaptive filter,” Proceedings of the IEEE, vol. 64, no. 8, pp. 1151–1162, 1976. [24] R.Qureshi, M.Uzair, Khurram K ”Multistage Adaptive Filter for ECG Signal Processing, In Communication, Computing and Digital Systems (C-CODE), International Conference on, pp. 363-368. IEEE, 2017
323
Proceedings