Sie sind auf Seite 1von 7

1

Baseline fluctuation attenuation and Power line frequency removal in ECG Signal.
ANKAN ROYBARDHAN
AbstractECG Signal is the measure of the Electrical Activity of the heart. The electrical activities are detected through electrodes attached to the surface of skin. For diagnosis and proper interpretation from the ECG plot, the signal has to be free from several artifacts which degrade the signal thus recorded. In this paper, two of the phenomena are studied and attempted to remove, viz. Baseline fluctuation-BLF (due to skin movement) and Power line frequency interference 50Hz. Firstly the spectral density is estimated for the power content of BLF. Based on the study following filters are implemented viz. Multiple IIR notch filter for removal of 50Hz frequency component (also harmonics at 100Hz), Digital FIR High pass filter for attenuation of the BLF. A linear phase response which is one of the primary requirement of the ECG Signal is observed. The power line noise in the ECG signal has also been considerably reduced. Index Terms Baseline Removal, Finite Impulse Response Filter, IIR Filters, Spectral Analysis.

The most prominent amongst the enlisted media of contamination are the Baseline Fluctuation (BLF) and the Power Line Interference (PLI). The BLF or Baseline Wander as it may be called is inherent in the recorded signal due to the muscular contraction and expansion of the patient. The second artifact that is subjected to in this paper is the PLI, because of the presence of 50Hz AC power line frequency components and its higher Harmonics in the Electronic Systems. The goal is attenuation of these prominent artifacts with special emphasis to prevention of phase distortion.

I. INTRODUCTION

HE Electrocardiogram (ECG) is process of recording the electrical activity of the heart. A time plot of the recorded ECG data sample as shown of the form Fig. 1, is of special interest to the clinicians and doctors. The ECG signal is recorded using several electrical devices and the signal is captured by plotting the potential difference between the leads of the ECG probe, which is kept in touch with the skin surface of the patient. In the process of recording the signals, several other forms of interfering signals are also recorded which distorts the original signal, thereby showing an improper set of samples. In order to extract useful information from the noisy ECG signals, the raw ECG is pre-processed.[1]. Preprocessing ECG signals helps in removing contaminants from the ECG signals. Broadly speaking, ECG contaminants can be classified into the following categories: --Power line interference --Electrode pop or contact noise --Patientelectrode motion artifacts --Electromyographic (EMG) noise --Baseline wandering/Fluctuation.ss
Manuscript received December 4, 2012. The Author is with the Department of Electrical and Computer Engineering, University of Florida, Gainesville 32601, Florida, USA. (352-870-7208; email : ankan@ufl.edu)

Fig. 1. PQRST Complex of an ideal ECG data recording.

Following the a small clinical interpretation of the Complex shown in Fig. 1 --Atrial contractions shows P wave. --Ventricular contractions show as QRS complex. --Electrical activity produced when the ventricles are recharging for the next contraction T wave. [3]

II. METHODOLOGY A. Data Analysis The sample has been recorded and experimented based on the readings taken in EUROPE. Therefore the Power Line frequency is 50Hz. The continuous time data has been amplified through an Instrumentation Amplifier with a gain of 1,000 and digitized with a 12 bit A/D Converter. Sampling frequency is maintained at 1,000 Hz. The time sample plot of

2 the signal is shown as in Fig. 2a. High frequency component is present in the signal as depicted in the figure. ECG standards shows that the maximum frequency content in the ECG signal for a normal adult is about 150Hz. (95% of the information is in-between 0.5Hz to 100Hz). So, the signal is therefore down sampled to a sampling frequency of 250Hz, the nyquist maximum frequency content being about 125Hz.

Fig. 3. Power Spectral Density of the down sampled data

The peaks at 0.4, 0.8 are prominent in the figure. These correspond to the PLI. The frequency content for the BLF corresponds to a maximum of 0.5Hz. But during Bradycardia, the heart pumping may go down to 40beats/mins leading to 0.675Hz as the lowest frequency content in the ECG Signal data. So, our objective for BLF removal is to attenuate frequency contents lesser than 0.5Hz (0.004) by designing a High Pass filter. The same is also evident by a peak shown in the lower part of PSD.[4] A passband of 0.5Hz (0.004) till 105Hz (0.84 ) is attained, since the maximum information is limited between 0.5Hz through 100Hz. Frequency higer than 0.84 is thus attenuated by passing through a Low Pass Filter. III. FILTER DESIGN ALGORITHM
2

