A hybrid approach to the simultaneous eliminating of power-line interference and associated ringing artifacts in electrocardiograms

Background The second-order, infinite impulse response notch filter is widely used to remove electrical power line noise in electrocardiograms (ECGs). However this filtering process often introduces spurious ringing artifacts in the vicinity of raw signal with sharp transitions. It is challenging to simultaneously remove these two types of noise without losing vital information about cardiac activities. Objective Our objective is to devise a method to remove the power-line interference without introducing artifacts nor losing vital information. To this end we have developed the "hybrid approach" involving two-sided filtration and multi-iterative approximation techniques. The two-sided filtration technique can suppress the interference but some cardiac components are lost. The lost information can be restored using multi-iterative approximation technique. Results For evaluation, four artificial data sets, each including 91 ECGs of different heart rates, were generated by a dynamical model. Four publicly-accessible sets of clinical data (MIT-BIH Arrhythmia, QT, PTB Diagnostic ECG, and T-Wave Alternans Challenge Databases) were also selected. Our new hybrid approach and the existing method were tested with these two types of signal under various pre-determined conditions. In contrast with the existing method, the hybrid approach can provide more than 27.40 dB and 37.77 dB reduction in signal distortion for 95% and 60% of artificial ECGs respectively; it can provide in excess of 11.78 dB and 17.48 dB reduction in distortion for 95% and 60% of these real records respectively. Conclusions Overall, a significant reduction in signal distortion is demonstrated. These test results indicate that the newly proposed approach outperforms the traditional method assessed on both the artificial and clinical ECGs and suggest it could be of practical use for clinicians in the future.

transient response effect of the notch filter, the impulse response of this type filter generally has an oscillatory behavior, which may cause microvolt-level ringing artifacts (RAs, typically ranging between 0 and 40 μV) in the immediate regions of input signal with sharp transitions. Besides, it will cause undesirable attenuation in signal components at frequencies close to the center frequency (50 or 60 Hz). Tolerable signal distortion needs a narrow stopband bandwidth (SBW); however, a narrower SBW results in a longer transient response time (TRT); whilst a longer TRT often incurs more serious RAs. It is an inherent contradiction. When an ECG signal is being processed, the RAs occur in the right side of QRS complexes, and consequently, this implies that many cardiac components are lost in ST-T regions. Serious distortion (signal distortion caused by the SBW itself and the appreciable RAs) may make the ECG signal more difficult to interpret, particularly for the ST-T segment analysis, QT interval estimation, the detection of Ventricular Late Potentials (VLPs) and so on [4][5][6]. Removal of PLI however should be done with utmost stringent efforts not to eliminate or distort the raw signals without introducing artifacts nor losing vital information [7][8][9]. Many sophisticated digital methods have been investigated to cope with either 50 or 60 Hz interference [10][11][12], and they satisfy the requirement for suppression and even elimination of PLI during ECG signals acquisition. However, it is impossible to design an IIR notch filter to remove PLI without causing distortion [13][14][15], and this problem is still unsolved in practice. In this paper we address the challenges to simultaneously remove the PLI and RAs without losing critical cardiac components by developing a new method which we call the "hybrid approach".
Being motivated by early pioneering work on investigating the RAs phenomena caused by the suppression of PLI, in this paper, the hybrid approach comprising twosided filtration and multi-iterative approximation techniques, is proposed to simultaneously minimizing the PLI and associated RAs. In the first instance, the two-sided filtration technique is partitioned into four steps, which are applied to eliminate the PLI, localize the RAs and remove them afterward, whilst handling the boundary effects which are caused by the practical causal filter. To deal with the inherent contradictions, next the multi-iterative approximation technique is accomplished in three steps, which are adopted to sequentially reconstruct the lost cardiac information. A combination may thus prove to be more effective in eliminating these two types of noise. The elaborate scheme of the hybrid approach is stated in Sect. 3.
From the practical viewpoints of industrial and clinical applications, a bio-modeloriented diagnostic signal processing technique should be evaluated on the clinical data that are acquired from numerous subjects, as well as the artificial data that cover a variety of specific pre-determined conditions. Using artificial ECGs has a typical advantage, in that the signal distortion can be precisely calculated, since the ideal signal (i.e., "true" signal) can be reset to any desired case. In this study, the performances of the proposed and existing methods are evaluated in detail with artificial ECGs which are generated by an open-source program [16,17], as well as four wellused, clinical ECG databases. All of these real data are accessible to the public at Physionet [18]. We compared these two methods with respect to signal distortion in the absence and presence of artificial PLs, respectively. We also examined noise reduction in the presence of artificial PLs. Specifically, these data sets are classified into four groups: with and without the addition of artificial electrical PLs under the notch filter with the center frequency of 50 and 60 Hz, respectively. The first two groups that without PLs, are designed for quantitatively investigating the signal distortion. The other two groups, which mixed with the artificial PLs, are chosen for evaluating the distortion in an environment with interference, together with examining the capacities of the newly presented and old methods for removing PLI. The relationship of SBW and TRT of notch filters has not been well delineated, to provide more insight in the next section we also detail the key properties of finite impulse response (FIR) and IIR notch filters, so that their properties can be compared with each other. Additionally, related RAs are quantitatively examined, and the challenges are outlined.

