[ACM Press the 13th International Conference - Ruse, Bulgaria (2012.06.22-2012.06.23)] Proceedings...

7
International Conference on Computer Systems and Technologies - CompSysTech12 Simulation of Heart Rate Variability Data with Methods of Wavelet Transform Galya Georgieva-Tsaneva, Mitko Gospodinov, Evgeniya Gospodinova Abstract: In the paper is described an algorithm for generating of realistic Heart Rate Variability (HRV) records. In the mathematical model are used two Gaussian distributions and wavelet transforms for generating a typical heart rate time series. The Respiratory Sinus Arrhythmia (RSA) and Mayer waves are incorporated in the proposed model. The obtained results show that the algorithm could be applied to clinical statistics based on HRV signals recorded by the patients. Key words: Heart Rate, electrocardiography, Heart Rate Variability (HRV), RR-interval, synthetic HRV data, Mayer waves, Respiratory Sinus Arrhythmia, rithmogram, tachogram, wavelet transformation. 1. INTRODUCTION Heart Rate Variability is a characteristic of the Heart Rate time series, which is used to study fluctuations of heart rate in short periods of time. The spectral analysis of HRV series establishes influence of the sympathetic and parasympathetic nervous system on cardiac activity [1]. In the medical practice, the high HRV is considered an indicator of good health [8]. In scientific studies HRV has been analyzed using various statistical tools and methods. These methods measure the degree of irregularity of the heart rate time series. The simulation of cardiological intervals is of particular importance for development of methods and tools for research in heart rate and its variability. The main purpose of this article is presentation of simulation algorithm for synthetic HRV data using Wavelet transform. 2. SYNTHETIC HEART RATE VARIABILITY DATA 2.1. HEART RATE TIME SERIES The time from one maximum point of the amplitude of the electrocardiogram to the next maximum point is determines as the duration of the RR-interval. RR-intervals vary over the time. Their variability is subject to HRV analysis for assessing the risk of cardiovascular disease. The sequence of times { 1,2,...n i , t i }, composed after the successful detection of all peaks, formed RR cardiological time series, where each RR- interval can be described by: 1 i i i t t RR (1) Respectively the corresponding sequence of instantaneous heart rates is defined as: i i RR 1 f (2) The introduced in 1996 HRV standard [6] recommends the evaluation of the spectral characteristics of short-term recordings can be performed on five-minute HRV series. The analysis of these records cover frequency band from 0 to 0.5 Hz. The frequency band is divided into low frequency (LF) band: from 0.04 to 0.15 Hz and high frequency (HF) band: from 0.05 to 0.5 Hz [4]. In healthy person differ first peak around 0.1 Hz due to Mayer wave and second peak around 0.25 Hz, reflecting the RSA influence. The result of the frequency and time-frequency analysis of the heart variability is Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. CompSysTech'12, June 22-23, 2012, Ruse, Bulgaria. Copyright ©2012 ACM 978-1-4503-1193-9/12/06...$10.00. 306

Transcript of [ACM Press the 13th International Conference - Ruse, Bulgaria (2012.06.22-2012.06.23)] Proceedings...

Page 1: [ACM Press the 13th International Conference - Ruse, Bulgaria (2012.06.22-2012.06.23)] Proceedings of the 13th International Conference on Computer Systems and Technologies - CompSysTech

International Conference on Computer Systems and Technologies - CompSysTech’12

Simulation of Heart Rate Variability Data with Methods

of Wavelet Transform

Galya Georgieva-Tsaneva, Mitko Gospodinov, Evgeniya Gospodinova

Abstract: In the paper is described an algorithm for generating of realistic Heart Rate Variability (HRV) records. In the mathematical model are used two Gaussian distributions and wavelet transforms for generating a typical heart rate time series. The Respiratory Sinus Arrhythmia (RSA) and Mayer waves are incorporated in the proposed model. The obtained results show that the algorithm could be applied to clinical statistics based on HRV signals recorded by the patients.