Fig. 2. ECG Signal Plot of the original sampled data.

B. Power Spectral Estimates and Analysis Considering the Signal to be a Random Process, the time domain sequence can be transformed to frequency domain using Fourier Transform. The power content at each frequency can be determined using the Power Spectrum Density Plot. (1)

(2) The objective is to preserve the phase response of the data recorded. So, the use of FIR filter is of main concern in this paper. FIR Symmetric filter co-efficients are calculated by firstly approximating a window, where the signal is passed through and arbitrarily truncate and shift (to make it causal) the window length so as to get the best possible frequency response of the filtered output. It has been observed that filter co-efficients and thus the filter order pertaining to this windowing technique results in order of filter to approximately 1500 to get the desired cutoff. [2]

Eq. (2) gives the power density spectrum at a given frequency . This called the periodogram estimate. In other words, the signal is considered to be Wise Sense Stationary, thus its Power density spectrum is given by (3) Which is the Fourier transform of the Auto-correlation function of the input signal, X(n) in this case (Sampled version of X(t)).[7] A plot of the spectral density has been shown in Fig. 3, the estimate helps to determine the Power content at the specific points of interests of that of BLF and PLI. Sampling frequency is 250Hz, therefore 50Hz corresponds to 0.4. Its harmonics at 100Hz (0.8) is also present in the signal. The 150Hz part(3rd harmonic) is attenuated since the signal is down sampled at 250Hz.

(4) where , (5) [5] The Parks-McClellan algorithm is therefore chosen to design the High Pass and the Low Pass filter. The PM Filter is an iterative algorithm for finding the optimal Chebyshev finite

3 impulse response (FIR) filter. This means, due to the inherent ripple quality of Chebyshev design, the PM filter also comes with pass band and stop band ripple. The reason to choose PM filter is that, with a given filter specifications viz. band attenuations, least filter co-efficients and best tradeoff between Mainlobe width and side lobe height, the iterative algorithm helps calculating the least order of the FIR filter. To remove PLI frequency content, we use 02 nos. 2 nd order IIR notch filters with specifications as mentioned in the subsequent design section of this paper. A. Design of Digital Filters. 1. Design of Low Pass Filter- The frequency content above 105Hz (0.84 ) is removed by passing the down sampled version of the signal through a Low Pass filter of cutoff frequency at 106.25Hz (0.86 ) with 217 order. The frequency reponse of the filter is shown in fig. 4.
Fig. 6a. IIR Notch filter with cutoff at 0.4 and -3dB bandwidth of 2Hz.

harmonics at 100Hz, and secondly, the ripples in the pass-band induces humming in the signal information part. 2 notch filters, one at 50Hz and one at 100Hz are applied to attenuate the PLI at 50Hz and its harmonics as well. The frequency response of each notch filter is shown in fig. 6a and fig. 6b

Fig. 4. Parks-McClellan Low Pass filter with cutoff at 0.86.

2. Design of High Pass Filter- The pass-band of 0.5Hz to 100Hz is preserved as it is. A high-pass filter with transition band of 0.25Hz to 0.5Hz (0.002 to 0.004) is designed with Parks-McClellan algorithm. The filter order comes up to be 1156. The frequency response is shown in fig. 5

Fig. 6a. IIR Notch filter with cutoff at 0.8 and -3dB bandwidth of 2Hz

Here is a tradeoff been presented between the usage of IIR notch and FIR notch. With FIR notch of following filter specifications, we get the filter frequency response as shown in fig. 7 s1=0.388 , p1=0.392 , p2=0.408, s2=0.412 ,

Fig. 5. Parks-McClellan High Pass filter for BLF removal.

3. IIR Notch The wires carrying the electrical pulses from the patients body till the recording device is prone to the power line frequency interference. The use of IIR notch filter is justified based on the unsatisfactory performance shown by Equiripple FIR multi band stop filter. Firstly, the filter order goes up to the order of 800 for a sharp cutoff at 50Hz and its

