chapter 3 removal of hrv artifacts using adaptive...

24
56 CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE THRESHOLD RANK ORDER FILTER 3.1 INTRODUCTION Any artifact in the HRV series may interfere with analysis of the signal. The artifacts within HRV signals can be divided into technical and physiological artifacts. The technical artifacts can include missing or additional QRS complex detections and error in R-wave occurrence time. These artifacts may be due to measurement artifacts or the computational algorithm. The physiological artifacts, on the other hand, include Ectopic beats and arrhythmic events. In order to avoid the interference of such artifacts only artifact-free sections are included in the HRV analysis. There are two main arguments for the removal of ectopic beats from the HRV signal prior to the calculation of HRV metrics. First, heart rate modulatory signals involving the ANS and cardio-vascular systems act upon the sinoatrial (SA) node in the heart, influencing sinus rhythm. Assessments of autonomic function reflect the ability of the system to stimulate the SA node. Ectopic beats originate from secondary and tertiary pacemakers and this type of locally aberrant beat will temporarily disrupt normal neurocardiac modulation. Second, an ectopic beat will often appear late or early with respect to the timing of a sinus beat, creates a sharp spike in the HRV series, likely to add a significant power contribution to the power spectrum at an artifactual frequency. There exist algorithms which can detect and classify

Upload: others

Post on 20-Jun-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

56

CHAPTER 3

REMOVAL OF HRV ARTIFACTS USING ADAPTIVE

THRESHOLD RANK ORDER FILTER

3.1 INTRODUCTION

Any artifact in the HRV series may interfere with analysis of the

signal. The artifacts within HRV signals can be divided into technical and

physiological artifacts. The technical artifacts can include missing or

additional QRS complex detections and error in R-wave occurrence time.

These artifacts may be due to measurement artifacts or the computational

algorithm. The physiological artifacts, on the other hand, include Ectopic

beats and arrhythmic events. In order to avoid the interference of such

artifacts only artifact-free sections are included in the HRV analysis.

There are two main arguments for the removal of ectopic beats

from the HRV signal prior to the calculation of HRV metrics. First, heart rate

modulatory signals involving the ANS and cardio-vascular systems act upon

the sinoatrial (SA) node in the heart, influencing sinus rhythm. Assessments

of autonomic function reflect the ability of the system to stimulate the SA

node. Ectopic beats originate from secondary and tertiary pacemakers and this

type of locally aberrant beat will temporarily disrupt normal neurocardiac

modulation. Second, an ectopic beat will often appear late or early with

respect to the timing of a sinus beat, creates a sharp spike in the HRV series,

likely to add a significant power contribution to the power spectrum at an

artifactual frequency. There exist algorithms which can detect and classify

Page 2: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

57

ectopic beats, but for HRV analysis these beats are removed either by manual

editing or by some means of filtering and interpolation.

3.2 DETECTION AND CORRECTION OF ARTIFACTS

The simple artifact detection criteria include absolute upper

(2.0 secs) and lower (0.3 secs) limits for acceptable RR interval variations and

intervals less than or equal to 80% of the previous sinus cycle length. Two

basic procedures mainly used for removing the individual artifacts from the

RR interval time series are:

1. Total exclusion of abnormal intervals

2. Substitution of a better matching value

The exclusion approach suits well for time domain and frequency

domain analysis if only a few beats are to be excluded, whereas if more beats

have to be processed, the substitution approach is used widely with both time

and frequency domain analysis. The substitution approaches can take the form

of simply replacing the abnormal value with a local mean or median,

neighbourhood values or low pass interpolated values.

3.3 DISCRETE WAVELET TRANSFORM BASED METHODS

Conventionally, ectopic beats are corrected manually. Keenan

(2006) developed a discrete wavelet threshold based interpolation method for

detecting and correcting ectopic beats automatically. In this method, Ectopic

beats are first identified and corrected by one level DWT and then 2 beat

cycles are low pass interpolated to create a smooth signal. Wavelet threshold

based filters are spatially adaptive; suits well for preprocessing non-stationary

signals. The very appealing feature of wavelet analysis is that it gives uniform

resolution for all scales. This feature is very useful for analyzing signals

Page 3: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

58

which undergo gradual frequency changes. The nonlinear feature of HRV

allows sudden changes which may lead to leakage of power due to the limited

length of the basic wavelet function. The main issue in wavelet based method

is how to choose a wavelet function, level of wavelet decomposition and an

optimal threshold which can be adaptive to the complexity of HRV signals.

The efficiency of the method depends on the following three conditions:

1. The suitability of wavelet function for the multifunctional

multicomponent HRV signals.

2. The level of wavelet decomposition to preserve the VLF

variations of HRV for further analysis and

3. Selection of optimal threshold conditions.

The HRV signal has wide range of frequency variations

(0.5 Hz to 0.001 Hz). The required level of wavelet decomposition is

unknown prior to analysis. Moreover, increasing the level of decomposition

may increase the number of wavelet coefficients thereby the computational

complexity of the method. If less number of decomposition levels are

preferred then there is a possibility of losing some of the LF and VLF

variations of the HRV signals. The above features make the wavelet threshold

based filters less adaptive to the multifunctional multicomponent nature of

HRV signals.

3.4 ADAPTIVE RANK ORDER FILTER

The rank order filter is a nonlinear filter which processes the data

sample by sample and do not assume any functional forms, linear and

stationary conditions in the HRV series. The filter replaces the noisy beats

captured by the optimal threshold conditions by the rank value. Hence it

Page 4: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

59

preserves the LF and VLF variations for further HRV analysis. The input

output relationship of the rank order filter is given by Equation (3.1).

yr(n)=rth

rank [x(n-N), x(n-N+1), …., x(n), ….,x(n+N-1), x(n+N)] (3.1)

where r = 1,2, …..2N + 1. The window size of the filter is W=2N+1.

Two types of adaptations are incorporated into the Adaptive Rank

Order Filter.

1. Adaptive filtering output

2. Adaptive window size

For the aspect of adaptive filtering output, the output may be a

noise free median (rank value) or a noise free non-median which is then used

to replace the center element in the window, W. As for the adaptive window

size, a window expansion scheme is adopted where the criterion to expand

window is, that all the elements within the current window are noisy. The

window width varies from 3 to 7 and N is the number of samples.

Let x and B represent the input and output vectors and a1 is the

lower threshold (0.3 secs) and a2 is the upper threshold (2.0 secs). The AROF

algorithm is

i = centre {xi to s | s W} ; W ={s | -n < s <+n }; n=(N-1)/2;

i = median {xj to s | s W} and

i = non-median {xj to s | s W}; where xj = [x1 x2 x3 …… xs];

B(i) = i : if |a1 < i < a2| or

B(i) = i : if |a1 < i < a2| or

B(i) = i : if |a1 < i < a2|

Otherwise expand the window size W.

Page 5: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

60

3.5 ADAPTIVE THRESHOLD RANK ORDER FILTER

The Adaptive Threshold Rank Order Filter (ATROF) is an

extension of AROF. Three types of adaptations are incorporated into the rank

order filter to form ATROF which are

1. Adaptive filtering output

2. Adaptive window size

3. Adaptive Thresholds

The adaptive window size and adaptive filtering conditions are

similar to AROF. For the aspect of adaptive thresholds, the upper and lower

threshold conditions (ai) for the current window are updated based on the

previous window non noisy value.

ai ={B(i-1) + 0.20* B(i-1) if i = 1 otherwise

B(i-1) - 0.20* B(i-1) if i= 2}:

where B (i-1) is previous window non-noisy sample value with ± 20%

tolerance of non noisy sample value. The initial threshold conditions are

assumed either based on the standard deviation of the signal or the non noisy

first sample value of the time series. The adaptive threshold conditions make

the approach completely automatic and tracks the LF and VLF variations of

the HRV signals.

3.5.1 Procedural Steps

Given a noisy signal A and initial window size 3, the ATROF is

implemented as follows:

Step 1: Duplicate the noisy input signal to an output variable B. Set the

initial value of the threshold ai =fint ± 0.2(fint) is based on the initial

non noisy sample value of the signal.

Page 6: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

61

Step 2: Check if the center element in the window is noisy or not. If yes

then go to step 3. Otherwise, update the threshold value by the

center element, ai = i ± 0.2( i) and move the center of the window

to the next element and redo step 2.

Step 3: Sort all the elements within the window in the ascending order and

find the median i.

Step 4: Determine if i is noisy or not using the threshold conditions. If yes

then jump to step 6. Otherwise, the median i is non-noisy and go to

step 5.

Step 5: Replace the corresponding center element in the output B with i,

update the new threshold, ai = i ±0.2( i) and go to step 6.

Step 6: Check if all other elements (non median i) within the window are

noisy or not. If yes, then expand the window size and go back to

step 2. Otherwise, go to step 7.

Step 7: Replace the corresponding center element in output B with the

noise free non median ( i). Set the new threshold, ai = i ±0.2( i)

