Cancelling Harmonic Power Line Interference in Biopotentials Cancelling Harmonic Power Line Interference in Biopotentials

Biopotential signals, like the electrocardiogram (ECG), electroencephalogram (EEG), electromyogram (EMG), and so on, contain vital information about the health state of human body. The morphology and time/frequency parameters of the biopotentials are of interest when diagnostic information is extracted and analyzed. The powerline interference (PLI), with the fundamental PLI component of 50 Hz/60 Hz and its harmonics, is one of the most disturbing noise sources in biopotential recordings that hampers the analysis of the electrical signals generated by the human body. The aim of this chapter is to review the existing methods to eliminate harmonics PLI from biopotential signals and to analyze the distortion introduced by some of the most basic approaches for PLI cancelation and whether this distortion affects the diagnostic performance in biopotentials investigations.


Introduction
At the cellular level, the movement of ions like K + , Na + , Ca 2+ and Cl À determines the presence of biopotentials at the level of the cellular membrane. When a stimulus arrives on the membrane, an action potential is generated and is transmitted to the neighboring cells, spreading within the entire tissue or just within some parts of the tissue, depending on the presence of inhibitory channels. At the macroscopic level, the sums of all the action potentials generate a biopotential. By placing electrodes on the human body, in specific configurations, a projection of the investigated biopotentials on the measurement direction may be recorded. Basically, every human body tissue has associated an electromagnetic field, which can be theoretically measured. However, usually the biopotentials have a very low power (amplitude of μV), thus just a few can be recorded: the electrical activity generated by the cardiac tissue, the electrocardiogram (ECG), by the brain, the electroencephalogram (EEG), by the skeletal muscles, the electromyogram (EMG), by the uterus, electrohysterogram (EHG), by the retina, the electroretinogram (ERG), by the stomach muscles, the electrogastrogram (EGG), by the fetal cardiac tissue, the fetal electrocardiogram (fECG), and so on. All these signals contain diagnostic information about the health status of the source tissue, which can be extracted by applying different signal processing methods.
Nevertheless, the raw signals recorded after the measurement cannot be used directly to evaluate the health status of the source tissue because it contains also noise, which in most of the cases hampers the extraction of diagnostic information. The disturbing biopotentials (e.g., when the fECG analysis is of interest, the mECG, which is also recorded, represents a noise source and has to be eliminated) or other noise sources like electronic noise (thermal noise, shot noise, flicker noise) and power line interference have to be canceled/diminished. The latter is one of the most common types of noise in biopotential recordings, and its efficient cancelation is still an open question in biomedical signal processing. Therefore, the optimal elimination of the noise sources is critical since any residual or disturbance introduced by the cancelation method can impair the diagnostic information and could lead to a wrong diagnostic.
Thus, in this chapter, a review of the principal methods for removing PLI from biopotentials is introduced. Also, a case study reveals the influence on the diagnostic parameters of the most common PLI cancelation methods applied in ECG analysis. The chapter has the following sections: • Sources of the PLI and its harmonics-this section presents the most common sources of the PLI and the ways it usually interferes with biopotential measurements.
• Methods for canceling PLI and its harmonics-this section includes a review of the recent methods for PLI removal from biopotentials.
• The influence of bandstop filters on the diagnostic parameters of the ECG signals-this section describes the morphological parameters of the ECG signal which are used to make a diagnostic, the filters used, the data considered and the results obtained.

