• No results found

ECG a power or an energy signal : ECG signal waveforms, either normal or abnormal, are continuous over a given window of observation and possess infinite energy over that window, such signals are called power signals. A window of observation could be tens of seconds as in an ECG strip or a lifetime, during which it is assumed the signal never dies. For power signals, power is expressed only as average power and for such signals Fourier transform may not exist as they may not have a finite integral, so a single measure of power cannot be obtained

Figure 4.5: Power spectrum content in a single QRS complex in a single V-type heartbeat in an ECG waveform

4.3. Methods: Spectral Analysis of V, A, N annotation types 103

and spectral densities of the power signal have to be considered instead.

Average power (P a) of signal x (t) : 0 < P a < ∞

Average power (continuous, time : T ) P a = lim

T →∞ 1 2T Z T −T |x (t) |2dt

Average power (discrete, length : N ) P a = lim

N →∞ 1 2N + 1 n=N X n=−N |x[n]|2 (4.1)

Non-stationary nature: The ECG signals regardless of their annotation types are

non-stationary signals as their statistical properties vary with time, i.e. statistical measures e.g. mean, variance and deviation of all the samples in a single heartbeat change over time and no two heartbeats have the same values for these statistical measures (Paithane and Bormane 2014).

Auto-correlation: Auto-correlation is a measure of correlation of a signal with its

own delayed instance, expressed as function of delay. For non-stationary signals however, the auto-correlation property of the signal could not be calculated as the expected value E {X (t)} of the signal at a given point in time will not be equal to the original value of the signal x(t) (with Fourier transform X (t)) displaced by ‘k’ intervals.

F or an ECG signal x (t) with discrete equivalent x [n] E {X (t)} 6= hx(t + k)i E {X (n) X(n + k)} 6= hx (n) x(n + k)i

(4.2)

It then followed that instead of using auto-correlation and average power as features, the power spectral density could adequately represent the annotation types and could be used as a feature. The ‘power spectral density is a vector of

coefficients of power spectrum of the signal, so ‘bandpower ’ was calculated which

took PSD coefficients as input and produced a measure of band power in the signal, which was used as a feature value.

Also, in order to emphasise the advantage of using power spectral density as compared to using the QRS intervals in time domain, the bandpower

values associated with the power spectrum of some ECG heartbeat samples were calculated. The comparison of PSD estimates against corresponding QRS intervals for V-type and N-type signals is presented in figures 4.6a and 4.6b. It was observed that despite minor or no variations in QRS intervals there were significant variations in corresponding bandpower values equation 4.3.

E.g. Let QRSN and QRSV be QRS intervals f or N − type and V − type

signals with Bandpowers BPN and BPV respectively.

QRSN = {36, 36} <corresponds to>=⇒ Band Power BPN= {−0.75983, −0.46278}

QRSV = {64, 63} <corresponds to>=⇒ Band Power BPV= {2.0481, −0.36251} (4.3)

The Welch periodogram (Welch 1967) is a Fast Fourier Transform based computing method used for estimating power spectra in a signal and is carried out by dividing the time-domain signal into successive blocks, forming the periodogram for each block, and averaging over these blocks. For calculations used in pwelch method to compute power spectral density in an ECG signal:

Divide the available sample sequence of p overlapping sample sequences of D samples each, shifting S samples between consecutive segments. If original sequence is x[k] the pth segment can be expressed as:

xp[n] = x[pS + n] (4.4)

Apply the data window w[n] to each segment:

Yp[n] = w[n]xp[n]p = 0, 1, ..., p − 1 (4.5)

The Hamming window, also called a tapering function, is a smoothing function used to rectify discontinuities at the beginning and end of the sampled signal (Harris 1987)The Hamming window function w(n) series considered with N

4.3. Methods: Spectral Analysis of V, A, N annotation types 105

samples:

w(n) = 0.54 − 0.46 cos 2πn

N − 1 (4.6)

Compute the discrete frequency sample spectrum for each of the p windowed segments. Sp[m] = T U D|Yp[m]| 2 (4.7) where, U = p−1 X n=0 |w[n]|2

Compute the arithmetic average of the p different sample spectra at each frequency: Sw[m] = 1 p p−1 X p=0 Sp[m], where m =0, 1, ..., D − 1 (4.8)

Root-Mean-Square level of a vector x[n] is:

XRM S = v u u t 1 N N X n=1 |xn|2 Bandpower = |XRM S|2 (4.9)

A generic periodogram could only generate power spectrum of a waveform, though could not generate consistent power estimates for a non-stationary process like an ECG. A modified Welch’s technique was used instead to reduce the variance of the periodogram by breaking the time series into segments. No overlaps were considered as it was a single heartbeat under consideration. The Welch’s method computed a modified periodogram for a single Hamming window and segment length containing all the samples in the V-type or the N-type heartbeat, to produce the PSD estimates. The pwelch function in MATLAB signal processing toolbox returned the power spectral density (PSD) estimate, ’pxx’, of the input signal sample.

[pxx, f n] = pwelch(samplesV type, Hamming(samplesV type))

bandpower = 10log10(bandpower(pxx, f n)

The reduced time interval between two consecutive RR intervals, due to premature atrial ectopic beat is an indicator of premature atrial contraction. The P-wave, in this case, could be distorted as compared to the normal P-wave in a heartbeat and frequently occurring premature atrial contractions may increase heart rate as the R peaks occur more frequently in a given time-frame. Hence, the factors RR interval, presence or absence of P-wave and its distortion were an important indicator of premature atrial contractions and were used as features at the data analysis stage. The RR interval has been widely used in HRV analysis (Peltola 2012) in bedside monitors and wearable ECG kits, though due to the variability and complex non-linear dynamics of HRV analysis, it has been found difficult to identify patterns corresponding to particular heart arrhythmia. Although HRV analysis has been used to identify presence or absence of heart arrhythmia, it has been difficult to classify the types of heart arrhythmia solely based on HRV analysis.

4.3.2

Methods:

A novel feature extraction algorithm