Step 8: Reset window size and move the center of the window to next

element.

Step 9: Repeat the steps until all the elements are processed.

3.5.2 PSD Estimation

Methods for PSD estimation can be classified as nonparametric

methods based on Fast Fourier Transform and parametric methods based on

autoregressive (AR) time series modeling. In the latter approach, the HRV

time series is modeled as an AR(p) process

Page 7: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

62

p

t j t j tj 1

z a z e ,t p 1,.......N 1 (3.2)

where p (p=21) is the model order, aj are the AR coefficients, and et is the

noise term. A modified covariance method is used to solve the AR model

equation. The power spectrum estimate Pz is then calculated as

2

z 2p

i jj

j 1

P ( )

1 a e

(3.3)

where 2 is the variance of the prediction error of the model. In this work, for

spectrum estimations, free HRV analysis software (Developed by biomedical

signal analysis group, Department of Applied Physics, University of Kuopio,

Finland) has been used.

3.6 EXPERIMENTAL RESULTS

3.6.1 Effect of Ectopic Beats on Simulated Signals

To study the effect of ectopic beats at different magnitude levels

and rise in number of ectopic beats, a simulation study has been formulated.

For the simulation of RR intervals, Integral Pulse Frequency Modulator

(IPFM) is used to model the neural modulation of the SA-node. According to

this model, the input signal (mo+ m(t)), which involves a DC component (mo)

and a modulating sinusoidal component (m(t)) are integrated and, whenever

the integrated value exceeds a fixed threshold R, a unitary spike is generated,

and the integrator is reinitialized. For spectrum estimation the event series is

interpolated to a continuous time series. The modulating sinusoidal input m

(t), involves only two components to simulate the influences of the two ANS

activities, m(t)=Al cos (2 fl)t +Ah cos (2 fh)t. Al and Ah are the amplitudes

and fl and fh are the frequencies of the low (LF) and high (HF) frequency

Page 8: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

63

components of the signal. The low frequency (LF) occurs in a band between

0.4 Hz and 0.15 Hz, provides a measure of sympathetic effect on the heart

rate. The high frequency component (HF) defined between 0.15 and 0.4 Hz

provides a measure of cardiac parasympathetic activity. The ratio of power LF

to HF bands (LF/HF) provides the measure of cardiac sympathovagal balance.

To evaluate the effect of ectopy on HRV metrics, artificial ectopic

beats are added to an RR interval tachogram using the procedure described by

Kamath et al (1995). Ectopic beats are defined in terms of timing, as those

which have intervals less than or equal to 80% of the previous sinus cycle

length. Each data in the RR interval tachogram represents an interval between

two beats and the insertion of an ectopic beat therefore corresponds to the

replacement of two data points as follows. The nth and (n+1)th beats (where n

is chosen randomly) are replaced by

'n n 1RR RR (3.4)

' 'n 1 n 1 n nRR RR RR RR (3.5)

where the ectopic beat’s timing is the fraction ( 0.8) of the previous RR

interval. Figures 3.1 (a) and (b) show the simulated signal and its spectrum.

0 50 100 150 200 250 3000.5

1

1.5

2

2.5

Simulated ectopic signal

Time (s)

RR

In

terv

als

(m

se

cs)

0 0.1 0.2 0.3 0.4 0.50

0.2

0.4

0.6

0.8

1

1.2

1.4

Spectrum of simulated ectopic signal

Frequency Hz

PS

D

(a) Simulated HRV with Ectopic beats (b) Its spectrum

Figure 3.1 Simulated HRV signal with Ectopic beats and its spectrum

Page 9: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

64

Table 3.1 illustrates the effect of ectopic beats on HRV frequency

metrics. The spectral components of HRV signal are computed using AR

model based method, which uses the HRV analysis software developed by

Niskanen et al (2004). The LF and HF powers are measured in normalized

units (n.u) which represent the relative value of each power component in

proportion to the total power minus the power of VLF component.

Normalization tends to minimize the effect of the changes in total power on

the values of LF and HF components.

The increase in ectopic magnitude level and rise in number of

ectopic beats decreases the LF power and increases the HF power and thereby

reduces the LF/HF ratio. The effect is much more pronounced when the

numbers of ectopic beats are more than one as described in Figure 3.2.

Table 3.1 Frequency Metrics for different levels ( ) of ectopic beats

LF HFLF/HF

freq n.pr freq n.pr

† 1.181 0.096 54.2 0.162 45.8

'0.8 1.061 0.096 51.5 0.162 48.5

'0.7 0.986 0.096 49.6 0.162 50.4

