**2.4 Summary**

**3.1.2 Investigated Techniques**

Several signal decomposition and filtering techniques are explored for detecting base- line wander from ECG signals. The signal decomposition techniques include Empirical Mode Decomposition, Ensemble Empirical Mode Decomposition, Complete Ensemble Empirical Mode Decomposition with Adaptive noise, and Variational Mode Decom- position. The filtering techniques include median filtering and mean median filtering.

A brief description of these techniques is as follows.

Empirical Mode Decomposition(EMD) [192] is a data-driven technique that decomposes a non stationary signal (generated from non linear systems) in narrow- band monocomponent signals also called as intrinsic mode functions (IMF). IMFs are zero mean amplitude modulated frequency modulated (AMFM) components. How- ever, it is not guaranteed that an IMF consists of a single oscillatory mode, and neither be narrowband signal nor meaningful due to its limitations. The IMF should satisfy the following stopping criteria: (i) Number of extrema (local maxima and local

40 TH-2764_156201001

3. PREPROCESSING ELECTROCARDIOGRAM SIGNAL

minima) and zero-crossings must differ at most by one; (ii) At any timestamp, the mean value of the envelope defined by the local maxima and the envelope defined by the local minima is near zero [192]. Algorithm 1 calculates EMD of signal y(t).

Algorithm 1 Empirical Mode Decomposition Input: ECG signal (y(t))

Output: IM F_{EM D} (z(t))

1. Determine all local maximay_{max}(t) and local minima y_{min}(t) for y(t).

2. Interpolatey_{max}(t) and y_{min}(t) using cubic spline.

3. Calculate mean m(t): m(t) = (y_{max}(t) +y_{min}(t))/2.

4. Calculated(t): d(t) = y(t)−m(t).

5. Check ifd(t) is an IMF using the stopping criteria, if it satisfies the criteria then goto step 6 or else goto step 1.

6. The above procedure is called sifting. After obtaining the first IMF, subtract it from y(t) and obtain the remaining signal. Perform sifting on the obtained signal until the residue persists any meaningful frequency information.

7. The final decomposed signal can be obtained as a sum of IMF’s d_{n}(t) and a
residuer_{n}(t) as provided in Equation 3.1.

z(t) =

N

X

n=0

d_{n}(t) +r_{n}(t) (3.1)

The IMFs obtained using EMD suffers from oscillation with multiple frequencies in a single mode or single frequency in multiple modes. This problem is commonly known as “mode mixing”. Adding multiple realizations of a specific amount of noise removes mode mixing by utilizing the dyadic filter bank behaviour of EMD [193].

This phenomenon was termed as ensemble EMD (EEMD) [194].

EEMD[194] decomposes the original signal for multiple ensembles of noise and produces the modes by averaging. Algorithm 2 calculates EEMD of signal y(t).

Algorithm 2 Ensemble Empirical Mode Decomposition Input: ECG signal (y(t))

Output: IM F_{EEM D} (D_{k})

1. Generate a new input by adding multiple noise realizations ofN(µ= 0, σ = 1).

2. Decompose each new input using EMD and obtain the IMF d^{n}_{k}.

3. Assignd_{k}as thek^{th} IMF obtained fromy(t) by averaging the corresponding IMFs
as given in Equation 3.2.

D_{k}= 1
I

I

X

i=1

d_{k}^{i} (3.2)

Each pair of signal and noise is individually decomposed and their residue r_{k}^{i} =
TH-2764_156201001

3.1. BASELINE WANDER REMOVAL TO ENHANCE ECG SIGNAL QUALITY

r_{k}^{i−1}−d_{k}^{i} is obtained thereby eliminating the estimation of local means.

EEMD alleviates mode mixing problem but introduces the problem of residual noise that corresponds to the difference between reconstructed and original signal.

Another problem is that the averaging of IMFs is difficult due to the fact that varying number of IMFs are generated by EEMD. This led to the development of Complete Ensemble EMD using Adaptive Noise (CEEMDAN) [195].

CEEMDAN [195] not only achieves negligible reconstruction error but also solved the problem of varying number of modes for different noise realizations. The basic intuition of CEEMDAN comes from the fact that it utilises all final modes generated by multiple noise realization of signal for the calculation of the next mode.