These frequencies correspond to 48.5Hz, 49Hz, 51Hz, 51.5Hz. The filter order comes up to be 918 using the Formula given as eq. (4). We observe in the fig. 7. that even though the ripples being quite low in pass-band, the filtered output using the FIR filter is not as prominent as by using IIR. In addition to it, this sharp cutoff at 50 Hz and its harmonics calls for such a high order of FIR filter. A comparison has been drawn between the filtered output using an IIR and FIR which has been depicted in fig. 8a and fig. 8b.

4
.

Lattice based adaptive filter [9], Subtraction [10], PLI detector[11] etc. which primarily stresses upon symmetrical impulse response filters with much lower order. Studying the pole zero plot of the IIR notch that is used, shows, there are 2 complex conjugate poles and zeros. The zeros in the unit circle is at angles of (50Hz) and (100Hz). The steep ness of the notch filter is controlled by the proximity of the poles to the zeroes.

(6) , Gain considered being unity.


Fig 8a. IIR 2nd order Notch filter at 0.4 (50Hz) and 0.8 (100Hz)

Here, =72o for =0.4 and =144o for shows the pole zero plot of the notch filters.

=0.8. fig. 9a,b

Fig 8b. FIR 918 order Notch filter at 0.4 (50Hz) and 0.8 (100Hz)

Fig 9a. IIR 2nd order Notch filter at 0.4 (50Hz) Pole zero plot.

It is clearly observed that frequency content around 50Hz is attenuated (Notched) to a major extent and such a high order FIR filter is preferable avoided when such a sharp cutoff response is of major concern. An algorithm has been devised for such filtering process which is shown in fig. 9. Where firstly Signal is down-sampled to 250Hz, then it is low pass, so as to attenuate the frequency content above 105Hz. This is quite justified since, from the data and the abstract presented, the signal is considered to be band limited and thereby down sampling to such extent will not necessarily introduce aliasing. Although, essentially the higher frequency content does not contains information, so it is attenuated through a low pass here. Next, the signal is passed through 2 IIR notches to remove the PLI frequencies. Finally, the BLF is suppressed by implementing an FIR High pass filter with a cutoff frequency around 0.5Hz. Experimentations have shown that instead, using IIR Chebyshev filter of order 7, the time plot of the output is a close approximation of the required PQRST complex. This response is obtained at the cost of distorting the phase of the ECG signal thereby introducing different group delay for different frequencies. Also, in literature, several other sophisticated methods has been proposed for removal of PLI and BLF viz. Wavelet Co-efficient method[8], Simplified

Fig 9b. IIR 2nd order Notch filter at 0.8 (100Hz) Pole zero plot

The in the second notch filter is different from that used in notch1. The motive is, if we closely observe fig. 8a, the frequency content around 50Hz has peaky distribution. Having a sharp notch at that location will attenuate the 50Hz, but will show the nearby frequency response as in fig. 8b. So, we have less sharper -3dB band with for 50Hz attenuation as compared to that in 100Hz.

5 After applying the LPF, Notch and the HPF, a set of following responses we get from fig. 10, 11, 12,13. The power spectral density shows the proper attenuation of the BLF and PLI as in fig. 14a,14b.

Fig 10. Original Signal (Fs=1000Hz) frequency response. Peaks at 0.1,0.2, 0.3, 0.4 etc.

Fig 14a. PSD of the downsampled signal. Noise at 0.5Hz, 50Hz and 100Hz.

Fig 11. Down sampled signal (Fs=250Hz) frequency response Peaks at 0.4, 0.8.

Fig 12. Signal Passed through 2 Notch filter and LPF filter. Freq. resp. Notch at 0.4 and 0.8

Fig 14b. PSD of the filtered signal. BLF and PLI removed.

Fig 13. Filtered signal passed through HPF for BLF removal.