Sources of the PLI and its harmonics
The PLI is generated by the alternative 50/60 Hz sinusoidal current from the power grid. However, the PLI has also hamonics due to the fact that the PLI is in most of the cases non-sinusoidal. This is caused usually by the so-called "non-linear" loads connected to the power grid.
A load which draws a proportional current with the applied voltage is considered to be linear (e.g., loads that are purely resistive or that are simple combinations of pure resistance, inductance or capacitance). They do not change the shape of the waveform current but may change the phase between the current and the applied voltage.
On the other hand, nonlinear loads draw non-sinusoidal current even when sinusoidal voltage is applied ( Figure 1). Thus, nonlinear loads change the shape of the current waveform from a sine wave to some other form and create harmonic currents in addition to the original (fundamental frequency) AC current. In turn, these harmonic currents will cause harmonic voltages to be generated. According to the IEEE 519-2014, the harmonic is a sinusoidal component of a periodic wave or quantity having a frequency that is an integral multiple of the fundamental frequency or a component of order greater than one of the Fourier series of a periodic quantity [1].
The main nonlinear loads consist of the static power converters (rectifiers, Figure 2) that are used in switch-mode power supplies, uninterruptable power supplies, and so on. Thus, fluorescent lamps, medical devices, personal computers, induction motors, and so on represent nonlinear loads connected to the power grid and sources of harmonics [2,3].
Moreover, it seems that some harmonics have a greater impact than others. For example, the third harmonic is probably the most challenging one in terms of neutral conductor loading within a three-phase system (the most common method used by electric power distribution grids worldwide to distribute power). However, other harmonics currents cancel each other out in the neutral point (like normal 50 Hz load current), third harmonics are in phase with each other, and the summing in the neutral conductor significantly increases the current [4].
There are different ways in which the PLI interferes with the biopotential recordings [5]: • Magnetic induction: the cables used for biopotential recordings can form a loop, and if a variable magnetic field is present, then a potential will be induced in the leads which is proportional with the area and orientation of the loop, and the magnitude of the magnetic field.
• Displacement current into recording leads: by capacitive coupling between the AC power line and the leads, a current is induced in the recording leads, which is called displacement current. The latter disturbs the recording just if the impedances of the electrode-skin interfaces are different, because in this case, the "potential divider effect" appears, that is, common mode interference is converted into differential mode interference voltage which  is amplified. In this case, not even an instrumentation amplifier with infinitely high common mode rejection ratio (CMRR) will make any difference.
• Displacement current into the body: because of parasitic capacities, the body is capacitive coupled with the AC power lines. The displacement current travels through the body to the ground and because the body has impedance, a voltage drop will appear. Hence at different locations on the body, the induced potential is at slightly different values which in turn are amplified by the instrumentation amplifier.
In Figure 3, a schematic representation of the way the displacement currents are induced in the measurement setup is illustrated.
Empirical solutions can be applied in order to reduce the amount of PLI and its harmonics present in the biopotential measurements: twisting the recording leads will reduce the area between them, and thus the induced current from the variable magnetic field is much smaller; the preparation of the skin before attaching the electrode is going to reduce and balance the electrode-skin impedance so that the difference between the two impedances is as small as possible; movement of the ground electrode, and so on.
However, in spite of all the precautions taken before measuring, the PLI is still going to interfere with the recorded biopotentials. Nevertheless, because most of the biopotentials have low power, any PLI disturbance, even if much attenuated by different approaches, will impair the analysis of the diagnostic information.   In Figure 4, a real measurement of biopotentials recorded on the abdomen of a pregnant woman is depicted. By visual inspection, it can be observed that only the PLI and its harmonics are visible.

PLI and harmonic cancelation methods
The main problem when considering removing the PLI is that the frequency bandwidths of the biopotentials include the 50/60 Hz fundamental frequency and also the third harmonic ( Figure 5). Thus, the method for PLI cancelation should ideally not remove useful information too.
There are many approaches for removing PLI and harmonics from biopotential measurements. The most common hardware solutions mainly consist of implementing hardware notch filters [6]. Another common hardware approach is the right leg driven (DLR) circuit [7], which is used to reduce the common mode interferences. A recent paper proposes a new version of the classical DLR circuit, reporting an improvement of 30 dB in reducing the PLI [8]. However, recent studies suggest that this approach can increase actually, in some situations, the interference [9].
In Table 1, a selection of recent contributions in PLI removing from biopotentials is introduced.
Loss of information can appear when the methods for PLI cancelation are applied. Thus, methods for information retrieval are also implemented. In [11], the authors apply the EMD  Tomasini et al. [19] 2016 ECG, EMG A wearable platform is described for biopotential acquisition with no PLI noise. The hardware platform is evaluated using digital notch filters, subtraction approach, sinusoidal modeling approach and adaptive filters [20]. in order to decompose the ECG signal into intrinsic mode functions (IMFs). Then the IMFs that contain the PLI signal are discarded, and the signal is reconstructed. However, the ECG information is not isolated in one IMF and its high-frequency components, that is, the QRS complex can be present in the discarded IMFs. An approach to recover some lost information consists of identifying the IMFs that contain QRS complexes and the QRS complexes boundaries. Next, a Tukey window centered on the R peaks is applied which offers a flat gain for the R wave. Thus, the information of the QRS complex is preserved.