Key words: Heart Rate, electrocardiography, Heart Rate Variability (HRV), RR-interval, synthetic HRV data, Mayer waves, Respiratory Sinus Arrhythmia, rithmogram, tachogram, wavelet transformation.

1. INTRODUCTION Heart Rate Variability is a characteristic of the Heart Rate time series, which is used

to study fluctuations of heart rate in short periods of time. The spectral analysis of HRV series establishes influence of the sympathetic and parasympathetic nervous system on cardiac activity [1].

In the medical practice, the high HRV is considered an indicator of good health [8]. In scientific studies HRV has been analyzed using various statistical tools and methods. These methods measure the degree of irregularity of the heart rate time series. The simulation of cardiological intervals is of particular importance for development of methods and tools for research in heart rate and its variability.

The main purpose of this article is presentation of simulation algorithm for synthetic HRV data using Wavelet transform.

2. SYNTHETIC HEART RATE VARIABILITY DATA 2.1. HEART RATE TIME SERIES The time from one maximum point of the amplitude of the electrocardiogram to the

next maximum point is determines as the duration of the RR-interval. RR-intervals vary over the time. Their variability is subject to HRV analysis for assessing the risk of cardiovascular disease. The sequence of times { 1,2,...ni,ti � }, composed after the successful detection of all peaks, formed RR cardiological time series, where each RR-interval can be described by:

1iii ttRR ��� (1) Respectively the corresponding sequence of instantaneous heart rates is defined as:

ii RR

1f � (2)

The introduced in 1996 HRV standard [6] recommends the evaluation of the spectral characteristics of short-term recordings can be performed on five-minute HRV series. The analysis of these records cover frequency band from 0 to 0.5 Hz. The frequency band is divided into low frequency (LF) band: from 0.04 to 0.15 Hz and high frequency (HF) band: from 0.05 to 0.5 Hz [4]. In healthy person differ first peak around 0.1 Hz due to Mayer wave and second peak around 0.25 Hz, reflecting the RSA influence.

The result of the frequency and time-frequency analysis of the heart variability is

Permission to make digital or hard copies of all or part of this work for personal or classroom use is grantedwithout fee provided that copies are not made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee.

CompSysTech'12, June 22-23, 2012, Ruse, Bulgaria.Copyright ©2012 ACM 978-1-4503-1193-9/12/06...$10.00.

306

Page 2: [ACM Press the 13th International Conference - Ruse, Bulgaria (2012.06.22-2012.06.23)] Proceedings of the 13th International Conference on Computer Systems and Technologies - CompSysTech

International Conference on Computer Systems and Technologies - CompSysTech’12

creation of rithmograms, tachograms and spectrograms for presentation of the data [5]. The rithmogram is a graphical diagram that represents the dependence of RR-intervals as a function of time. Each vertical bar in ritmogram shows the length of the RR-interval. The duration varies from cycle to cycle and therefore reflects the regulatory activity of the nervous system on cardiac activity.

Time series of RR-intervals can be represented by a graph showing the change in time intervals. The structure of the tachogram is different for different people.

The type of the rithmogram and tachogram can be used for conclusion about the variability of the heart beat rhythm of the researched records.

2.2. ALGORITHM FOR SIMULATION OF HRV DATA The paper proposed an algorithm to simulate the HRV data, which is a modification

of the algorithm on a McSharry and Clifford [7]. In the new algorithm Inverse Fourier Transform is replaced by the Inverse Wavelet Transform.

The typical bimodal spectrum of the short sets of Heart Rate Variability data is created by the sum of two Gaussian distributions [7]:

� ����

� �� 2

1

21

21

21

1 2cffexp

с .2.σ(f)S�

,

and (3)

� ����

� �22

22

22

22

2 2cffexp

.с2.σ(f)S�

.

Where: f - frequency; 1f and 2f - means of frequency;

1с and 2c - standard deviations; 2

1 and 22 - power in the LF and HF bands.

The new algorithm for HRV data simulation consists of following steps: Step 1 – Initialization of the input parameters: 21, ff - means of frequency,