'0.6 0.901 0.096 47.4 0.162 52.6

‡0.6 0.673 0.096 40.2 0.164 59.8

0.6 0.618 0.096 38.2 0.164 61.8

† Signal without ectopic beats

' Signals with two ectopy beats at ( =0.8, 0.7 and 0.6)

‡ Signal with three ectopic beat at ( =0.6)

Signal with four ectopic beat at( =0.6)

Page 10: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

65

0

10

20

30

40

50

60

70

PSD in

normalized

units

1 2 3 4 5 6

Different levels of ectopy

Frequency Measures

LF

HF

Figure 3.2 Effect of ectopic beats on simulated HRV signal

3.6.2 Performance Comparison of WF and AROF on Simulated

Signals

The simulated ectopic signals are applied to WF and AROF to

remove the noisy beats. The DWT at level five and Daubechies wavelet-1 is

used to obtain the wavelet coefficients. Following hard thresholding iDWT is

applied to the wavelet coefficients to reconstruct the signal. The frequency

metrics of WF and AROF filtered signals are given in Table 3.2 and LF/HF

ratio in Figure 3.3.

Table 3.2 Performance of WF and AROF on simulated ectopic beat signals

Ectopy

levelWF AROF

LF HF LF HF LF/HF

freq n.pr freq n.pr LF/HF freq n.pr freq n.pr

0.8 1.198 0.096 54.5 0.162 45.5 1.216 0.096 54.9 0.164 45.1

0.7 1.202 0.096 54.6 0.162 45.4 1.216 0.096 54.9 0.164 45.1

0.6 1.093 0.096 52.2 0.162 47.8 1.216 0.096 54.9 0.164 45.1

‡0.6 1.094 0.096 52.3 0.162 47.7 1.186 0.096 54.3 0.164 45.7

0.6 0.991 0.096 49.8 0.162 50.2 1.232 0.096 55.2 0.164 44.8

freq: frequency, n.pr: Normalized power.

nil 0.8 0.7 0.6 ‡0.6 *0.6

Different levels of ectopy

Page 11: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

66

The performance of WF is better, when the magnitude level of

ectopy is low ( =0.8) and with less (two) number of ectopic beats. But the

performance of WF on real HRV signal is not the same for the same ectopic

level ( =0.8), which is explained in the next section. The performance of WF

degrades for increase in magnitude level of ectopic beats and rise in number

of ectopic beats (three and four). The performance of AROF is consistent for

increase in magnitude level and rise in number of ectopic beats as shown in

Figure 3.3.

0

0.2

0.4

0.6

0.8

1

1.2

1.4

LF/HF ratio

1 2 3 4 5 6

Different levels of Ectopy

LF/HF Ratio

WF

AROF

nil 0.8 0.7 0.6 ‡0.6 *0.6Different levels of Ectopy

Figure 3.3 Performance comparison of WF and AROF on simulated signal

3.6.3 Effect of Ectopic Beats on Real HRV Signals

A real HRV signal (Figure 3.4(a)) with added one ectopic beat at

=0.6 fraction of the previous RR interval is shown in Figure 3.4(b). Presence

of one ectopic beat at =0.6 level, dominates other signal variations and

affects the spectral content of the original signal. The spectrums of the

original and ectopic signals are shown in Figures 3.4(c) and 3.4(d). Presence

of single ectopic beat not only affects the frequency domain measures, it also

increases the amount of nonlinearity in the HRV signal. The spectral energy

Page 12: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

67

spreads and introduces ambiguity in the spectral content of the original signal

as given in Table 3.3. A single ectopic beat disrupt the entire spectrum of the

HRV signal.

0 20 40 60 80 1000.9

1

1.1

1.2

1.3

1.4

1.5

HRV signal

Time (s)

RR

In

terv

als

(m

se

c)

0 20 40 60 80 100

0.8

1

1.2

1.4

1.6

1.8

2

HRV signal with Ectopic beat

Time (s)R

R In

terv

als

(m

se

c)

(a) Original Signal (b) Ectopic beat signal

0 0.1 0.2 0.3 0.4 0.50

0.02

0.04

0.06

0.08

0.1

0.12

0.14

X: 0.2285

Y: 0.1205

AR Spectrum

Frequency Hz

PS

D

X: 0.1543

Y: 0.03231

HF

LF

0 0.1 0.2 0.3 0.4 0.50

0.005

0.01

0.015

0.02

0.025

0.03

0.035

0.04

0.045

X: 0.06445

Y: 0.01361

AR Spectrum

Frequency Hz

PS