Problem statement
A digital notch filter is a band-stop filter that passes all frequency components except those lying within a narrow range centered on a center frequency f 0 . The magnitude response of an ideal notch filter may be given as below, where ω = 2πf/f s is the normalized digital frequency, ω 0 = 2πf 0 /f s is the normalized center frequency at f 0 . f s is the sampling rate, and f is the specified frequency. In practice, the notch filter has a SBW at f 0 , that is, Δω = 2πΔf/f s . Δω and Δf are normalized and digital SBWs, respectively.

FIR and IIR notch filters
Let H f (z) denote the transfer function of a second-order, FIR notch filter, where γ = cos ω 0 . H f (z) is simple and easy to implement. However, a disadvantage in using this kind filter is that the SBW of H f (z) is relatively large, which could not meet the specifications [19]. In order to be applicable at narrow SBW situations, a H f (z) based second-order, IIR notch filter is then commonly used [3,20], where β 0 = 1/(1 + λ) and λ = tan(Δω/2). We regulate 0 < λ < 1 in this study. Eq. (3.a) can be rearranged as follows, contains two poles (α 1 and α 2 ) inside the unit circle |z| = 1 at z complex plane, where α 1 + α 2 = − a 1 , α 1 ⋅ α 2 = a 2 . The stability and settling time of H i (z) are characterized by these two poles.
Let x[n] and y[n] be the input and output signals at discrete time n, respectively. This filter can be implemented by the following difference equation, where the subscript k refers to the kth-order index of H i (z). By deduction, in essence, Eq. (5.a) can be identified as follows, H i (z) is a stable system, since |a 2 | < 1 and |a 1 | < 1 + a 2 . When H i (z) contains a pair of complex valued poles or a single negative pole, h[k] will cycle back and forth between negative and positive during the transient state [21], which indicates that h[k] is associated with an oscillatory behavior.
Recalling Eq. (5.b), let us consider a finite case, this can be written as, where K is a positive integer. One interpretation of Eq. (7) is that it represents a FIR notch system. Figure 1(a)-(d) display FIR and IIR notch filters calculated by Eqs. (6) and (3.b), respectively. Notably, the higher order K of the filter, the weaker intensity the pass-band ripples and greater the selectivity. Consulting Figure 1(a)-(d), it is clear that this kind FIR filter has the following limitations: (A) The order K is considerably higher than that of an equivalent second-order IIR filter meeting the same requirements. It thus has far more computational complexity. (B) Because of many pass-band ripples, signals that include the information of interest inside the relevant frequency bands will be grossly distorted. This is an issue related to the pseudo-Gibbs phenomena.

