© 2021 Mili Publications
2010 Mathematics Subject Classification: 68T05, 68T07. Keywords: breast cancer classification; transfer learning.
POWERLINE INTERFERENCE REMOVAL TECHNIQUE
USING DIGITAL NOTCH FILTER IN ECG
JAGDEEP RAHUL and MARPE SORA
Department of Electronics and Communication Engineering Rajiv Gandhi University, India-791112
E-mail: [email protected]
Abstract
ECG signal analysis plays a vital role in the diagnosis of heart abnormities. The presence of noise can change the primitive characteristics of the ECG signal. The ECG signal gets affected by the powerline interference noise (PLI) during the time of signal acquisition. In this paper, digital quality factor (Q) varying notch IIR filter with a zero-phase filtering technique is proposed to remove the power line interference in the ECG signal. The correlation factor is estimated for its validation between the filtered ECG and raw ECG signal. The quality factor of digital IIR notch filter is tuned to achieve a better correlation coefficient and signal to noise ratio (SNR) of filtered ECG signal. The highest correlation factor unity is achieved at the quality factor of 1. The proposed technique is also tested and validated on the MIT-BIH database.
1. Introduction
ECG represents the electrical activity of the heart, shown in figure 1. A single cycle ECG represents the atrial and ventricle depolarization/repolarization successively, which occurs in every heartbeat [1]. The ECG is recorded from the surface of the skin using an electrode placed over it. The ECG is recorded for the purpose of detecting different types of abnormalities present in the heart [10]. The ECG is a non-invasive and most widely used technique for the diagnosis of heart diseases [2]. The ECG can be recorded in resting, moving and stress state situation. But for a better quality of the ECG signal, it is recorded, when the subject is in a resting state with the supine condition [3]. In other situations like moving condition is recorded, when the subject performs the daily activities. In
resting state ECG recording gives better signal quality, which can be further used for detecting the arrhythmias [4].
The main issue in recording of the ECG is the addition of powerline interference (PLI) noise in the ECG signal [5]. Generally, the noise present in the ECG signal is due to powerline interference (PLI), whose frequency maybe 50 Hz or 60Hz depending upon the frequency of the power supply of the country [6]. Many methods have been proposed to denoise and enhance ECG signal quality and preserve its main characteristics. Most of the noise reduction techniques are based on digital filters, adaptive filtering, filter banks and wavelet transform [7]. Digital filter in signal processing systems introduces the transient state response at the initial response of the system, which introduces the delay at the output. The transient response time depends on the order of the filter, cutoff frequency and magnitude response of the filter. Generally, notch filters are suitable for reducing the power line interference at 50 Hz or 60Hz frequency. Notch filter provides unity gain at all frequencies except at notch frequency [6].
Notch filters are generally used to reject a particular frequency and accept the others. Notch filters are designed in such a way that, to attenuate the signal at a particular frequency and transmits the other frequencies with minimal losses. The designing of the notch filter may be a difficult task when a narrow band frequency needs to be suppressed, and immediate vicinity frequency needs to be maintained [8]. Generally, IIR filters are unstable, gives nonlinear phase response as compared to the FIR filters. But FIR filters are more stable and provide a linear phase response [9]. Typically a higher-order FIR filter is required to achieve the better amplitude specifications. The higher order filter introduces more delay, which is not suitable for most of the real-time signal analysis.
Many applications require the notch filter that can simultaneously process the magnitude response as well as the transient response for the short duration. Both magnitude response and transient response are contradictory to each other and difficult to tune simultaneously. The IIR notch filter can easily remove the PLI but introduces the delay in the ECG signal after passing through it. The introduced delay in the ECG may alter the characteristics of the signal [10-11]. The change in the characteristics of the ECG signal may lead to the wrong interpretation of the heart
abnormalities.
Figure 1. Single-cycle ECG signal [2].
In this work, a second-order Q-varying notch IIR filter with a zero-phase filtering technique is presented for powerline interference noise cancellation. The variation of quality factor Q in the IIR filter was proposed in the earlier work, but that introduces the delay in the process. In this technique, a zero-phase filtering technique will be combined with the notch filter to neglect the phase delay effect introduced by the IIR filter. First of all, a second-order IIR digital filter is designed with suitable quality factor for 50Hz frequency PLI noise removal. Then zero filtering techniques are combined with the notch filter to neglect the delay effect in ECG signal [8]. Here we have considered the standard ECG and a PLI noise at 50Hz frequency to verify the proposed technique performance. Finally, it is also validated on the MIT-BIH database.
2. Methodology
In this section, the method for digital Q varying notch filter for powerline interference noise removal is proposed. The proposed technique designed to remove powerline interference noise at 50Hz frequency. This technique consists of the second-order IIR notch filter with varying Q, zero-phase filtering technique, and calculation of cross correlation coefficient and signal to noise ratio (SNR) for validation of this technique
A. Standard ECG signal with Powerline Interference
The Standard ECG signal is generated from physionet, where we can tune the ECG components such as heartbeat, sampling frequency, and duration of all waves, which is shown in figure 2. The powerline interference (PLI) noise of 50 Hz frequency is generated and added to a standard ECG signal. The PLI noise at 50Hz frequency considered for this study assumed
that it is generated during the time of ECG recording. The contaminated ECG after addition of noises is shown in figure 3.
Figure 2. Standard ECG signal.
Figure 3. Standard ECG signal with power line interference noise (PLI) of 50
Hz frequency.
B. Notch Filters
The response of an ideal digital IIR notch filter at notch frequency, presented in equation (1).
, , 1 , 0 0 for for e H jw (1) Where s f f 2 is the normalized digital frequency and 0 is the digital centre notch frequency concerning the sampling frequency fs. Hence, the digital frequency and bandwidth can be determined in the following form and shown in equation (2). , 2 2 0 0 s s f f f f (2)
where f and f0 are the bandwidth (BW) and analog notch frequency of notch filter, respectively. The BW is the ratio of centre frequency and quality factor Q, shown in equation (3).
. 0 Q f f (3)
Many methods have been developed by the researcher to design the IIR notch filter. The simplest and useful way to design the notch filter is poles and zero placement methods. The poles and zero location of filter determine the characteristics of the filter and design procedure is based on the representation of transfer function in equation (4).
0
0
0 0 ff jf re z re z re z e z z H where z ej. (4)The transfer function of 2nd order IIR notch filter can be simplified and written in equation (5).
2 cos
. 1 cos 2 2 0 2 0 2 r z r z z z z H (5)C. Zero-phase Filtering Technique
A zero-phase filter is a non-causal particular case of linear phase filter, which has the zero phase slope. The impulse response of the zero-phase filter is even symmetric. The zero phase filter neither introduce any phase distortion nor any time delay in the signal. It uses time reversal property of DTFT to forward and then backwards the data in the time domain [9]. The zero phase filtering technique equation shown in (6) and block diagram shown below in Figure 4.
Figure 4. Block diagram of the zero-phase filtering technique.
Where X
n is the input signal, and Y
n is the output signal. Time reversal property of DTFTIf
n DTFT
Xejw
The zero phase filter first forward the data and then backwards the data in the time domain to neglect the effect of delay in the signal. This technique can not apply for real-time application because it requires the entire input data sequence for processing.
D. Correlation Factor and Signal to Noise Ratio (SNR)
The correlation factor is estimated after removal of PLI noise from the standard ECG. The correlation factor shows the match between two functions relative to the displacement. The factor (k) is shown in equation (7).
n w2
w2
n w2
w2
Y w wY n k (7)Where W is input ECG and Y is output ECG after eliminating of PLI noise. The correlation factor ranges from 0 to 1.
The Signal-to-Noise Ratio (SNR) determines the signal strength relative to the noise present in the signal. A higher value of SNR represents the better quality of the signal. It is generally measured in decibels (dB). Improved SNR after removal of noise from the ECG signal leads to better beat detection with reasonable accuracy.
3. Results and Discussion
The noisy ECG signal is generated by adding the standard ECG signal with a sinusoidal signal of 50 Hz frequency. The second-order digital IIR notch filter is used to remove the PLI noise of 50Hz frequency. The notch filters are designed in such a way that they reject the signal at a particular frequency and pass the rest. The quality factor Q, plays a significant role in developing the filter. The suitable selection of Q in the filter determines the transient phase response of the filter. The zero phase delay technique has been used in this filter to eliminate the delay introduced by the IIR Notch filter. First of all, the noisy ECG signal is passed through the second-order IIR notch filter to remove the PLI noise at 50 Hz frequency. Then the phase delay of the signal is removed by using a zero-phase filtering technique. For validation of this technique, the correlation coefficient is calculated between the standard ECG signal and the filtered ECG signal. In this technique, correlation coefficients are computed for suitable Q value, and parameter SNR is also calculated for further validation of this technique.
In this study, we have considered standard second-order IIR notch filter, which introduces the delay in ECG but the output of zero-phase filter overcome the delay issue in the signal. In addition to the graphical results, the correlation coefficients and SNR of output ECG signal are calculated for varying quality factor Q, from 1 to 4 for IIR notch filter. The quality factor Q for this analysis is varying with interval of 0.5.
Table 1. Performance of the implemented technique evaluated on the basis of
correlation coefficients and SNR.
S. No. Quality factor(Q) Correlation Coefficient Signal to Noise Ratio(SNR)(dB) 1 1.0 0.9999 30.642 2 1.5 1.0000 30.687 3 2.0 1.0000 30.702 4 2.5 1.0000 30.708 5 3.0 1.0000 30.712 6 3.5 0.9999 30.714 7 4.0 0.9999 30.716
Table 1 shows that the IIR notch filter with Q ranging from 1.5 to 3.0 shows the best results in terms of correlation coefficients, but SNR is not remaining constant. This is due to the presence of a transient response in the ECG signal. The quality factor 3 is giving good SNR and the best correlation coefficient in this study. This technique is also applied on MIT-BIH arrhythmia database, which contains the power line interference noise at 60Hz frequency for further validity.
Figure 4. MIT-BIH arrhythmia database, ECG signal record 100m and
filtered ECG signal.
The proposed method is applied on MIT-BIH arrhythmia database for validation and gives the results in acceptable range. Figure 4 shows the filtered output response of ECG record 100m of arrhythmia database.
4. Conclusion
The power line interference noise degrades the quality of the ECG signal. It also creates the problem in feature extraction of the ECG signal. The removal of power line interference noise in the ECG signal becomes very crucial in the preprocessing stage of the ECG signal. In this paper, 2nd order IIR filter is used with zero phase filtering technique. The filtered ECG signal is obtained after filtering the ECG at 50 Hz frequency. The Q of the notch filter is also tuned from the 1 to 4 to achieve better results. Further, to validate this method. The correlation coefficient is calculated between the standard ECG signal and the filtered ECG signal. It is also tested on MIT-BIH arrhythmia database. The simulated result shows that the proposed method can effectively remove the power line interference noise at both 50Hz and 60Hz frequency without degrading the quality of the ECG signal.
References
[1] J. Rahul, M. Sora and L. D. Sharma, An overview on Biomedical signal analysis, International Journal of Recent Technology and Engineering 7(5) (2019), 206-209.
[2] M. A. Manlong, J. Rahul and M. Sora, ST Segment Analysis for Early Detection of Myocardial Infarction, International Journal of Computer Sciences and Engineering 6(6) (2018), 1500-1504.
[3] Piskorowski, Powerline interference removal from ECG signal using notch filter with non-zero initial conditions, in IEEE International Symposium on Medical Measurements and Applications Proceedings (MeMeA), 2012, Budapest, pp. 1-3.
[4] Rahul, Jagdeep and Marpe Soram, A novel adaptive window based technique for T wave detection and delineation in the ECG, Bio-Algorithms and Med-Systems 16.1, 20190064. https://doi.org/10.1515/bams-2019-0064 Web.
[5] J. Rahul, M. Sora and L. Sharma, Baseline correction of ECG using regression estimation method, 2019 4th International Conference on Internet of Things: Smart
Innovation and Usages (IoT-SIU), Ghaziabad, India, 2019, pp. 1-5.
[6] J. Piskorowski, Digital Q-varying notch IIR filter with transient suppression, IEEE Trans. Instrum. Meas. 59(4) (2010), 866-872.
[7] O. Sayadi and M. B. Shamsollahi, Multi adaptive bionic wavelet transform: application to ECG denoising and baseline wandering reduction, J. Adv. Signal Process 11 (2007). [8] C. -C. Tseng and P. Soo-chang, Stable IIR notch filter design with optimal pole
placement, IEEE Transactions on Signal Processing 49(11) (2001), 2673-2681.
[9] T. I. Laakso, J. Ranta and S. J. Ovaska, Design and implementation of efficient IIR notch filters with quantization error feedback, IEEE Trans. Instrum. Meas. 43(3) (1994), 449-456.
[10] F. Gustafsson, Determining the initial states in forward-backward filtering, IEEE Transactions on Signal Processing 44 (1996), 988-992.
[11] Rahul, Jagdeep, Marpe Sora and Lakhan Dev Sharma, Exploratory data analysis based efficient QRS-complex detection technique with minimal computational load, Physical and Engineering Sciences in Medicine (2020), 1-19.