Clearly, the spectrum density at normalized frequency at 0.4 and 0.8 (PLI) and frequency content less than 0.004 (0.5Hz BLF) are smoothened. A sharp dip at frequencies above 0.84 (105Hz) is due to Low pass filter which removed unnecessary high frequency content, which automatically removed the most prominent (3rd harmonic at 150Hz) PLI harmonic. For a heart rate of 40bpm, the RR cycle () is 1.5s and the first harmonic has a frequency of (1/1.5) 0.67Hz. The remaining harmonics have frequencies that are integer multiples of this fundamental frequency (in this case, the second harmonic 0 . 6 7 2 = 1 . 3 4Hz, the third harmonic 0 . 6 7 3 = 2 . 0 1Hz, etc.). According to this and assuming that physiological heart rates are normally above 40bpm, no biological components or signals attributable to an ECG will

6 exist below 0.67Hz. So cutoff of 0.5Hz is chosen to be correct. IV. RESULTS frequency of the filter used (Figure 2). Attenuations or phase shifts are produced from the cut-off frequency up to approximately 10 times this value. In our case, the attenuation caused by high-pass filtering with 0.5Hz is minimal and only affects the first harmonic.

Following is a tabulated (Table 1) data sheet of the specifications been followed for designing the above mentioned filters
TABLE I FILTER DESIGN SPECIFICATIONS-ECG SIGNAL PROCESSING

Symbo l Fs1

Description 1000Hz

Data

Original Sampling Frequency Fs Downsampled Frequency LOW PASS FILTER SPECIFICATIONS Ftype FIR Parks-McClellan Cutoff Frequency