D

X: 0.2383

Y: 0.04345

HF

LF

(c) Spectrum of original signal (d) Spectrum of ectopic signal

Figure 3.4 Original and Ectopic signals and its spectrums

Table 3.3 Spectral components of original and ectopic beat signal

SignalVLF

(Hz)

VLF

power

s2/Hz

LF

(Hz)

LF

power

s2/Hz

HF

(Hz)

HF

power

s2/Hz

Original 0.0451 0.0146 0.1543 0.0323 0.2285 0.1205

Signal with

Ectopy ( =0.6)0.0451 0.0 0.0644 0.0136 0.2383 0.0435

Page 13: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

68

3.6.4 Performance of AROF and WF on Real HRV Signal

The performance of AROF and WF on ectopic signal is described

in Figures 3.5(a) to 3.5(h). Ectopic beats activated in the ventricles are fairly

common in subjects suffering from heart failure. Hence to study the

performance of two filters, a congestive heart failure (CHF) signal as

shown in Figure 3.5(a) is considered. The AR spectrum of CHF signal is

shown in Figure 3.5(b).

In original CHF signal, the LF power is much suppressed compared

to VLF and HF powers and the spectral values are given in Table 3.4. Three

ectopic beats at =0.8 magnitudes are randomly added to the CHF signal as

shown in Figure 3.5(c). The AR spectrum of ectopic beats CHF signal (Figure

3.5(d)) is much affected by the presence of ectopic beats. The HF power is

increased and LF power is completely reduced to zero as given in Table 3.4.

The AROF and WF (at various decomposition levels) filtered signals and the

corresponding AR spectrums are shown in Figures 3.5(e) to 3.5(h) and the

components values are given in Table 3.4. The non-parametric (Welch’s

periodogram) spectrum of filtered signals are also given in the Appendix 3 for

comparison.

0 50 100 150 200 2500.95

0.96

0.97

0.98

0.99

1

1.01

1.02

1.03

1.04

Ectopic beat free CHF signal

Time (s)

RR

In

terv

als

(m

se

cs)

0 0.1 0.2 0.3 0.4 0.50

1

2

3

4

5

6x 10

-4 Spectrum of CHF signal

Frequency (Hz)

PS

D

(a) Ectopic beat free CHF signal (b) Spectrum of CHF signal

Figure 3.5 (Continued)

Page 14: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

69

0 50 100 150 200 2500.7

0.8

0.9

1

1.1

1.2

1.3

1.4

Ectopic beat CHF signal

Time (s)

RR

In

terv

als

(m

se

cs)

0 0.1 0.2 0.3 0.4 0.50

0.5

1

1.5

2

2.5x 10

-3 Spectrum of Ectopic signal

Frequency (Hz)

PS

D

(c) Signal with Ectopic beats (d) Spectrum of Ectopic signal

0 50 100 150 200 2500.95

0.96

0.97

0.98

0.99

1

1.01

1.02

1.03

1.04

Adaptive Rank order filtered signal

Time (s)

RR

In

terv

als

(m

se

cs)

0 0.1 0.2 0.3 0.4 0.50

1

2

3

4

5

6x 10

-4 Spectrum of AROF signal

Frequency (Hz)

PS

D

(e) AROF filtered signal (f) Spectrum of AROF signal

0 50 100 150 200 2500.95

1

1.05

Wavelet Filtered Signal

Time (s)

RR

In

terv

als

(m

se

cs)

0 0.1 0.2 0.3 0.4 0.50

1

2

3

4

5

6x 10

-4 Spectrum of WF signal

Frequency (Hz)

PS

D

(g) WF signal (h) Spectrum of WF signal

Figure 3.5 Performance analysis of AROF and WF on real CHF signal

Page 15: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

70

The AROF almost preserves all the signal variations with less

distortion, whereas the WF is not able to preserve the VLF spectral

component even at level 5. At level 7 (Table 3.4) only it covers all the

components of the original CHF signal.

Table 3.4 Spectral components of Original, Ectopic beat signal, AROF

and WF filtered signals

SignalVLF

(Hz)

VLF

power

s2/Hz

LF

(Hz)

LF

power

s2/Hz

HF

(Hz)

HF

power

s2/Hz

CHF 0.0117 5.6E-4 0.0664 7.5E-5 0.3125 5.0E-4

Signal with

Ectopic beats

=0.8)

0.0156 8.9E-4 0.1445 0.00 0.2773 1.92E-3

AROF signal 0.0156 5.5E-4 0.0667 7.3E-5 0.3105 4.7E-4