Time-varying pole radius multiple notch filters Authors
Year Biopotentials Observations respectively). However, it is not working when the PLI has time varying fundamental frequency [10] c. EMD Pal et al. [11] 2012 ECG The PLI is extracted from ECG recordings based on the fact that high-frequency components are isolated in the first obtained Intrinsec Mode Functions (IMF). Cumulative mean and the power of the IMFs are used to decide which IMFs component contains PLI. However, when the PLI has similar power as the signal of interest, the robustness of the method decreases.

d. Hybrid methods
Suchetha et al. [22] 2013 ECG Proposes an adaptive filter and subtraction scheme both based on EMD. The performance is evaluated on synthetic ECG signals and various noise levels (from 5 to 30%). The direct subtraction method based on EMD shows the best results Taralunga et al. [23] 2015 fECG An adaptive filter based on HHT is proposed. The internal generated PLI reference is obtained using the Hilbert Transform to identify the IMFs, obtained with EMD, which contains the PLI and its harmonics. This internal generated PLI reference is further used in the LMS adaptive filter. The method is evaluated on fECG signals contaminated with different PLI levels. It is also considered the scenario when the fundamental frequency is not fixed. High performance is reported in all scenario considered, preserving the morphology of the fECG Jenkal et al. [24] 2016 ECG The algorithm consists of three steps: first the signal is the decomposition with the Discrete Wavelet Transform (DWT); next an adaptive dual threshold filter (ADTF) is applied and finally a peak correction is applied for the ECG signal in order to compensate for possible information loss during the PLI removal. The performance is evaluated on a real ECG signal, which is contaminated with synthetic PLI Warmerdam et al. [25] 2016 ECG A fixed-lag Kalman smoother with adaptive noise estimation is proposed. The performance of the algorithm is analyzed on simulated and real signals and compared with the performance obtained by a fixed-bandwidth notch filter and some adaptive filters. A better SNR and transient time are reported Mateo et al. [26] 2015 ECG, EEG The authors introduce a radial basis function Wiener hybrid filter for removing the PLI from ECG and EEG recordings. Real signal is used, recorded from 100 subjects (adults and children). The PLI signal was simulated with a 50 Hz sinusoidal with the fundamental frequency varying from 48.5 Hz to 51.5 Hz. The proposed method outperforms the classical Wiener filter Table 1. Contributions in the field of PLI removing from biopotentials in the last 5 years.

Case study: the influence of fixed-bandwidth notch filters on the diagnostic information in ECG signals
In this section, the most basic, simplest and common approaches for PLI and its harmonics removal from ECG recordings is evaluated. Mainly, the loss of diagnostic information in the process of PLI removal is analyzed. In order to achieve this objective, four types of traditional fixed frequency band stop filters and a time-varying pole radius multiple notch IIR filter [12] are implemented in MATLAB and tested on a real ECG database.

Diagnostic information in ECG signals
The ECG signal is generated by the electrical activity of the cardiac tissue. It reflects differences in transmembrane voltages in myocardial cells that occur during depolarization and repolarization within each cardiac cycle [26]. By placing a specific electrode configuration on the human body, a projection of this electrical activity on the measurement lead can be recorded. The electrode configuration can be both bipolar (the three bipolar Einthoven derivations) and unipolar (the three augmented derivations and the six precordial ones).
The ECG signal is depicted in Figure 6 and mainly consists of five waves: P wave, Q wave, R wave, S wave and T wave and U wave. The P wave corresponds to the electrical depolarization of the atrial cardiac tissue. The ventricular contraction generates the QRS and the electrical repolarization of the ventricular tissue generates the T wave. The U wave most likely represents an electric-mechanical phenomenon that occurs after repolarization is completed [27]. In Figure 6. The waveforms, interval and segments of the ECG signal.
Cancelling Harmonic Power Line Interference in Biopotentials http://dx.doi.org/10.5772/intechopen.74579 Figure 6, also the parameters of the ECG signal can be observed: the intervals (PR, QT, ST) and the segments (PR, ST).
The amplitude and the morphology of the ECG waves, segments and intervals represent the basic diagnostic information. Based on the analysis of these parameters, the health status of the heart can be investigated.
In Table 2, a small selection of abnormal electrical behavior of the heart and the influence of the ECG parameters is presented.
Thus, width, duration and amplitude measurements of the ECG waves are used to define abnormal electrical conduction in the heart, to detect cardiac tissue damage, and to classify patients at risk of cardiac arrhythmias.

