National Conference on Recent Trends in Engineering & Technology
Detection of Low-pass Noise in ECG Signals Rahul Kher1, Deepak Vala2, Tanmay Pawar3 1, 2
Research Scholar, SICART, Sardar Patel University, V V Nagar, India.
3
Associate Professor, EL Dept, Birla Vishvakarma Mahavidyalaya, V V Nagar, India.
Abstract— In this paper, PCA based algorithm is applied for detecting the motion artifact episodes in an ECG signal. A lowpass filtered synthesized noise signal has been used as if a motion artifact encountered in an ECG signal. Further, the analysis of the algorithm is carried out for different values of SNR levels with different spectral ranges of LPF (low pass filter): 0-5 Hz, 010 Hz, 0-15 Hz and 0-20 Hz. The algorithm derives an error signal, wherever a motion artifact episode (noise) is present in the entire ECG signal with 100% accuracy. The general trend of the algorithm is to produce a smaller magnitude of error for higher SNR (signal to noise ratio) i.e. low level of noise and vice versa. Keywords- Electrocardiogram (ECG), Principal component analysis (PCA), motion artifact, wearable-ECG (W-ECG), SNR
I.
INTRODUCTION
The electrocardiogram (ECG) reflects the electrical activity of the heart and is used to diagnose various types of cardiac abnormalities in a subject. In order to record the ECG even when the patient is performing routine activities nowadays the wearable ECG (W-ECG) recorders are available. These recorders are light-weighted, compact, rugged and easy to use, affordable, incorporated with large memory for storing a long term (ambulatory) ECG signal. Whereas, the W-ECG recorders are the convenient option of the hospitalization, it has some inherent drawbacks as well, e.g. the motion artifacts produced due to various body movement activities (BMAs) or physical activities (PAs) like walking, sitting, standing, climbing stairs up/down etc performed by the patient. The motion artifacts are dependent on the several factors like the type of BMA, the duration and magnitude of BMA and the pace at which these BMAs are performed. Researchers have proposed various methods to detect the motion artifacts and provide the clean ECG signal for the diagnosis [1] – [10]. There are several issues associated while analyzing such an ECG signal contaminated with motion artifacts, e.g. detection, classification and quantification of the motion artifacts (noise). However, the “unwanted” motion artifacts contain useful information related to BMA and various types of BMA classes can be recognized from the collected ECG signal itself. 1.
Rahul Kher is with EC department of G H Patel College of Engg & Tech, V V Nagar, as an Assistant Professor. Email:
[email protected] 2. Deepak Vala is with Electronics department of BVM Engg. College, V V Nagar as an Associate Professor. Email:
[email protected] 3. Tanmay Pawar is the Ph. D supervisor of 1 and 2 at SICART, Sardar Patel University, V V Nagar. Email:
[email protected]
13-14 May 2011
Thus recognition of BMA is useful for continuous monitoring of heart in ambulatory conditions [1] - [5]. For ambulatory ECG recorders the impact of body movement activity (BMA) on motion artifacts has not been fully investigated. Hence, a comprehensive study of motion artifacts in the ECG signal is a prime requirement, yet, in order to improve the accuracy of the commercially available W-ECG and similar ambulatory ECG recorders. The motion artifacts have a significant overlap in frequency with ECG signal, so filtering based on spectral separation is of limited use. Since BMA influences the ECG output, it is necessary to determine the BMA from the motion artifacts in the ECG signal. This will be helpful eventually in dynamic monitoring of cardiac activity of a patient and determining if any BMA is having a deleterious effect [1]-[5]. The possibility of artifact detection and filtering was initially explored in [6]. In [7], the ECG signals were analyzed using wavelet transform and a neural network. However, the reported performance is not very satisfactory as the wavelet based representation does not separate the in-band BMA signal from the ECG. In other works related to BMA analysis from non-ambulatory ECG, body position changes are detected for ischemia monitoring in [8]-[10]. Ming Li et al. [11] have proposed a physical activity (PA) recognition algorithm for a wearable wireless sensor network using both ambulatory electrocardiogram (ECG) and accelerometer signals. The authors have first, in the time domain, modeled the cardiac activity mean and the motion artifact noise of the ECG signal by a Hermite polynomial expansion and principal component analysis, respectively. A set of time domain accelerometer features has also been extracted. A support vector machine (SVM) has been employed for supervised classification using these time domain features. Second, motivated by their potential for handling Convolutional noise, cepstral features extracted from ECG and accelerometer signals based on a frame level analysis have been modeled using Gaussian mixture models (GMM). Third, to reduce the dimension of the tri-axial accelerometer cepstral features which are concatenated and fused at the feature level, heteroscedastic linear discriminant analysis is performed. To improve the overall recognition performance, authors have performed the fusion of the multi-modal (ECG and accelerometer) and multi-domain (time domain SVM and cepstral domain GMM). The organization of paper is as follows. Section II provides a brief description of the PCA-based algorithm used for noise
B.V.M. Engineering College, V.V.Nagar,Gujarat,India
National Conference on Recent Trends in Engineering & Technology episodes detection; followed by a discussion on experimental model and simulation results in section III and IV, respectively, and conclusion and discussion in section V. II.
ALGORITHM FOR DETECTING NOISE EPISODES
In [1], Pawar et al. propose a recursive PCA (RPCA) algorithm to detect abrupt changes in motion artifacts due to BMA transition. Since the RPCA algorithm, like any PCA algorithm is sensitive to feature alignment and it requires the data vectors to have the same dimension, the ECG beats are time synchronized with respect to R-peak in each beat and resampled to equalize each beat to a fix length of M0 samples. The length of current beat period M(i) is estimated as median of RR(i), RR(i - 1); . . . ; RR(i - 4), where RR(i) is the computed beat period for the ith beat. For length equalization, the ith beat with estimated beat period M(i) is resampled by a fraction of M0/M(i). The dimension M(i) depends on the beat period and the sampling frequency [1]. For example, for a normal heart rate of 72 beats/min and a sampling rate of 360 Hz, the dimension M(i) = 360 60/72 300. The ith length normalized ECG beat r(i) is represented as addition of two components in column vector format r(i) = r’(i) +
(i)
(1)
where r’(i) is the composite signal component of dimension M0 x1 (i.e., BMA artifacts riding on the actual ECG signal) and (i) is the noise. We assume that the composite signal for a given BMA can be represented by a few principal components only and that the principal components for different BMAs are different. The covariance matrix is calculated as i
Ci r ( k )r T (k )
(2)
k 1
To detect changes in motion artifacts present in the next ECG beat r(i), the component that lies in the span Ei = {ei1, ei2, … , eiL}, set of top L eigenvectors, is obtained. The error in approximation
(i 1) r (i 1) ( Ei EiT )(r '(i 1)
2 (3)
provides a measure of departure from the nearest BMA signal of the same class. If the error is large it corresponds to initiation of different BMA by the user [1]. III.
EXPERIMENTAL MODEL
In this work, as we have performed an offline testing and analysis of the PCA-based algorithm, we have considered the low-pass filtered white noise acting as the motion artifact in an ECG signal. We have used the ECG signals available from Physionet (MIT-BIH arrhythmia database). The additive motion artifacts in eqn. (1) are synthesized using low pass
13-14 May 2011
filtered noise with varying SNR and spectral ranges, as depicted in figure 1. ECG Signal, r ' (i)
White Noise, (i ) LPF: * 0-B Hz
A
∑
PCA-based Algorithm
Error Signal, Figure 1. Block Diagram of the Experimental Model.
The bandwidth, B*, of LPF in the experimental model has been taken as 5, 10, 15, 20 Hz. The value of multiplier A has been varied in order to change the SNR variations. Higher the value of A, smaller will be the SNR and vice versa. IV.
SIMULATION RESULTS
The primary aim of the simulation is to detect the smallest level of noise (i.e. highest SNR) that can be detected by the algorithm with 100% accuracy. The length of input ECG signals used over 648000 samples with 360 Hz of sampling frequency. So, on and average it will be 1800 seconds of ECG data. The noise has been added throughout the ECG data length with 10 seconds of noisy duration and 50 seconds of clean (noise-free) duration. There will be 1800/60 30 noise episodes available for detection. The PCA algorithm to be used over here will require the all the ECG beats aligned in a window of fixed width. For this experimental work the width has been kept to be 201, to allow the heart rates even upto 108 beats per minute. Thus, the dimension for the matrix for PCA algorithm is 1800 201. Figures 2 to 5 show the simulation results of experimental model presented shown in figure 1 for detecting the low-pass noise (transition) episodes in ECG signal – lead II of tap #100 of MIT-BIH arrhythmia database. The simulations have been carried out for different values SNR of the noise (motion artifacts) for the four spectral ranges: 0-5 Hz, 0-10 Hz, 0-15Hz and 0-20Hz. The simulation results indicate that the magnitude of the error increases as spectral range for lowpass filtering of the noise increases, i.e. the error magnitude for 0-20 Hz is higher as compared the corresponding value for 0-5 Hz. From these figures it is clear that the peak value of error increases as the SNR value decrease, i.e. as the noise level increases. Figure 6 shows the detection of single motion artifact detection for lead II of tap # 203 of MIT-BIT arrhythmia database. The clean ECG beats and the noisy beats are clearly visible in the figure. The algorithms has been verified for a total of 25 taps (100 to 119 and 200 to 219) for variety, and it is found that for all these ECG signals the algorithm performs with 100% error detection accuracy.
B.V.M. Engineering College, V.V.Nagar,Gujarat,India
National Conference on Recent Trends in Engineering & Technology
(a)
(b)
(c)
(d)
Figure 2. Detection of two noise episodes for tap#100 of MIT-BIH database (0-5 Hz LPF with SNR = 36.15 dB) (a) and (b); corresponding PCA errors (c) and (d)
(a)
(c)
(b)
(d)
Figure 3. Detection of two noise episodes for tap#100 of MIT-BIH database (0-10 Hz LPF with SNR = 35.34dB) (a) and (b); corresponding PCA errors (c) and (d)
(a)
(b)
(c)
(d)
Figure 4. Detection of two noise episodes for tap#100 of MIT-BIH database (0-15 Hz LPF with SNR = 33.68dB) (a) and (b); corresponding PCA errors (c) and (d)
(a)
(c)
(b)
(d)
Figure 5. Detection of two noise episodes for tap#100 of MIT-BIH database (0-20 Hz LPF with SNR = 32.87dB) (a) and (b); corresponding PCA errors (c) and (d)
13-14 May 2011
B.V.M. Engineering College, V.V.Nagar,Gujarat,India
National Conference on Recent Trends in Engineering & Technology
(a)
(b)
(c)
(d)
Figure 6. Detection of two noise episodes for tap#203 of MIT-BIH database (0-20 Hz LPF with SNR = 31.53dB) (a) and (b); corresponding PCA errors (c) and (d)
V.
[9] CONCLUSIONS AND DISCUSSION
We have presented an offline analysis of the PCA-based algorithm for detecting the motion artifacts episodes appearing in an ECG signal. Motion artifacts have been synthetically generated by lowpass filtering the noise with four spectral ranges: 0-5 Hz, 0-10 Hz, 0-15 Hz and 0-20 Hz. The primary aim of the analysis is to determine the minimum level of noise (i.e. highest SNR) that can be detected by the algorithm with 100% accuracy. In the process we have verified that the PCA error magnitude is significantly greater for the noisy episodes as compared to the clean ECG signal portions. Further, the error magnitude gradually increases as the spectral range for lowpass filtering of noise increases, i.e. for 0-20 Hz spectral range, the error magnitude is higher as compared to the rest of the spectral ranges.
M. Astrom, J. Garcia, P. Laguna, and L. Sornmo, “ECG Based Detection of Body Position Changes”, Signal Processing Report, vol. SPR-48, pp. 1-34, November 2000. [10] J. Garcia, M. Astrom, J. Mendive, P. Laguna, and L. Sornmo, “ECG Based Detection of Body Position Changes in Ischemia Monitorin”, IEEE Trans. on Biomedical Engineering, vol. 50, no. 6, pp. 677-685, June 2003. [11] Ming Li et al., “Multimodal Physical Activity Recognition by Fusing Temporal and Cepstral Information”, IEEE Transactions on Neural Systems and Rehabilitation Engineering, Vol. 18, No. 4, August 2010.
REFERENCES [1]
[2]
[3]
[4]
[5] [6]
[7]
[8]
T. Pawar, N. S. Anantakrishnan, S. Chaudhuri, and S. P. Duttagupta, “Transition Detection in Body Movement Activities for Wearable ECG,” IEEE Trans. on Biomed. Engg., vol. 54, no. 6, pp. 1149–1152, June 2007. T. Pawar, S. Chaudhuri, and S. P. Duttagupta, “Body Movement Activity Recognition for Ambulatory Cardiac Monitoring,” IEEE Trans. on Biomed. Engg., vol. 54, no. 5, pp. 874–882, May 2007. T. Pawar, N. S. Anantakrishnan, S. Chaudhuri, and S. P. Duttagupta, “Impact Analysis of Body Movement in Ambulatory ECG,” in 29th IEEE EMBC, Lyon, France, Aug. 2007, pp. 5453–5456. T. Pawar, S. Chaudhuri, and S. P. Duttagupta, “Analysis of Ambulatory ECG Singal,” in 28th IEEE EMBC, New York City, New York, USA, Aug.-Sept 2006, pp. 3094–3097. S. Chaudhuri, T. Pawar and S. Duttagupta, Ambulation Analysis in Wearable ECG, Springer, 2009, ISBN 978-1-4419-0723-3. V. X. Afonso, W. J. Tompkins, T. Q. Nguyen, and K. Michler, “Comparing Stress ECG Enhancement Algorithms with an Introduction to a Filter Bank based Approach”, IEEE Engineering in Medicine and Biology Magazine, pp. 37-44, May/June 1996. V. S. Nimbargi, V. M. Gadre, and S. Mukherji, “Characterization of ECG Motion Artifacts Using Wavelet Transform and Neural Networks”, In Indian Conference on Medical Informatics and Telemedicine, Kharagpur, West Bengal, India, 2005. F. Jager, G. B. Moody, and R. G. Mark, “Detection of Transient ST Segment Episodes During Ambulatory ECG Monitoring”, Computers and Biomedical Research, vol. 31, pp. 305-322, 1998.
13-14 May 2011
B.V.M. Engineering College, V.V.Nagar,Gujarat,India