WF (S=3) 0.0332 0.00 0.0742 2.0E-5 0.3145 4.8E-4

WF (S=5) 0.0156 0.00 0.0625 2.0E-5 0.3105 5.1E-4

WF (S=7) 0.0156 5.1E-4 0.0605 4.0E-5 0.3145 4.8E-4

0%

20%

40%

60%

80%

100%

Relative

powers of

components

Orig AROF WF(s=3) WF(s=5) WF(s=7)

Comparison of spectral powers

HF

LF

VLF

Figure 3.6 Comparison of spectral powers of Original, AROF and WF

filtered signals

Page 16: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

71

Figure 3.6 compares the spectral powers of AROF and WF filtered

signals. The AROF filter not only removes the ectopic beats, it also preserves

the signal characteristics for further analysis. WF filter removes the beats, but

at lower decomposition levels it is not able to preserve the VLF variations of

HRV signals. The increased level of wavelet decomposition may increase the

computational complexity of the algorithm.

3.6.5 Advantage of Adaptive Thresholds in ATROF

The AROF is non-adaptive in its threshold conditions, which may

not track the non-stationary trend of HRV signal. If trends are complex then it

should be detrended prior to processing. The proposed ATROF filter has

adaptable threshold conditions which is able to track the complex trend of

HRV signal. The HRV signal with complex trend is shown in Figure 3.7(a)

and artificially added four ectopic beats are shown in Figure 3.7(b). The

AROF is unable to remove the ectopic beats completely, due to non adaptive

threshold condition for the complex non stationary trend as shown in Figure

3.7(c). The fixed thresholds are able to detect and correct ectopic beat 1

completely, but ectopic beats 2, 3 and 4 are only partly removed. The adaptive

threshold condition of the proposed ATROF tracks the non-stationary trend

and completely removes all the noisy beats as shown in Figure 3.7(d). The

spectral components are given in Table 3.5 for comparison. The comparisons

of spectral values are shown in Figure 3.8.

Page 17: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

72

0 50 100 150 200 250 300 3500.7

0.8

0.9

1

1.1

1.2

1.3

1.4

1.5

HRV signal without any noisy beats

Beat Number

RR

In

terv

als

0 50 100 150 200 250 300 3500.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

HRV signal with noisy beats

Beat number

RR

In

terv

als

Ectopic beat 1

Ectopic beat 2

Ectopic beat 3

Ectopic beat 4

(a) HRV with complex trend (b) Signal with Ectopic beats

0 50 100 150 200 250 300 350

0.7

0.8

0.9

1

1.1

1.2

1.3

1.4

1.5

Rank order filtered signal

Beat Number

RR

In

terv

als

Unfiltered noisy

beat

Unfiltered noisy beat

0 50 100 150 200 250 300 3500.7

0.8

0.9

1

1.1

1.2

1.3

1.4

1.5

Adaptive Threshold Rank order filtered signal

Beat Number

RR

In

terv

als

(c) Performance of AROF (d) Performance of ATROF

Figure 3.7 Advantage of adaptive thresholds in ATROF

Table 3.5 Performance comparison of AROF and ATROF

SignalVLF

(Hz)

VLF

power

s2/Hz

LF

(Hz)

LF

power

s2/Hz

HF

(Hz)

HF

power

s2/Hz

Original 0.0312 0.050 0.1445 0.0128 0.2285 0.0294

Signal with

Ectopy( =0.6)0.002 0.0484 0.1362 0.00 0.2226 0.023

AROF 0.0312 0.0392 0.1367 0.0111 0.2305 0.0241

ATROF 0.0312 0.0410 0.1367 0.0119 0.2305 0.0261

Page 18: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

73

0

0.005

0.01

0.015

0.02

0.025

0.03

0.035

0.04

0.045

0.05

Spectral

powers

Original Ectopic AROF ATROF

Performance of AROF and ATROF

VLF

LF

HF

Figure 3.8 Performance comparisons of AROF and ATROF

Figure 3.8 shows the proposed adaptive threshold condition

improves the spectral powers of components by completely removing all the

noisy beats. Hence, it eliminates the need for de-trending prior to ectopic beat

filtering.

3.6.6 Performance Analysis of ATROF and WF on Real Ectopic Beat

Congestive Heart Failure signals

The performance analysis of ATROF on real CHF signal with

varying ectopic beats proves the advantage of ATROF. The ectopic beats in

the CHF signal introduces ambiguity in the VLF and LF bands of HRV

signal. In real situations, the true value of the signal’s PSDs value are

unknown and it is difficult to demonstrate which method yields better results.