Inherent contradictions
The H i (z) is often used for removing PLI. Figure 2(a)-(c) display an input clinical ECG that is corrupted by real PLI, the output of the input signal after passing it to H i (z) and the relevant residue portion, respectively. In Figure 2(b) we see that PLI is well canceled. Ideally, PLI should be eliminated without any undesirable effects to distort the raw signals. Unfortunately, this cannot be achieved completely. RAs can sometimes interfere with the ST-T regions. The H i (z) operates with IIR of oscillation, which probably distorts the input as well as attenuates the amplitude by producing RAs. Consequently, important cardiac components will be lost. In contrast to the ECG signal, RAs are not remarkable. In other words, they may pollute the ST segments (1 to 20 μV) [8], but they are not distinguishable by the naked eye unless the intensity of which is greater than a threshold, such as 1 μV.
Just as in Figure 2(b), it seems as if there were no RAs. However, if we carefully check Figure 2(c) (as indicated by arrows), we find that they still exist. Sharp transitions of signal may generate noticeable and intolerable RAs in the immediate vicinities of these abrupt changes. Figure 2(d)-(f ) is another example, in which we clearly see the spurious effect of RAs: RAs with the amplitude up to 30 μV, as shown in Figure 2(f ). Therefore, the RAs should be carefully removed to prevent the distortion of input signal. The main cause of RAs is due to the abrupt bandstop of H i (z), spectral components that lie within the Δf, as well as those close to f 0 ± Δf/2, will be attenuated; this is the frequency-domain description. In the time domain, the cause of RAs is H i (z) itself: infinite impulse and oscillatory responses.
In order to quantitatively investigate the relationship between abrupt discontinuities of input signal and the corresponded RAs, we begin with the unit impulse signal, which is,  where n 0 is a specific time. For simplifying the mathematics that follows the processing, by definition, δ[n] starts at 0 (n 0 = 0), and goes to ∞. By making δ[n] pass through the system H i (z), and letting y f [n] be the output, ν[n] = δ[n] − y f [n] the difference. The variance of ν[n] is then calculated by,

ð9:aÞ
By deduction (see Appendix B), we relate the σ 2 v and λ, In most practical applications, provided γ 2 + λ 2 − 1 ≤ 0 (i.e., tan(Δω/2) ≤ sin ω 0 , commonly, Δω/2 ≪ ω 0 ), then the pole radius ρ for H i (z) is given by, Referring to Eqs. (9.b) and (10), we come to the overall conclusions: can be loosely interpreted as a linear function of Δf. With Δf increasing, more and more signal components in the stop and pass bands will be modified in both the amplitude ("ripple") and the phase. (ii) Eq. (10) expresses that when Δf → 0, then ρ → 1. In other words, the wider the Δf, the closer the location of poles to the origin in the z plane, meaning the system H i (z) settles more rapidly (also meaning the system has a shorter duration of TRT) [22]. Therefore, it indicates that the duration of RAs tends to decrease as Δf increases. It is an inherent contradiction of notch filters.
To visualize this problem, next we use Eq. (8) to generate a 10-second-length signal that is digitized at 1000 Hz, as shown in Figure 2 with each Δf. We thus obtained 96 outputs. For each output, at a specified Δf, the duration of RAs is defined as the time from impulse to the point w, at which, These key intrinsic properties of H i (z) would be applied in this newly developed approach.
As before, x[n] denotes the input, the number of samples is L and Then we construct a mirror extended signal, We explore two-sided filtration and multi-iterative approximation techniques to eliminate the probable PLI and RAs which are contained in x me [n]. For the various filter parmeters, let y r me n ½ denote outputs of the signal x me [n] after passing it to the systems H i (z), y n me n ½ denote outputs of this new method when applied to x me [n].

Two-sided filtration technique
The design procedure can be summarized as follows: Step 1 -Initialization Given f s and f 0 , at a specified Δf, we use Eq. (3.b) to calculate filter coefficients a 1 , bCons is an integer that is chosen to accommodate different f s . If bCons < 2, letbCons = 2.
Step 2 -Twice notch filtering (i) First notch filter suppressing. We pass the x me [n] to the notch filter, that is the Eq. (5.a) with filter coefficients calculated in the previous step, and get the output y r me n ½ as the system output. Then we can obtain the differential components dy me [n] using the derivative filter followed, where lOrder = 4 • bCons, intrinsic delay of H l0 (z) is (lOrder − 1)/2 samples and the gain is lOrder. For extracting the information of RAs, this low-pass filter is introduced to filter out fluctuations around the input sample and suppress undesirable outliers. Step 4 -Determination of the output Likewise, we construct another sequence ds me [n], which results from the following operation, The use of Eq. (16) makes it possible to distinguish the RAs by means of positive and negative samples of ds me [n]. Due to the same consideration in Step 3, we let ds me [n] be processed by another low-pass filter defined as below, where jOrder = 16 • bCons, the phase delay of H l1 (z) is (jOrder − 1)/2 samples and gain is jOrder, and let js me [n] denote the output. Figure 3(h) shows the first half of js me [n], and we see Figures 3(b) and (c), it is obvious that to each sample at position n: (1) if js me [n] > 0, it represents that it gathers the information of RAs that lie within one arm of QRS complexes (left or right); (2) if js me [n] < 0, it means that it gather the information of RAs that lie within the other arm of QRS complexes (right or left), see Figures 3(b), (c) and (h). Therefore, to each sample, we eliminate RAs based upon the criteria as below, (i) If js me [n] < 0, y n me n ½ ¼ y r me n ½ þ dy 0 me n ½ ; (ii) If js me [n] > 0, y n me n ½ ¼ y r me n Ã ½ þ dy 0 me n Ã ½ ; (iii) If js me [n] = 0 and ls me ½n < ls me ½n*, y n me ½n = y r me ½n + dy 0 me ½n; (iv) Otherwise, y n me n ½ ¼ y r me n Ã ½ þ dy 0 me n Ã ½ : Furthermore, another benefit of criteria (i)-(iv) is avoiding the boundary effect.