Data used in the case study
The data used in this study are available from the Physionet QT interval database [28]. It contains a wide variety of QRS and ST-T morphologies and includes 105 ECG records taken from the following ECG databases: MIT-BIH Arrhythmia Database [29], the European Society of Cardiology ST-T Database [30], MIT-BIH Supraventricular Arrhythmia Database [27], The MIT-BIH Long-Term Database [31], MIT-BIH Normal Sinus Rhythm Database [32], Sudden Cardiac Death Holter Database [33] and MIT-BIH ST Change Database [34].
The data are sampled at 250 Hz and have annotations for the beginning and the end of P wave, QRS complex and T wave (Figure 7). For this study, 17 ECG recordings are used: sel51, The real ECG signals are contaminated with synthetic PLI generated using 50 Hz and 150 Hz sine waves and having SNR = �2 dB:

Digital filters
Four types of traditional IIR band stops filters are considered: Butterworth, Chebyshev I, Chebyshev II and elliptic. Cascaded filters from each type are implemented with the following stop bands: 49.5-50.5 Hz and 149.5-150.5 Hz. Their performance is compared against the timevarying pole radius multiple notch IIR filter [12] defined by the following equations: where K is the number of notches, Ω Ni is the central frequency of the notch, N is the order of the harmonics, B(z) is a symmetrical polynomial and r is the pole radius. In (3), the difference equation of the IIR multiple notch filter with a time-varying parameter r is presented: where the variation of r(n) is: Figure 7. An ECG example with marked onset and offset for P, QRS and T waves.
with variation range d r ¼ r 0 ð Þ=r and r ¼ lim n!∞ r n ð Þ; v includes the exponential variation of r n ð Þ in (3), and f s is the sampling frequency [7].

Performance measurements
The performance analysis is focused on the ST segment. Thus, 19,715 ST segments are included in the case study from the 20 ECG recordings. Three performance indices are considered: • Mean square error (MSE): where N is the number of samples of a ST segment, j ¼ 1…M, M is the total number of ST segments (M ¼ 19; 715), ST orig is the ST segment from the clean ECG recording, before PLI contamination and ST est is the ST segment obtained after the filters are applied for PLI and its harmonic cancelation; • Normalized root mean square error (NRMSE): • Noise retention expressed in percentage where P STorig ¼ 10 log 10 P N i¼1 ST orig i ð Þ � � 2

Results
In Figure 8, a segment from the ECG sel103 record is displayed before and after the contamination with synthetic PLI. Figure 9 depicts a detail from the ECG sel16773 after the digital filters are applied for PLI and its harmonic cancelation, and in Figure 10, a zoom of the ST segment from the ECG cycle presented in Figure 9 is displayed.

Conclusions
The digital traditional band stop filters introduce a ringing effect, especially after the QRS complex, which show the highest ECG frequency components. This can be observed in Figures 9 and 10. Also, the performance indices computed for 19,715 ST segments confirm  the presence of the distortion introduced by the filters. All four traditional filters have similar performance. In contrast, the TVNM filter has far better performance with indices having the values 10-100 times smaller. TVNM introduces almost no distortion (Figures 9  and 10). The ringing effect introduced by the traditional filters can impair the ST segment identification, and so the physician diagnostic. Moreover, the impact is not only when discussing the health status of the adult heart but also when considering the fetal heart diagnosis. fECG is an important clinical tool to evaluate the wellbeing of the fetus during pregnancy. In particular, the ST segment from the fECG has strong diagnostic power. Changes in fetal ST segment can indicate fetal hypoxia, myocardial dystrophy, cardiac malformations, and so on. Thus, the residuals of the traditional filters will have a greater impact on the fECG parameters because this signal has much smaller power than the adult ECG. Hence, traditional band stop filters should be avoided if the parameters of the ECG are to be extracted.
On the other hand, the TVNM shows no ringing effect and the resulted ECG signal after the PLI and its harmonic removal is almost identical with the original ECG. Hence, the risk of misreading the ECG parameters is almost nonexistent. In addition, in comparison with the traditional filters, it has a very short transient time.

Author details
Ţarălungă