Hence, an ectopic free segment has been chosen for reference in the same

signal. The selected ectopic beats segments are of equal length and with rise

in number of ectopic beats. The spectral values of each ectopic beat segment

are given in Table 3.6(a). Application of ATROF on ectopic segments

preserves the VLF component, whereas the WF filter does not preserve the

Page 19: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

74

VLF components. The spectral values of ATROF and WF filtered segments

are given in Tables 3.6(b) and 3.6(c). The average spectral values of ATROF

filtered segments are similar to spectral features of ectopic free segment, but

the average LF component spectral values of WF filtered signals are totally

different from ectopic free spectral feature. The WF filter completely

suppresses the VLF variations even at fifth level of wavelet decomposition.

Figures 3.9(a) to 3.9(h) show the performance of ATROF on real ectopic CHF

signal.

0 50 100 150 200 2500.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7

0.75

Ectopic free segment of CHF signal

Time (secs)

RR

in

terv

als

(m

se

cs)

0 0.1 0.2 0.3 0.4 0.50

1

2

3

4

5

6x 10

-4 Spectrum of ectopic free segment

Frequency (Hz)

PS

D

(a) Ectopic beat free segment of (b) its spectrum

CHF signal

0 50 100 150 200 2500.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7

0.75

Real Ectopic beats signal

Time (secs)

RR

In

terv

als

(se

cs

)

0 0.1 0.2 0.3 0.4 0.50

1

2

x 10-4

Spectrum of Congestive heart failure signal

Frequency Hz

PS

D

(c) Ectopic beat CHF signal (d) its spectrum

Figure 3.9 (Continued)

Page 20: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

75

0 50 100 150 200 2500.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7

0.75

ATROF filtered CHF signal

Time (secs)

RR

In

terv

als

(m

se

cs)

0 0.1 0.2 0.3 0.4 0.50

1

2

x 10-4 ATROF filtered CHF signal

Frequency Hz

PS

D

(e) ATROF filtered signal (f) its spectrum

0 50 100 150 200 2500.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7

0.75

Time (secs)

RR

In

terv

als

(m

se

cs)

WF filtered CHF signal

0 0.1 0.2 0.3 0.4 0.50

1

2

3

4

5

6

7

8

9x 10

-5 Spectrum of WF filtered CHF signal

Frequency Hz

PS

D

(g) WF filtered signal (h) its spectrum

Figure 3.9 Performance Analysis of ATROF and WF on real ectopic

beat CHF signals

Table 3.6(a) Spectral components of real CHF signal and segments with

ectopic beats

SignalVLF

(Hz)

VLF

power

s2/Hz

LF

(Hz)

LF

power

s2/Hz

HF (Hz)

HF

power

s2/Hz

Ectopic free segment 0.0352 94.5 0.1270 1.0 0.2539 4.5

one ectopic beat 0.0000 0 0.0469 79.7 0.3340 20.3

Two ectopic beat 0.0332 55.6 0.0000 0.0 0.3574 44.4

Three ectopic beat 0.0000 40.1 0.0000 0.0 0.3867 59.9

Four ectopic beat 0.0000 37.1 0.0000 0.0 0.3340 62.9

Five ectopic beat 0.0293 34.6 0.0000 0.0 0.3496 65.4

Page 21: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

76

Table 3.6(b) Spectral components of ATROF filtered CHF signals

SignalVLF

(Hz)

VLF

power

s2/Hz

LF (Hz)

LF

power

s2/Hz

HF (Hz)

HF

power

s2/Hz

Ectopic free segment 0.0352 94.5 0.1270 1.0 0.2539 4.5

one ectopic beat 0.0000 0 0.0449 95.9 0.2676 4.1

Two ectopic beat 0.0332 93.2 0.0000 0.0 0.1973 6.8

Three ectopic beat 0.0273 89.9 0.0000 0.0 0.2168 10.1

Four ectopic beat 0.0313 91.0 0.0000 0.0 0.2324 9.0

Five ectopic beat 0.0391 88.3 0.0000 0.0 0.2129 11.7

Average 0.02618 72.48 0.00898 19.18 0.2254 8.34

Table 3.6(c) Spectral components of WF filtered CHF signals

SignalVLF

(Hz)

VLF

power

s2/Hz

LF (Hz)

LF

power

s2/Hz

HF (Hz)

HF

power

s2/Hz

Ectopic free segment 0.0352 94.5 0.1270 1.0 0.2539 4.5

one ectopic beat 0.0000 0 0.0527 79.3 0.1719 4.0