corresponding to Mayer waves at the LF (Low Frequency) band and RSA at the HF (High Frequency) band; 1с 2c - standard deviations in equations (3); N – number of RR generated intervals.

Step 2 – Establishing the frequency sequence of N values { Nfff ,...,, 21 }, distributed in

the interval (0.05, 0.4) Hz. This interval is used in the spectral analysis of the short sets of HRV data.

Step 3 – Generation of frequency complex numbers sequence { Nzzz ,...,, 21 }. The

amplitude are determined by the formula: iz = )( ifS , where )( ifS is a summary bimodal power spectrum. The spectrum )( ifS is obtained by the summation of )(1 ifS and )(2 ifS by the formulas (3). The phases of complex numbers are generated by random distribution in the interval (0, �2 ).

Step 4 – Calculation of the Inverse Wavelet Transformation of the generated complex

frequency sequence { Nzzz ,...,, 21 } (using the wavelet Daubechies basis ). This generates a complex time series { Nttt ,...,, 21 } corresponding to the frequency series.

307

Page 3: [ACM Press the 13th International Conference - Ruse, Bulgaria (2012.06.22-2012.06.23)] Proceedings of the 13th International Conference on Computer Systems and Technologies - CompSysTech

International Conference on Computer Systems and Technologies - CompSysTech’12

Step 5 – Multiply the values (resulting time series) by appropriate scaling factors and

offset constants added to obtain the specified means of frequency and standard deviations.

2.3. WAVELET TRANSFORM The wavelet transform is mathematical tool for representing signals as sum of “small

waves”. It is a better substitute of the Fourier transform. The Fourier transform is used to transform a signal from the time domain to the frequency domain. The signal is transformed into a sum of sinusoid of different frequencies. The Fourier transform cannot present information about the time. The wavelet transform is capable of providing the time and frequency information of a signal simultaneously. This transform is analyzed non-stationary signals with sudden peaks, without losing information on low or high frequency and time domain [2].

The basic algorithm of the wavelet transform is shown in Figure 1. This simple filter algorithm performs a one-dimensional one-scale wavelet transform on any one-dimensional input sequence. It uses the pyramidal algorithm shown in Figure 2. This algorithm is based on two filters (G0 and G1) that are derived from the scaling function and mother wavelet chosen for the transformation. G1 is high-pass wavelet filter and G0 is the complementary low-pass wavelet filter. The outputs are the low-pass residue for the G0 filter branch, represented by Approx, and the high-pass sub-band for the G1, branch, represented by Detail [2].

X(t)

G1 2

2

Detail

G0 Approx

Figure 1. Basic algorithm for the wavelet transform

The computational cost of the pyramidal algorithm is O(n), which is lower than the cost of the FFT algorithm O(nlogn).

X(t)

G1 2

2

Detail1

G0 G1

G0

2 Detail2

2 G1 2 Detail3

G0 2 Approx3

Approx2

Approx3

Figure 2. Recursive pyramidal algorithm for the multi-scale wavelet transform Multi-Resolution Analysis The wavelet transform is based on the concept of Multi-Resolution Analysis (MRA).

MRA considers the information at different resolutions or scales. Fourier transforms are constant resolution based, because they involve single forward/reverse transforms that convert data to/from a different representation.

The MRA consists of collection of nested subspaces {Vi, i�Z}, satisfying the following properties [2]:

1. ii VV �� },0{� is dense in Hilbert space L2(R);

308

Page 4: [ACM Press the 13th International Conference - Ruse, Bulgaria (2012.06.22-2012.06.23)] Proceedings of the 13th International Conference on Computer Systems and Technologies - CompSysTech

International Conference on Computer Systems and Technologies - CompSysTech’12

2. 1�� ii VV ; 3. 0)2()( VtxVtx i

i ��� ; 4. The function )(0 t� in vector V0 is called the scaling function and the collection

{ }),(0 Zjjt ��� is an orthonormal basis for V0. The input signal is represented in terms of dilated versions of a prototype of high-

pass wavelet function ( ji ,� ) and shifted version of a low-pass scaling function ( ji ,� ), based on the scaling function ( 0� ) and the mother wavelet basis function ( 0� ). The relationship between these function are:

Z.j j),t(2φ2(t)φ i

0i/2

ji, ��� �� (4)

Z.j j),t(2ψ2(t)ψ j0

j/2ji, ��� �� (5)

The approximation information of sequence x is given by:

(t)j)φ(i,a=(t)approxj

ji,xi . (6)

Where the coefficient j)(i,ax is given by calculating the inner product of x: >φx,=<j)(i,a ji,x . (7)

The detail information (detaili) of sequence x is given by: (t)j)ψ(i,d=(t)detail ji,

jxi . (8)

Where the coefficient j)(i,dx is given by calculating the inner product of x: >ψx,=<j)(i,d ji,x . (9)

MRA represent the information about sequence x as a collection of details and a low-resolution approximation:

(t)detail+(t)approx=x(t)N

1=iiN (10)

j

N

1i= jji,xjN,x (t).j)ψ(i,d+(t)j)φ(N,a=

The function 0φ produces an approximation of signal x and it must be a low-pass filter. The mother wavelet function 0ψ must be high-pass filter, and it performs a differential operation on the input signal to produce the detail version.

3. RESULTS AND DISCUSSIONS Figure 3 shows a RR rithmogram of one-minute HRV series generated with mean

heart rate 60 bpm.

00,20,40,60,8

11,21,4

1 6 11 16 21 26 31 36 41 46 51 56RR interval (index)

RR

inte

rval

(sec

)

Fig.3. RR rithmogram of one-minute HRV series generated

309

Page 5: [ACM Press the 13th International Conference - Ruse, Bulgaria (2012.06.22-2012.06.23)] Proceedings of the 13th International Conference on Computer Systems and Technologies - CompSysTech

International Conference on Computer Systems and Technologies - CompSysTech’12

The graphic of figure 4 presents the cardiological sequence, generated by the new

algorithm. Figure 5 shows corresponding instantaneous heart rate.

0,5

0,7

0,9

1,1

1,3

1,5

0 50 100 150 200 250 300Time (sec)

RR

inte

rval

s (s

ec)

Fig. 4. Generated five-minute series

0,5

0,7

0,9

1,1

1,3

1,5

0 50 100 150 200 250 300Time (sec)

Hea

rt R

ate

(bpm

)

Fig. 5. Instantaneous value of heart rate The algorithm is analysed by creating a different number of RR-intervals and by

different wavelet bases (Haar and Daubechies with 4,6, 8,10, 12 and 20 coefficients). The obtained results show that the test wavelet bases are suitable for generating a time series. The results show that with orthogonal wavelet Daubechies basis (Db2, Db4, Db6, Db8, Db10, Db12 and Db20) is given different percentage zeros. These values obtained by averaging the 200 generated series are shown in Table 1.

Table 1. The results of studies with different basis

Number of coefficients

Daube-chies 2

Daube-chies 4

Daube-chies 8

Daube-chies 10

Daube-chies 12

Daube-chies 20

Percentage of zeros

1.563

3.125

12.109

14.844

18.359

28.906

The high percentage of zeros indicates equal durations of the large number of

consecutive cardiac cycles, indicating a rhythmic heartbeat. Choosing a different basis (with 2, 4, 8, 10, 12, 20 coefficients) allows to simulate different types of heartbeat according to specific clinical trials.

The results of the comparison between the original algorithm and the modified algorithm in terms of CPU time are given in Table 2 and Table 3. The results in Table 3 were obtained with a wavelet Daubechies basis with 8 coefficients and fourth level of decomposition.

310

Page 6: [ACM Press the 13th International Conference - Ruse, Bulgaria (2012.06.22-2012.06.23)] Proceedings of the 13th International Conference on Computer Systems and Technologies - CompSysTech

International Conference on Computer Systems and Technologies - CompSysTech’12

Table 2. CPU time to simulate HRV data by Fourier transformation

Length of series

256 (1 series)

512 (2 series)

1024 (3 series)

2048 (4 series)

4096 (5 series)

CPU time

(sec.)

0.016

0.078

0.437

1.719

7.516

Table 3. CPU time to simulate HRV data by Daubechies transformation

Length of series

256 (1 series)

512 (2 series)

1024 (3 series)

2048 (4 series)

4096 (5 series)

CPU time

(sec.)

0.00

0.032

0.032

0.093

0.188

For analysis and testing of both algorithms was developed program of Visual C++.

The research on Wavelet Transform was conducted on different wavelet Daubechis bases. Significant differences in performance when using different wavelet bases not found. The described studies were performed with processor Pentium IV, 1.50 GHz, 512 MB RAM.

In Fig. 6 shows performance of both algorithms. The studies were performed with different wavelet Daubechies bases. Research shows from 4 to 50 time higher performance of the algorithm using wavelet transformation.

0

0,1

0,2

0,3

0,4

0,5

0,6

0 1 2 3 4 5 6Number of sets

CP

U ti

me

( sec

)

Fourier transformDb4Db8Db10Db12Db20

Fig. 6 Performance of both algorithms. CONCLUSIONS In the proposed algorithm for generating synthetic HRV data the Inverse Fourier

transform (of the complex frequency sequence) is replaced with the Inverse Wavelet transform, wavelet Daubechies basis. The comparative analysis shows several times higher performance of the new algorithm using wavelet transform. Thus it can be argued that the developed and programmed algorithm using Daubechies transform is better that the original algorithm. The proposed algorithm can be successfully used in biomedical signal processing techniques.

311

Page 7: [ACM Press the 13th International Conference - Ruse, Bulgaria (2012.06.22-2012.06.23)] Proceedings of the 13th International Conference on Computer Systems and Technologies - CompSysTech

International Conference on Computer Systems and Technologies - CompSysTech’12

REFERENCES [1] Abry, P., H.Wendt, S.Jaffard, H.Helgason, P.Goncalv’es. Methodology for

Multifractal Analysis of Heart Rate Variability: From LF/HF Ratio to Wavelet Leaders. Engineering in Medicine and Biology Society, 2010, pp.106-109.

[2] Abry, P., D.Veitch. A wavelet-based joint estimator of the parameters of long-range dependence. IEEE Transactions of Information Theory, vol.45,1999.

[3] Acharya, U.R., K.P. Joseph, N. Kannathal, C.M. Lim, J.S. Suri. Heart Rate Variability: a review, Med.Bio Eng.Comput, Vol. 44, 2006.

[4] Clifford, G., F. Azuaje, P. McSharry, Advanced Methods and Tools for ECG Data Analysis, Artech House, 2006.

[5] Laguna, P., G.B. Moody, R. G. Mark, Power spectral density of unevently sampled data by least-square analysis: performance and application to heart rate signals. IEEE Trans.Biomed.Eng., Vol.45, 1998.

[6] Malik, M. Heart Rate Variability. Standards of measurement, physiological interpretation and clinical use. European Heart Journal, 17, 1996.

[7] McSharry, P.E., Clifford G., Tarassenko L. Smith L.A. A dynamical model for generating synthetic electrocardiogram signals. IEEE Trans.Biomed.Eng., Vol.50, 2003.

[8] Van, J., M.Porath, C. Peters, S. Oei. Spectral analysis of the fetal heart rate variability for fetal surveillance: review of the literature. Acta obstetrica et Gynecologica, vol. 87, 2008.

ABOUT THE AUTHOR Assistant Prof. Galya Georgieva-Tsaneva, Institute of Systems Engineering and

Robotics, Bulgarian Academy of Sciences, Phone: +359 62 635953, Е-mail: [email protected].

Assoc. Prof. Mitko Gospodinov, PhD, Institute of Systems Engineering and Robotics, Bulgarian Academy of Sciences, Phone: +359 62 635953, Е-mail: [email protected].

Assistant Prof. Evgeniya Gospodinova, PhD, Institute of Systems Engineering and Robotics, Bulgarian Academy of Sciences, Phone: +359 62 635953, Е-mail: [email protected].

312