This estimates the local mean of modes in an efficient and sequential manner for each
noise realization. Suppose E_{k}(.) generates k^{th} IMF via EMD. Then CEEMDAN of
signal y(t) is calculated using Algorithm 3.

Algorithm 3 Complete Ensemble EMD with Adaptive Noise Input: ECG signal (y(t))

Output: IM F_{CEEM DAN} (x)

1. For every j ={1, . . . , J}, decompose each y^{(j)}=y+β_{0}w^{(j)} using EMD until the
first CEEMDAN mode is obtained. Then compute d_{1} = _{J}^{1}

J

P

j=1

d^{(j)}_{1} .
2. Calculate first residue using r_{1} =y −d_{1}.

3. Generate first mode of r1 +β1E1(w^{(j)}) by EMD, where j = {1, . . . , J} and
calculate second CEEMDAN mode asd_{2} = _{J}^{1}

J

P

j=1

E_{1}(r_{1}+β_{1}E_{1}(w^{(j)})).

4. For k={1, . . . , K} calculate the k^{th} residue as rk =r(k−1)−dk.

5. Calculate first mode of r_{k} +β_{k}E_{k}(w^{(j)}) by EMD, where j = {1, . . . , J} and
calculate the (k+ 1)^{th} CEEMDAN mode as d_{(k+1)} = _{J}^{1}

J

P

j=1

E_{1}(r_{k}+β_{k}E_{k}(w^{(j)})).

6. Goto step 4 for the calculation of next mode k.

7. Iterate steps 4 to 6 until the residue satisfies IMF conditions or it has less than
3 local extremum points. The last residue satisfies: r_{K} =y−

K

P

k=1

d_{k}, where K is the
number of IMFs. Therefore, the overall signal can be represented by Equation 3.3.

x=

K

X

k=1

d_{k}+r_{K} (3.3)

Modes extracted using CEEMDAN provide exact reconstruction of the original signal. Final number of IMFs is solely determined by the data and the stopping criterion. However, CEEMDAN also suffers from residual noise as the signal informa-

42 TH-2764_156201001

3. PREPROCESSING ELECTROCARDIOGRAM SIGNAL

tion appears in higher order IMF as compared to EEMD and some “spurious” lower order modes [195]. Theoretical and mathematical literature still lacks in finding out the number of ensembles and the amplitude of noise to be added in order to boost performance.

Variational Mode Decomposition(VMD) [196] is a data adaptive technique
that generates the variational modes from multicomponent signal y(t) in an entirely
non recursive and concurrent fashion. The variational modes (u_{k}) are quasi orthogonal
and bandlimited around center frequency (ω_{k}) that are capable to reproduce the
input signal. VMD comprises of a strong mathematical framework. It uses the
concepts of Wiener filtering, Fourier transform, Hilbert transform, analytic signal
and the frequency shifting through harmonic mixing. Algorithm 4 describes signal
decomposition through VMD.

Algorithm 4 Variational Mode Decomposition Input: ECG signal (y(t))

Output: IM F_{V M D} (y_{k}(t))

1. For each mode, the analytical signal is computed using the hilbert transform to acquire a unilateral frequency spectrum.

2. The spectrum of the obtained mode is mixed with an exponential that shifts it to an estimated center frequency.

3. The bandwidth of the mode is estimated through the squared norm of the de- modulated signal.

4. Perform above steps until convergence and calculatey_{k}(t) using Equation 3.4.

min

{yk},{ωk}

( X

k

∂_{t}

δ(t) + j πt

∗y_{k}(t)

e^{−jω}^{k}^{t}

2

2

) s.t.

K

X

k=1

y_{k}(t) =y(t) (3.4)
where, δ is the dirac distribution, t is the time, K is the number of modes and ∗ is
the convolution operator.

Mean-Median Filtering (MMF) [197] utilizes the convex combination of the sample median and sample mean of signal y(t) as provided in Equation 3.5.

M M F = (1−α)∗mean(y(t)) +α∗median(y(t)) (3.5) where, α∈[0,1] is the ‘contamination factor’.