Two ectopic beats 0.0000 0.0 0.0645 82.5 0.2109 17.5

Three ectopic beats 0.0000 0.0 0.0605 72.7 0.2168 27.3

Four ectopic beats 0.0000 0.0 0.0684 64.9 0.1777 35.1

Five ectopic beats 0.0000 0.0 0.0586 75.4 0.2129 24.6

Average 0 0 0.06094 74.96 0.19804 21.7

0102030405060708090

100

Relative power

Ectopic free ATROF WF

Performance Analysis

VLF

LF

HF

Figure 3.10 Average spectral powers of ATROF and WF on real ectopic

segments of CHF signal

Page 22: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

77

The Performance comparison of ATROF and WF on real Ectopic

signal shows (Figure 3.10) that ATROF not only removes the noisy beats, it also

preserves the signal characteristics (enhanced VLF variations and suppressed

LF and HF variations) of different ectopic beat segments of CHF signal.

3.6.7 Performance of ATROF and WF on Missed QRS Complex Signal

Missed QRS complexes increase the beat intervals twice the value

of the original beat as shown in Figure 3.11(a). The ATROF filter and WF

filters are applied to remove the missed beats as shown in Figure 3.11(b) and

(c). The VLF power of the missed beat signal is much suppressed by the noisy

impulses. ATROF filtering improves the VLF power in the signal as shown in

Figure 3.12, but WF filtering is not able to preserve the very low frequency

variations of the signal, the spectral components are given in Table 3.7.

0 50 100 150 200 250

0.7

0.8

0.9

1

1.1

1.2

1.3

1.4

1.5

1.6

Missed Beats

Beat Numbers

RR

In

terv

als

0 50 100 150 200 2500.65

0.7

0.75

0.8

0.85

0.9

ATROF Signal

Beat Number

RR

In

terv

als

(a) Missed QRS complex signal (b)ATROF filtered signal

0 50 100 150 200 2500.65

0.7

0.75

0.8

0.85

0.9

Wavelet filtered signal

Time (secs)

RR

In

terv

als

(c) Wavelet filtered signal

Figure 3.11 Performance of ATROF and WF on missed QRS complex signal

Page 23: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

78

Table 3.7 Performance comparison of ATROF and WF on missed beat

signal

SignalVLF

(Hz)

VLF

power

s2/Hz

LF

(Hz)

LF

power

s2/Hz

HF

(Hz)

HF

power

s2/Hz

Noise free segment 0.0000 32.8 0.0859 53.3 0.2793 13.9

Segment with missed

beats0.0000 2.6 0.0762 48.6 0.1816 48.9

ATROF 0.0000 37.2 0.0977 44.9 0.2852 17.9

WF 0.0000 0.1 0.0488 79.7 0.2090 20.3

0

10

20

30

40

50

60

70

80

Relative power

Noise free Noisy ATROF WF

Performance of ATROF & WF on missed beat signal

VLF

LF

HF

Figure 3.12 Performance comparisons of ATROF and WF on missed

beat signal

3.7 CONCLUSION

Ectopic beats and missed QRS complexes increase the signal HF

power by lowering the LF power and suppressing the VLF power of the

signal. Removal of noisy beats is of prime importance before signal analysis

to avoid ambiguity in the measures. Conventional preprocessing methods

assume functional forms (wavelet functions) which are not adaptive to the

Page 24: CHAPTER 3 REMOVAL OF HRV ARTIFACTS USING ADAPTIVE ...shodhganga.inflibnet.ac.in/bitstream/10603/13448/8/08_chapter 3.pdf · 3.3 DISCRETE WAVELET TRANSFORM BASED METHODS Conventionally,

79

complexity of HRV signal. Non-stationary is the characteristic feature of

HRV signal, and conventional methods assume linear and weak stationary

conditions in the HRV signal. The proposed ATROF method does not assume

any functional forms or linear, stationary conditions in the HRV signal. The

adaptive window size, adaptive filtering and adaptive threshold conditions

make the filter completely automatic and adaptive to the signal complexity.

Application of ATROF even at 30% of noisy beats affects only the high

frequency details and the structural complexity of the signal is preserved as

shown in Figure 3.13.

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.50

0.01

0.02

0.03

0.04

0.05

0.06

Frequency (Hz)

PS

D

Performance Analysis of ATROF

Original HRV signal

5% noise removed

20% noise removed

30% noise removed

Figure 3.13 Performance analysis of ATROF on PSD of HRV signal

The proposed ATROF is completely adaptive and preserves the

signal characteristics for further analysis.