Multi-iterative approximation technique
The single implementation of previous technique has two minor drawbacks, both of which are presented in Figure 3 . In fact, it would not be able to distinguish overlapped RAs. However, H i (z) of a small Δf may incur some appreciable parts (greater than 1 μV) overlapped in the middle of adjacent QRS complexes, as shown by the second and forth arrows in Figure 3(i). (2) Another major limitation encountered in using such a practical filter is that the system will attenuate waveforms constituted by high frequencies surrounding f 0 , as we see from positions with first and third arrows in Figure 3(i). As in the former disadvantage, intuitively, we might apply the H i (z) with a larger Δf to overcome this. From Eq (9.b), however, such a filter may cause more attenuation in signal components at frequencies close to f 0 , since the duration of RAs and the amount of lost components are mutually dependent upon each other. A novel method that may overcome the fundamental problems is to repeat the processing of two-sided filtration several times with various Δf; we name it as multiiterative approximation technique. Specifically, it can be partitioned into ternary steps as below, Step I -Denoising with a large reference Δf. In order to make distinctive RAs do not overlap each other, the H i (z) with a large enough Δf should be adapted. Whereas, it does not denote that the larger the Δf, the better the performance. Consulting Eqs. (9.b) and (10) and Figures 2(j), (k), it is clear that duration of RAs tends to decrease drastically as Δf increases at small Δf cases; but it decreases slightly at large Δf cases. Furthermore, σ 2 v is roughly linear with respect to the Δf. Thus, an appropriate compromise should be made to fit the task: an empirical and experimental Δf = 6.0 Hz is employed here. Input x me [n] is depicted in Figure 2(d). Figure 4(b) illustrates the residual part x me n ½ −y n me n ½ , which is obtained at Δf = 6.0 Hz, and Figure 4(f) shows the related PSD spectrum. In the time domain, certain amounts of components of QRS complexes have been obviously lost, as we can see from Figure 4(b). It can likewise be seen in Figure 4(f) that parts of the signal of interest, which are close to f 0 , have been suppressed because of this large Δf in the frequency domain.
Step II -Reconstruction of details with a small target Δf. In Step I, we achieve a short duration of RAs, and thus RAs can be eliminated. However, because of the large SBW Δf, many cardiac components are lost. Thereby, in addition to possible PLs, residual part x me n ½ −y n me n ½ also contains lost components of original signal. In order to extract these useful details, x me n ½ −y n me n ½ is then to be processed by the two-sided filtration technique with a small Δf (Δf < 6.0 Hz). Let x d me n ½ ¼ x me n ½ −y n me n ½ denote the input, y d me n ½ the output.
Step I and Step II are complementary with respect to Eqs (9.b) and (10). To illustrate, Figure 4(c) shows the y d me n ½ at Δf = 2.0 Hz and Figure 4(g) displays the relevant PSD spectrum of y d me n ½ . It can be observed from Figures 4(b), (c), (f ) and (g) that most details have been reconstructed.
Step III -Reconstruction of slight details with the same target Δf. We can see the vicinities indicated by arrows in Figure 4 Although one should aim to fully restore the lost components, it should be noted at this point that the residual coefficients y s me n ½ may still contain a certain amount of cardiac components which fall within this SBW Δf (i.e., [f 0 − Δf/2, f 0 + Δf/2]); consequentially, these components can never be reconstructed due to the so-called "frequency overlap", as we can see from Figure 4(d). It is an inherent weakness of H i (z). Figure 5 shows the flowcharts of the newly proposed algorithm; Figure 5(a) depicts the flowchart of two-sided filtration technique; Figure 5(b) represents the flowchart of multi-iterative approximation technique. Notably, Δf is the only parameter that needs to be specified in this method.