250Hz (Normalized to

217 Order 105Hz (Normalized to 0.84 ) Stopband Frequency 110Hz (Normalized to 0.88 ) Passband ripple 0.001 Stopband ripple 0.001 (-60dB) NOTCH FILTER SPECIFICATIONS (PLI removal) Ftype IIR Notch 2 Cutoff Frequency 1 50Hz (Normalized to 0.4 ) 1 -3dB Cutoff 4Hz (Normalized to 0.0032 ) Cutoff Frequency 2 50Hz (Normalized to 0.4 ) 2 -3dB Cutoff 3Hz (Normalized to 0.0024 ) HIGH PASS FILTER SPECIFICATIONS (BLF removal) Ftype FIR Parks-McClellan 1156 Order Cutoff Frequency 0.5Hz (Normalized to 0.004 ) Stopband Frequency 0.25Hz (Normalized to 0.002 ) Passband ripple 0.1 Stopband ripple 0.02 (-34dB)

Fig 15. Time Plot of the Original Signal

Fig 16. Time Plot of Filtered ECG Signal.

The Passband ripple in High pass filter is sufficiently large as compared to that for Low pass filter, since having a stricter attenuation in Passband for HPF, calls for FIR filter order of 2100. The performance is not satisfactory at the cost of 2100 order FIR filter. Stopband attenuation of the HPF is kept considerably low, since having attenuation of the order of 40dB or -50db, the order of the filter shoots up again to 1900 and the PQ complex of the time plot is disrupted. So, a tradeoff occurs for this critical BLF removal filter. Fig. 15 shows the time plot of the downsampled signal. A zoomed version of the signal is shown in the figure, where the signal mixed with PLI and BLF is prominent. Fig. 16 shows the filtered output signal. Note, with such traded off filtered specifications, the PQ complex is preserved to a major extent. Also, the ST complex is clear High frequency content is removed by the LPF and the intermediate PLI is also removed. All filtration causes attenuation (amplitude response, decrease of sinusoidal wave peak-to-peak amplitude) and/or phase shifts (phase response, phase shifting of the waves) that will affect one or other components according to the cut-off

Fig 17. PQRST of the filtered Signal indicated.

7 V. CONCLUSION With filter order below 1000, the PQ and the ST complex is quite unclear and this poses a serious implication to the interpretation In contrast, if we choose 0.05Hz as cutoff for high-pass filters, it produce phase-shift harmonics up to approximately 0.5Hz, a range where no intrinsic bioelectric signals exist, and, therefore, the shape of the ST segment remains unaffected (the first harmonic of our ECG was found at 0.9Hz). But, eventually, in the system presented in this paper, no sophisticated instruments are used to reject other noises as presented in Introducing section, having a stricter cutoff shoots up the order of the FIR filter to about 2450, which is much more complex, simulation takes sufficiently large time and results are similar to what has been observed in this case (Results has been analyzed with Personal PC screen resolution.).[14] The trade of between the IIR notch and FIR has been discussed with illustrations as in fig. 8a and 8b, which shows with an order of 918 FIR, a bandwidth of about 8-10Hz is being attenuated in the region of 50Hz. IIR notch in that case, shows fine performance with respect to sharp dip in the 50Hz and 100Hz region without affecting much of the important information.

A filter with linear phase is desirable in order to avoid phase distortion that can alter various temporal relationships in the cardiac cycle. The use of IIR filters obviously reduced the number of co-efficients of the filter, but introduces several drawbacks --Difficult to realize in real time --At higher Sampling rates, the application becomes difficult, since the poles moves close to unit circle, resulting in instability. Moreover, Linear Phase Filtering is highly required to preserve the ST Segment of the ECG Signal. [12]. In practice, in case of IIR filters, they are using as forward backward configuration to get a zero phase response and magnitude response equivalent to that of FIR Filters. [13]

VI.

REFERENCES

Fig 18. Power Spectral Density of the filtered signal using IIR Filter.

PSD of the IIR filtered signal is compared with FIR filtered signal (fig. 14b). The lower frequency content is pre-dominant. This IIR has the same passband and stopband attenuation with Elliptic Filter of order 6. 50Hz PLI is still present.

Fig. 19a. PQRST with FIR filter order 1156

Fig. 19b. PQRST with FIR filter order 900

Fig. 19a. PQRST with FIR filter order 750

[1] LabVIEW for ECG Signal Processing-National Instruments. Document Type: Tutorial; Publish Date: Aug 16, 2012 [2] 1L Harika Bommadevara, 2 B. Surya Prasada Rao, 3 P.Rajesh kumar, 4 P.Rajesh Kumar Interference Reduction in ECG using Digital FIR Filters ISSN : 2230-7109(Online) | ISSN : 2230-9543(Print) , India. [3] Ambulance technician study , http://www.ambulancetechnicianstudy.co.uk/ecgbasics.html#.ULsjj4NlWSo [4] LEIF SO RNMO, Lund University, Sweden, PABLO LAGUNA, Zaragoza University, Spain ELECTROCARDIOGRAM (ECG) SIGNAL PROCESSING Wiley Encyclopedia of Biomedical Engineering, Copyright & 2006 John Wiley & Sons, Inc [5] Alan V. Oppenheim, Ronal W. Schafer, John R. Buck, Discrete Time Signal Processing 2nd Edition Pearson Publications. [6] http://en.wikipedia.org/wiki/Parks-McClellan_filter_design_algorithm [7] Biomedical Signal and Image Processing Second Edition By Kayvan Najarian, Robert Splinter. [8] INSTITUTE OF PHYSICS PUBLISHING PHYSIOLOGICAL MEASUREMENT Physiol. Meas. 26 (2005) R155R199 doi:10.1088/09673334/26/5/R01. [9] Dhillon, S.S., Chakrabarti, S, Dept. of Electr. Eng., Indian Inst. of Technol., Kharagpur,India Power line interference removal from electrocardiogram using a simplified lattice based adaptive IIR notch filter IEEE-Explore Digital Library. [10] Mihov, G. , Dept. of Electron. Eng., Tech. Univ. of Sofia, Sofia, Bulgaria Subtraction procedure for removing powerline interference from ECG: Dynamic threshold linearity criterion for interference suppression , IEEE Explore Digital Library. [11] US National Library of Medicine National Institute of Health "Powerline interference detection and suppression in ECG signal processing IEEE Trans Biomed Eng. 2008 Jan;55(1):354-7. [12] S Hargittai, Innomed Medical Inc, Budapest, Hungary Efficient and Fast ECG Baseline Wander Reduction without Distortion of Important Clinical Information [13] Vctor Barbero Romero; Profesor director: David Atienza Alonso; Profesora colaboradora: Nadia Khaled, UC3M, Madrid ECG baseline wander removal and noise suppression analysis in an embedded platform. [14] High-Bandpass Filters in Electrocardiography: Source of Error in the Interpretation of the ST Segment. ISRN Cardiology; Volume 2012 (2012), Article ID 706217, 10 pages; doi:10.5402/2012/706217

Das könnte Ihnen auch gefallen