Artificial and clinical ECG data sets
We simulated four artificial ECG data sets with f s of 250, 360, 500 and 1000 Hz, respectively. The generator generates realistic ECGs with user-settable parameters, such as "sampling frequency", "internal sampling frequency" and so on. This generator can be accessed from [16,17]. For this study, we used the generator to simulate 10-secondduration data at "internal sampling frequency" of 2000 Hz (but 720 Hz for ECGs sampled at 360 Hz) with the specified "mean heart rates", and regulated other parameters with default values [17]. To assess the performance of these two methods in an environment with various sharp transitions, to each data set, we simulated ECGs with the "mean heart rates" ranging from 50 to 140 beats per minute (BPM), in increments of 1 BPM. We thus obtained 91 data for each data set. ) were also selected for evaluation [18], see Table 1 for details. All of these data were tested in this study.

Performance metrics
The main power supply is not perfectly stable. In some countries, tolerance of the frequency variation of PLs is 1% [23]. In poor electrical environments, however, the variation may up to 3% [24]. Because the bandwidth of real PLs is varying, in order to assess the performance of this method under different situations, to both clinical and artificial data, we conducted these tests by changing Δf of the H i (z) from 1.0 to 4.0 Hz with an increment of 0.1 Hz, respectively. In addition, to determine the capacity of eliminating PLI, artificial PLs that were simulated by sinusoidal functions (with the amplitude of 0.1 mV) at industrial frequencies (50 and 60 Hz, respectively), were added to the raw data. To each lead, at a specified Δf, different situations can be categorized into four groups: ❶ At f 0 = 50 Hz, implement H i (z) without PLI; ❷ At f 0 = 60 Hz, implement H i (z) without PLI; ❸ At f 0 = 50 Hz, implement H i (z) with the addition of 50 Hz PLI; ➍ At f 0 = 60 Hz, implement H i (z) with the addition of 60 Hz PLI. We evaluated the relative distortion produced by two methods. The old method means the signals were only filtered by the H i (z). To each input signal x[n], we obtained the outputs y r [n] and y n [n] by processing input signal x[n] with the IIR filter, that is Eq. (5.a) and this new method, respectively. We calculated the relevant ratio of percentage root-mean-square difference (rPRD, in units of decibels [dB]), and it is given by, where x n ½ −y r n ½ ð Þ 2 and σ 2 n ¼ ∑ x n ½ −y n n ½ ð Þ 2 . rPRD illustrates, for the new method, how distortion of the input x[n] is quantitatively lessened in comparison with the old method. It is not feasible to access the purely clinical signals, since these real signals might already contain PLs and other broadband noises. We hence let these signals be processed via the new approach first, and let the resulting signals be the inputs x[n] here.
To each data set with a specified group, wherein first, for the results rPRDs calculated from all of the various SBWs, we can figure out a threshold, at which, those results that, in excess of a certain percentage of total rPRDs, are greater than this threshold. Let rPRD| 95% and rPRD| 60% denote the thresholds with percentages of 95% and 60%, respectively. To facilitate comparisons with the old method in examining the capability

Results and discussion
Test results of the artificial and clinical data sets are shown in Figures 6 and 7, respectively; where each histogram illustrates the results of a data set for a specific group. For each artificial data set of a specific group, we have 2821 results calculated by Eq. (19). For a specific group, we have 6510, 2976, 28892 and 204228 results for QTDB, MITDB, TWADB and PTBDB, respectively. Insets, in the last rows of Figures 6 and 7, display the statistical results ( rPRD Δf 50% ) corresponding to the histograms in the first four rows, respectively; for a specific group with varying Δf, each curve is associated to a histogram in the same column. Tables 2 and 3 give the statistical results (rPRD| 95% and rPRD| 60% ) corresponding to the histograms in Figures 6 and 7, respectively. Figure 6(a)-(e) and Figure 7(a)-(e) plot the results using the artificial data set and QTDB (f s = 250 Hz), respectively. To groups ❶ and ❷, as Δf increases, it tends to pro- for both artificial and clinical data sets as a whole. By contrast, to both groups ❸ and ➍, as Δf increases, it tends to produce rPRD Δf 50% with relationships that look like the exponential decay for artificial data sets, while relationships with rPRD Δf 50% decreasing first and then increasing for QTDB data as a whole. With regard to different notch frequencies, the performances are significantly different for both artificial and clinical ECG data sets, as we see from Figures 6(e) and 7(e). From Table 2, to four groups, the minimum rPRD| 95% and rPRD| 60% were 28.82 dB and 38.82 dB for artificial ECGs, respectively. Similarly, in all of four groups, the minimum rPRD| 95% and rPRD| 60% were 15.07 dB and 20.58 dB for QTDB ECGs as shown in Table 3, respectively. It is worth noting that QTDB data was chosen specifically to contain a broad variety of QRS morphologies (i.e., various kinds of abrupt discontinuities) [25]. At this point, the results of QTDB ECGs are relatively more objective in the present study. MITDB includes in excess of 53 leads with abnormal, wide size or low intensity QRS waveforms, which are of low frequency components (i.e., slow transitions or smooth variations). Therefore, this turns out that less distortion results from the old method, since RAs always occur surrounding the notch frequency f 0 , that is the high-frequency end in most ECG spectra. Hence, the performance of the new method is not very good for MITDB data, as illustrated in Figure 7(j). Likewise, with respect to the different notch frequencies, the performances differ markedly for both artificial and clinical ECG data sets, as we can see from Figures 6(j) and 7(j). However, for the same notch frequency (50 or 60 Hz, respectively), the performances are not significantly different for MITDB data without or with the addition of artificial PLs. Of these statistical results, as displayed in Tables 2 and 3, for four groups, the minimum rPRD| 95% and rPRD| 60% were 28.91 dB and 38.75 dB for artificial ECGs, respectively; for the QTDB recordings with four groups, the minimum rPRD| 95% and rPRD| 60% were 11.78 dB and 17.48 dB, respectively. The statistical results of artificial data set and TWADB (f s = 500 Hz) are shown in Figures 6(k)-(p) and 7(k)-(p), respectively. In terms of artificial ECG data with four groups, as Δf increases, they exhibit consistent tendencies with these of artificial ECGs sampled at 250 and 360 Hz. However, for the TWADB data with four groups, as Δf increases, the performances depict no significant consistency as those of QTDB and MITDB, since the rPRD are divergent at sides of low and large SBWs, while relatively convergent in the middle of SBWs. In addition, for the QTDB and MITDB data sets, results with high probabilities lie in low sides of SBWs (i.e., less than 22 dB), but for the TWADB data the results of high probabilities lie within high sides (i.e., greater   than 30 dB). In Tables 2 and 3, for the four groups, we see that the minimum rPRD| 95% and rPRD| 60% were 27.88 dB and 38.60 dB, 14.66 dB and 24.86 dB, for artificial and TWADB data sets, respectively. Furthermore, from Figures 6(e), (j), (p) and Table 3, for this clinical data set, the performance of the new method is better than that of the QTDB and MITDB data sets as a whole.  It can be clearly seen from Figures 6(q)-(u) and 7(q)-(u) that, for the artificial data set and PTBDB (f s = 1000 Hz), respectively, the results of the artificial ECGs reveal no significant difference compared with three earlier used artificial data sets. However, the clinical ECGs have significant differences in the histograms as well as the rPRD Δf 50% relations to these of three previous clinical ECGs. As far as the histograms of the four groups are concerned, they exhibit Gaussian probability distributions, since a huge number of results was obtained (a total of 204228 results) for each group, as shown in Figure 7(q)-(t). In terms of rPRD Δf 50% relations, as shown in Figure 7(u), four curves show tendencies toward convergence as Δf increases. Again from Tables 2 and 3, the minimum rPRD| 95% and rPRD| 60% were 27.40 dB and 37.77 dB for artificial ECGs of four groups, respectively; and for the PTBDB recordings, the minimum rPRD| 95% and rPRD| 60% were 14.67 dB and 23.85 dB, respectively. Generally, for the artificial ECGs of a specific group, differences of results which were obtained from different data sets, show no special significance, since the only differences of each data set are the sampling rates f s and the duration L. Regarding the four clinical ECG data sets (each including four groups), however, they showed obviously different performances, since these data sets were obtained from various subjects and with different emphases. In particular, the MITDB recordings, comprising many and a broad variety of wide size QRS complexes, show relatively poor performance. From all the results of artificial and clinical ECGs sampled at each f s , we can find that the performance exhibited by the artificial data set is significantly better than that of the relevant clinical data set. The reason is that the clinical ECGs may contain many low frequency leads. In summary, all of these test results indicate that the proposed method has the capacity to well reduce the PLI, and simultaneously, greatly minimize the RAs for both artificial and clinical ECGs.

Benefits and limitations
As previously mentioned, we always want the SBW of a notch filter to be very narrow for suppressing PLI. The FIR notch filter, which is defined by Eq. (7), does not encounter the "infinite impulse" problem, but it requires a large degree K to meet the specification, and this often comes at the cost of high computational complexity. Additionally, another problem with the FIR notch filter is that it may still produce RAs since it is oscillatory in the range of the "finite response", because K is a large number. In contrast, our hybrid approach provides primary benefits in eliminating specific interferences. It is not limited to reducing fixed fundamental PLI (50 or 60 Hz) but also applicable to removing the high-frequency harmonics for some worse cases, since the f 0 can be tailored to any desired frequency in this approach. Thus far, all of our discussions are based upon the tan(Δω/2) ≤ sin ω 0 . In certain applications, however, some rare cases may still exist where tan(Δω/2) > sin ω 0 , especially those ECG monitor systems with low sampling rates f s . In general, such situations occur at f s = 2f 0 + δ f and 0 ≤ δ f ≪ f s . By Eq. (4), consider the following two possible cases, (i) γ = − 1 That is, f 0 = f s /2. According to Eq. (3.a), H i (z) represents a first-order, IIR notch filter that has only one pole α inside the unit circle, for this case, Likewise, for the input δ[n], we can obtain the output variance, Eqs. (20) and (21) demonstrate similar forms with Eqs. (10) and (9.b), respectively; it implies that the hybrid approach is also applicable. However, real PLs own a frequency bandwidth, the counterparts of PLs that lie within the right side of f 0 will pollute valuable information of low frequencies. It is a limitation not caused by the method but f s itself. Therefore, we recommend δ f ≥ 4.0 Hz for practical application based upon the current study and literature [23,24]. (ii) − 1 < γ < 0 and γ 2 + λ 2 − 1 > 0 That is, |α 1 | ≠ |α 2 |. This yields (see Appendix C), Max α 1 j j; α 2 j j ð Þ¼ γ j j⋅ 1 þ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 1−γ −2 þ γ −2 λ 2 q 1 þ λ ; α 1 < 0; α 2 < 0; Max α 1 j j; α 2 j j ð Þ ∝Δf ð Þ Max(|α 1 |, |α 2 |) denotes the larger one of |α 1 | and |α 2 |. For |α 1 | ≠ |α 2 |, the settling time of H i (z) is mainly determined by Max(|α 1 |, |α 2 |) [22]. Within this situation, using the H i (z) of a larger Δf would not be able to achieve shorter durations of RAs but with more cardiac components lost. The "larger" reference Δf is then set to the specified target Δf in Step I to meet the uniformity within the approach. Thus, it is worth emphasizing that more precautions should be taken when Δf is adjusted to avoiding overlapping RAs in the middle of adjacent QRS complexes. Indeed, it is essential to remember this limitation as well, since Eq. (10) is not universal but with conditions.

Conclusions
Instead of frequency response, specifications of second-order, IIR notch filter may be given in terms of the impulse response. In this study, we started with the impulse response of H i (z), the output σ 2 v and the settling time that, concerning its behaviour in the time domain, have been quantitatively investigated. Minimizing the RAs involved in the signal of sharp transitions by removing PLI is a great concern in the processing of biopotential signal. The detection and analysis of the VLPs in the ECG signal is highly sensitive to the residual PLI and the RAs after the QRS complexes as a result of the filtering technique applied. The artifacts may become considerable in cases of high and steep complexes. Owing to the intrinsic properties of H i (z), we proposed a hybrid approach, which utilizes H i (z), to reliably suppress PLI as well as to aviod the generation of RAs. It is applicable to different f s and easy to implement. In fact, Δf is the only parameter that needs to be specified for this approach. Problems are greatly mitigated via these techniques. Sufficient results and performance statistics are provided to validate the reliability of this method in the test environment with a variety of conditions (e.g., artificial and clinical ECGs, of various f s , with altering Δf, etc.). An eventual consideration related to practice is f 0 of PLs. To the artificial PLs used in this study, f 0 was set to 50 or 60 Hz without varying. However, f 0 of real PLs, similar to its bandwidth, may fluctuate over a small range. Even so, we can refer to many previous studies for how to adaptive tracking of the f 0 with serious drift.