real-time heart rate variability extraction using the kaiser window

16
990 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 10, OCTOBER 1997 Real-Time Heart Rate Variability Extraction Using the Kaiser Window Saeid Reza Seydnejad,* Student Member, IEEE, and Richard I. Kitney Abstract— A new method for real-time heart rate variability (HRV) detection from the R-wave signal, based on the integral pulse frequency modulation (IPFM) model and its similarity to pulse position modulation, is presented. The proposed method exerts lowpass filtering with a Kaiser window. It can also be used for off-line HRV analysis in both the time and frequency domains. Real-time bandpass filtering as a new HRV investigation method and as a by-product of the proposed algorithm is also introduced. Furthermore, the discrete time domain version of the French- Holden algorithm is developed, and it is thoroughly proved that lowpass filtering is an ideal method for detection of HRV. Index Terms— Cardiovascular system, nervous system, pulse position modulation, point processes, signal sampling/ reconstruction. I. INTRODUCTION O VER THE last 20 years, special attention has been given to the analysis of the heart rate variability (HRV) and its relation to the other physiological signals. But, a problem not yet satisfactorily resolved concerns the correct detection of the HRV from interval variations. In this paper we tackle this problem and propose a real-time method for HRV detection. It is well known that spontaneous fluctuations in the heart rate are mainly caused by continuous activity of the autonomic nervous system. This activity modulates the natural rhythm of the sinoatrial (SA) node which is finally reflected in the interval variations between successive R peaks of the electrocardiogram (ECG). There are two common approaches for the HRV detection. The first method looks at the R-wave signal on a beat-by-beat basis and tries to extract the hidden information directly from the interval variations [1]–[4]. The second method assumes a physiological-based model for the generation of the R-wave signal and utilizes the characteristics of this model for detecting the HRV signal [5], [6]. Of the two methods, the latter is considered to be better and the popular integral pulse frequency modulation (IPFM) model has been accepted as a plausible physiological basis for functional representation of the SA node and deriving the HRV signal [5]–[8]. IPFM has also been used as a suitable model for the generation of neuronal spikes [9]. From this standpoint there is commonality between this area and HRV signal extraction. These two topics come under the general area of point processes analysis [10]. Manuscript received March 15, 1996; revised May 9, 1997. Asterisk indicates corresponding author. *S. R. Seydnejad is with the Department of Electrical Engineering and Centre for Biomedical and Medical Systems, Imperial College, Exhibition Road, London SW7 2BT U.K. (e-mail: [email protected]). R. I. Kitney is with The Sir Leon Bagrit Centre, Centre for Biomedical and Medical Systems, Imperial College, London SW7 2BX U.K. Publisher Item Identifier S 0018-9294(97)06904-8. Bayly has derived the expression of the IPFM output signal in the case of a single sinusoidal excitation [9]. He has shown that, with certain conditions, extraction of the excitation signal is possible by lowpass filtering. In a separate study French and Holden proposed the lowpass filtering method for conversion of a spike series signal to equispaced samples suitable for estimation of power spectral density (PSD) through the fast Fourier transform (FFT) algorithm, irrespective of the IPFM model [11]. The French–Holden (F-H) algorithm thereafter was employed for HRV signal extraction from the R-wave signal and it was called the lowpass filtered event series (LPFES) method [8]. Many investigators since then tried to present a new method for extraction of the coded information from the R-wave signal. They used the IPFM model for confirmation of their proposed methods regardless of its characteristics. Herein, we scrutinise the IPFM model and its coding characteristics based on its similarity to pulse position modulation (PPM). Organization of the paper is as follows. Theoretical devel- opment of the IPFM model is fulfilled in Sections II, III, and IV. In Section II we present the IPFM model and define the specific problem to be addressed. Section III discusses the F-H algorithm, its advantages, disadvantages and its reformulation. Section IV presents the PPM equivalent of the IPFM model. Based on this similarity, it will be shown that ideal lowpass filtering is the only reliable HRV detection method. Practical implementation of the lowpass filtering, suitable for HRV analysis, and its pertinent results are subjects of Sections V, VI, and VII which can be studied rather independently from the theoretical sections. In Section V real-time HRV signal detection is discussed and it will be argued that the proposed method gives an optimum result for retrieving the desired signal and rejecting the interfering components both in frequency and time domains. Section VI describes real- time, narrow-band, demodulation of the R-wave signal using a bandpass filtering technique. Finally, the effectiveness of the method, developed in the paper, is illustrated in the form of two physiological examples in Section VII. II. IPFM MODEL The R peaks in the ECG signal are considered to be reliable indicators of the depolarization rate of the SA node. In order to detect the R peaks, the ECG is first digitised and then, using a peak detection algorithm, their times of occurrence are determined. The location of the R peaks is normally shown by straight lines of unit amplitude (or impulse functions, as described later). Hence, the R-wave signal comprises straight lines at the occurrence of the R peaks and zero elsewhere 0018–9294/97$10.00 1997 IEEE

Upload: ri

Post on 21-Sep-2016

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Real-time heart rate variability extraction using the Kaiser window

990 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 10, OCTOBER 1997

Real-Time Heart Rate Variability ExtractionUsing the Kaiser Window

Saeid Reza Seydnejad,*Student Member, IEEE, and Richard I. Kitney

Abstract—A new method for real-time heart rate variability(HRV) detection from the R-wave signal, based on the integralpulse frequency modulation (IPFM) model and its similarity topulse position modulation, is presented. The proposed methodexerts lowpass filtering with a Kaiser window. It can also be usedfor off-line HRV analysis in both the time and frequency domains.Real-time bandpass filtering as a new HRV investigation methodand as a by-product of the proposed algorithm is also introduced.Furthermore, the discrete time domain version of the French-Holden algorithm is developed, and it is thoroughly proved thatlowpass filtering is an ideal method for detection of HRV.

Index Terms—Cardiovascular system, nervous system, pulseposition modulation, point processes, signal sampling/reconstruction.

I. INTRODUCTION

OVER THE last 20 years, special attention has been givento the analysis of the heart rate variability (HRV) and its

relation to the other physiological signals. But, a problem notyet satisfactorily resolved concerns the correct detection ofthe HRV from interval variations. In this paper we tackle thisproblem and propose a real-time method for HRV detection.

It is well known that spontaneous fluctuations in the heartrate are mainly caused by continuous activity of the autonomicnervous system. This activity modulates the natural rhythmof the sinoatrial (SA) node which is finally reflected inthe interval variations between successive R peaks of theelectrocardiogram (ECG). There are two common approachesfor the HRV detection. The first method looks at the R-wavesignal on a beat-by-beat basis and tries to extract the hiddeninformation directly from the interval variations [1]–[4]. Thesecond method assumes a physiological-based model for thegeneration of the R-wave signal and utilizes the characteristicsof this model for detecting the HRV signal [5], [6]. Of thetwo methods, the latter is considered to be better and thepopular integral pulse frequency modulation (IPFM) model hasbeen accepted as a plausible physiological basis for functionalrepresentation of the SA node and deriving the HRV signal[5]–[8]. IPFM has also been used as a suitable model forthe generation of neuronal spikes [9]. From this standpointthere is commonality between this area and HRV signalextraction. These two topics come under the general area ofpoint processes analysis [10].

Manuscript received March 15, 1996; revised May 9, 1997.Asteriskindicates corresponding author.

*S. R. Seydnejad is with the Department of Electrical Engineering andCentre for Biomedical and Medical Systems, Imperial College, ExhibitionRoad, London SW7 2BT U.K. (e-mail: [email protected]).

R. I. Kitney is with The Sir Leon Bagrit Centre, Centre for Biomedical andMedical Systems, Imperial College, London SW7 2BX U.K.

Publisher Item Identifier S 0018-9294(97)06904-8.

Bayly has derived the expression of the IPFM output signalin the case of a single sinusoidal excitation [9]. He hasshown that, with certain conditions, extraction of the excitationsignal is possible by lowpass filtering. In a separate studyFrench and Holden proposed the lowpass filtering methodfor conversion of a spike series signal to equispaced samplessuitable for estimation of power spectral density (PSD) throughthe fast Fourier transform (FFT) algorithm, irrespective ofthe IPFM model [11]. The French–Holden (F-H) algorithmthereafter was employed for HRV signal extraction from theR-wave signal and it was called the lowpass filtered eventseries (LPFES) method [8]. Many investigators since thentried to present a new method for extraction of the codedinformation from the R-wave signal. They used the IPFMmodel for confirmation of their proposed methods regardlessof its characteristics. Herein, we scrutinise the IPFM modeland its coding characteristics based on its similarity to pulseposition modulation (PPM).

Organization of the paper is as follows. Theoretical devel-opment of the IPFM model is fulfilled in Sections II, III, andIV. In Section II we present the IPFM model and define thespecific problem to be addressed. Section III discusses the F-Halgorithm, its advantages, disadvantages and its reformulation.Section IV presents the PPM equivalent of the IPFM model.Based on this similarity, it will be shown that ideal lowpassfiltering is the only reliable HRV detection method. Practicalimplementation of the lowpass filtering, suitable for HRVanalysis, and its pertinent results are subjects of SectionsV, VI, and VII which can be studied rather independentlyfrom the theoretical sections. In Section V real-time HRVsignal detection is discussed and it will be argued that theproposed method gives an optimum result for retrieving thedesired signal and rejecting the interfering components bothin frequency and time domains. Section VI describes real-time, narrow-band, demodulation of the R-wave signal usinga bandpass filtering technique. Finally, the effectiveness of themethod, developed in the paper, is illustrated in the form oftwo physiological examples in Section VII.

II. IPFM MODEL

The R peaks in the ECG signal are considered to be reliableindicators of the depolarization rate of the SA node. In orderto detect the R peaks, the ECG is first digitised and then,using a peak detection algorithm, their times of occurrence aredetermined. The location of the R peaks is normally shownby straight lines of unit amplitude (or impulse functions, asdescribed later). Hence, the R-wave signal comprises straightlines at the occurrence of the R peaks and zero elsewhere

0018–9294/97$10.00 1997 IEEE

Page 2: Real-time heart rate variability extraction using the Kaiser window

SEYDNEJAD AND KITNEY: REAL-TIME HRV EXTRACTION USING THE KAISER WINDOW 991

(a)

(b)

Fig. 1. (a) ECG and (b) the corresponding R-wave signal obtained byreplacing each R-peak with a unit sample function.

(Fig. 1). The sampling frequency of the ECG determines theresolution in the locations of the R peaks [12]. For credibleHRV detection the sampling frequency is usually selected tobe more than 300 Hz. The digitized R-wave signal is then usedas the basic signal for HRV investigation.

Theoretically, the R-wave signal can be produced by theIPFM model as shown in Fig. 2(a). Referring to the figure,the excitation signal, , consists of a dc component, ,and an ac part, The integral of is compared withthe threshold level Whenever these two values becomeequal, a spike, which corresponds to an R peak, is producedat the output and the integrator resets simultaneously. When

is equal to zero the intervals between spikes remain thesame. Therefore, in the case of variable intervals, estimationof will be the objective.

Clearly, the IPFM is a nonlinear model. Bayly [9] has shownthat in the case of a sinusoidal excitation, the PSD of the

(a)

(b)

Fig. 2. (a) IPFM model and (b) output power spectrum for sinusoidalexcitation at frequencyfm:

output signal [Fig. 2(b)] comprises one frequency componentat the frequency of excitation, and an infinite numberof components at where is the free-runningfrequency of the IPFM He also argued that ifthe free-running frequency is high enough and the modulationdepth sufficiently low then can be recovered by lowpassfiltering. This will be discussed in Section III.

III. FRENCH–HOLDEN ALGORITHM

Analysis of the HRV signal has been of particular interesteither in frequency domain, such as investigation in thePSD and system identification by spectral analysis, [2], [13]or in time domain, which is basically used for parametricsystem identification of the cardio-respiratory system [14]. Aspreviously mentioned, French and Holden described imple-mentation of an ideal lowpass filter for estimation of the PSDof a spike series signal [11]. To formulate the F-H algorithmassume a typical R-wave signal shown in Fig. 1(b). If thissignal is passed through an ideal lowpass filter with impulseresponse (cutoff frequency the output will be

(1)

in which * denotes the convolution operator, is theR-wave signal

(2)

and is the occurrence time of theth peak. Therefore

(3)

By choosing a suitable value for will be the modu-lating signal of the interspike intervals plus a dc term. This isso since lowpass filtering in the form of (3) removes all theundesired components of the spike series signal of (2) whilepreserving the desired low-frequency components [e.g.,in Fig. 2(b)]. Although (3) results in a very simple detection

Page 3: Real-time heart rate variability extraction using the Kaiser window

992 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 10, OCTOBER 1997

technique, it is computationally inefficient because frequencycomponents of the modulating signal, namely, the HRV signal,are less than a hertz while the sampling frequency of theECG and, therefore, the R-wave signal is much higher, forinstance 300 Hz. A considerable amount of data reductioncan be obtained by employing a down-sampling method inthe discrete time domain or sampling at a lower frequency inthe continuous time domain. Since after lowpass filtering thehighest possible frequency is, a sampling frequency orhigher would be appropriate to satisfy the Nyquist limit. Inthe case of , a simple result is obtained

(4)

where denotes the sampled signal. Therefore, the mag-nitude of the th sample is

(5)

Equation (5) is the usual form used in the F-H algorithm.Although the above equations were presented in the contin-

uous time domain, all the intermediate stages are processedin the discrete time domain. In the following, the discretetime domain counterpart of the F-H algorithm is illustrated.This will be of importance when we are considering real-timelowpass filtering in Section V.

As previously stated, the R-wave signal is obtained from thesampled version of the ECG signal [Fig. 3(a)]. This conversioncan be described as the sampling of the continuous time R-wave signal, on condition that all the R peaks can be accuratelylocated by regular samples [Fig. 3(b)]. The sampled R-wavesignal, can be expressed as

(6)

whereat R peaksotherwise.

(7)

In the discrete time domain is defined as

In the frequency domain this transformationdivides all the true frequency components by , where

is the sampling frequency of the ECG signal.In the simple case of the sinusoidal excitation, is nowconverted to By passing through a lowpassfilter, , it follows that

(8)

(a)

(b)

Fig. 3. (a) Generation of the sampled R-wave signal from ECG. (b) Gen-eration of the sampled R-wave signal from the presumed continuous timeR-wave signal.

While may be as large as 1000 Hz, can be as smallas 0.1 Hz. Since after lowpass filtering the area of interestoccupies only a very small portion of the entire spectrum,

can be sampled with sampling frequency, provided

that the Nyquist criterion is satisfied. If , then thesampled signal can be represented by

(9)

Finally, by decimation [15], the number of samples can bereduced by if we define

(10)

All the previous stages can be summarized as

(11)

Thus, the th sample is equal to

(12)

In the discrete time domain becomes , but the sincshape of the impulse response of the lowpass filter does notchange. Hence

(13)

Page 4: Real-time heart rate variability extraction using the Kaiser window

SEYDNEJAD AND KITNEY: REAL-TIME HRV EXTRACTION USING THE KAISER WINDOW 993

Therefore, the th sample will be

(14)

where

at R peaksotherwise.

(15)

Now by choosing , which corresponds to thesampling of the continuous-time lowpass signal with frequency

, the th sample will be equal to

(16)

which is identical to (5). Therefore, the above procedure isan alternative way to describe HRV signal detection using theF-H algorithm. Equations (11) and (12) will be used for ourtreatment in Section V.

Even though the F-H algorithm is considered to be alias free,its implementation is not ideal. The error which is produced byshort data lengths has been considered by Peterka [16]. But,this error, as shown in the next paragraph, is neither the onlysource of error, nor is it limited to the F-H method [17].

In real cases, because of the nonstationary nature of the HRVsignal, the length of data is selected to be as small as possible.This situation can be modeled by windowing of an infinitelength of data with a rectangular window as shown in theleft part of Fig. 4. Shortening of the data causes smearing andspectral leakage in the PSD estimation [18]. This is because theFourier transform of the window function (sinc function in thecase of rectangular window) is convolved with the frequencycomponents of the HRV signal. Clearly, this problem arisesfrom selection of a short length of data and is independent ofthe HRV signal detection technique. Inasmuch as the lengthof the available data is, say, the length of the output signalfrom the F-H algorithm must be limited to Since the sincinterpolation function of the ideal LPF in Fig. 4 has an infinitelength, the reconstructed signal also has an infinite length. Thetruncation of this signal, which again can be modeled as themultiplication by a rectangular window, is the second sourceof error as shown in the right part of Fig. 4. It is noted thatis very small, thus, the sinc functions, located at each R peak,spread over a broad area, whereas the reconstructed signal isconfined to length only. This second windowing operationmanifests itself as the second smearing effect in the frequencydomain and is an inherent problem of the F-H algorithm. Bythis operation, each frequency component of the HRV signalis again convolved with a sinc function. Hence, the secondsmearing effect is as strong as the first one.

Fig. 4. Modeling of the short length of data by multiplication with rectan-gular windows.

IV. PULSE POSITION MODULATION (PPM)AND ITS RELATION TO THE IPFM MODEL

The similarity between base-band PPM signal and the IPFMoutput signal will now be discussed and used as the basisfor developing a more general scheme for the HRV signaldetection.

In PPM the message signal changes the location of asequence of impulse functions [19]. If the message signalis zero, the modulator generates a series of impulses withequal intervals as it is depicted on the left-hand side ofFig. 5(b). By injection of the message signal the position ofeach impulse function varies according to the amplitude of themessage signal as shown in the right-hand side of Fig. 5(b).There are two kinds of PPM techniques; uniform samplingand natural sampling. If denotes the message signal, thenatural sampling PPM is defined as

(17)

where is the free-running period (no message signal).Condition prevents overlapping of the successiveimpulses. It guarantees a single solution for the equation

and, thus, ([19], Appendix B).Equation (17) is identical to the describing equation of the

R-wave signal, expressed by (2). Zeeviet al. [20], [21] haveconsidered this similarity in detail. They concluded that theoutput signal from a PPM modulator is exactly equal to theR-wave signal generated by the IPFM model provided that(Appendix A)

(18)

and From this identity, it follows that

(19)

(20)

Regarding the similarity between the IPFM model and PPM,for which comprehensive theoretical studies exist, the func-tional performance of the IPFM model can now be elucidatedand an appropriate HRV detection method can be derived.

Page 5: Real-time heart rate variability extraction using the Kaiser window

994 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 10, OCTOBER 1997

Fig. 5. PPM and pulse duration modulation (PDM). (a) The message signal, (b) the corresponding PPM signal, and (c) the corresponding PDM signal.

It is shown in Appendix B that (17) can be written as

(21)

Equation (21) reveals that comprises three terms; a dccomponent, a term proportional to , and the derivativeof a series of phase modulated signals. The phase-modulatedsignals are with carrier frequencies and withthe modulating signals proportional to and the order ofharmonic. It can be shown that when is a sinusoidal signal,then the frequency spectrum of will be equal to the resultsobtained by Bayly [9], providing that (19) and (20) hold.

In communication theory, demodulation of the PPM signalis achieved by conversion to the corresponding PDM signaland then lowpass filtering. The natural PDM signal is definedas [19]

(22)

This equation implies that in PDM the message signal modu-lates the width of a series of rectangular pulses as illustratedin Fig. 5(c). It is easy to show that PDM and PPM signalsare related by

(23)

Using (21) and (23) it is proved in Appendix B that

(24)

Equation (24) shows that the PDM signal is the sum of fourterms: a dc component, a term proportional to , discretesinusoidal components at the pulse repetition frequency andits harmonics, and a phase-modulated signal. Now supposethat and that is essentially confined to aband where Then, the spectral densities of thephase modulated signals [the final summation of (24)] will beessentially confined to narrow regions around [19].Bearing in mind that the frequency components of the firstsummation of (24) only exist at , it is concluded

Page 6: Real-time heart rate variability extraction using the Kaiser window

SEYDNEJAD AND KITNEY: REAL-TIME HRV EXTRACTION USING THE KAISER WINDOW 995

(a)

(b)

(c)

Fig. 6. (a), (b) Alternative methods for detecting the message signal fromthe PPM, and (c) from the IPFM output signals.

that is recoverable by passing the PDM signal through alowpass filter with a suitable cutoff frequency. Consequently,(23) can be written as

(25)

Using (21), the frequency components of the second termof the right-hand side of (25) comprises only the termsat Hence, for frequencies less than the free-runningfrequency, can be viewed as the integration ofTherefore, the demodulation algorithm can be summarized as itis shown in Fig. 6(a). It is also possible to change the sequenceof integration and lowpass filtering as shown in Fig. 6(b).However, according to (18), is equal to the derivativeof the PPM modulating signal except for a dc value. Thus,extraction of the HRV signal, , can be accomplished byusing an appropriate lowpass filter as illustrated in Fig. 6(c).This is the crucial point for correct detection of the HRV.This filter should retain the desired signal, , whileremoving all the higher components. To do so, it needs tohave a flat response up to the highest frequency ofand maximum attenuation for the disturbing components. Thecutoff frequency is chosen according to the value of the free-running frequency and the maximum frequency of[Fig. 2(b) and (21)]. In practical applications half of the free-running frequency is often a desired selection.

Evidently, implementation of an ideal lowpass filter is im-possible and a realizable filter always includes constructionalerrors. Lowpass filtering can also be interpreted, roughly, asthe time averaging of the signal. Indeed, many of the otherHRV detection methods from the R-wave signal (as well asfrom neuronal spikes) use a kind of time averaging algorithm[22]–[25]. Convolution with a rectangular window in the timedomain is the common point of many of these algorithms.deBoeret al.have compared the F-H algorithm with two othermethods and concluded that lowpass filtering gives a superiorresult [7]. Berger has presented an algorithm based on countingthe number of events in a bin, which is not causal and canbe considered as convolution with a rectangular function [23].Coenenet al.have proposed a real-time method based upon theIPFM model and the F-H algorithm [26]. They used a squared-

cosine filter instead of a rectangular-shape filter, hence, theyhad to reduce the cutoff frequency or define dummy pulseswhich resulted in a frequency dependent filter. Also, they donot introduce any criterion for the selection of the filter delay.Recently, Noguchiet al. have proposed a very simple methodwhich is also real time [24]. However, their approach is onlya rough approximation of the lowpass filtering.

It should be pointed out here that the IPFM model has beenused by these authors for justification of their proposed HRVdetection algorithms. However, the equivalence between thePPM and IPFM outputs and the foregoing analysis impliesthat only ideal lowpass filtering of the R-wave signal gives thetrue HRV signal. By applying this fact and noting the sparseproperty of the R-wave signal, we use the Kaiser-windowedlowpass filter in Section V to propose a real-time techniquefor extraction of the HRV.

V. REAL-TIME HRV SIGNAL EXTRACTION

A. The New Method

All the existing algorithms for HRV signal detection suffereither from being noncausal methods (they need the futurevalues of the R-wave signal) or they have poor resolution. Asalready stated, the R-wave signal is available in the form ofa discrete time signal. In view of this fact and the conceptspresented in previous section, plus invoking some notions fromdiscrete time signal processing techniques, we are led to theuse of the finite impulse response (FIR) lowpass filtering forHRV signal detection. This FIR filter can also prevent phasedistortion which arises in other real-time algorithms.

In FIR filter design, the windowing method is very straight-forward. Even though employing conventional windows suchas Hanning or Hamming may seem easier, the Kaiser win-dow, because of its behavior in side lobe reduction and itsmaximally flat characteristic in the passband, is an optimumselection among windowed-type FIR filters [15]. Nevertheless,delineation of this filter, as will be shown later, is veryconvenient so it does not increase the complexity of thedetection.

Equation (11) presents a general expression for the HRVsignal extraction and (12) gives the magnitude of thethsample. Here, it is sufficient to replace with the impulseresponse of the Kaiser-windowed lowpass filter which is [15]

otherwise(26)

where denotes the zeroth-order modified Bessel functionof the first kind. is the width of the window and is theshape parameter. Increasingdecreases the main lobe width,but increases the output delay, which is equal to Onthe other hand, increasing decreases sidelobes amplitudes,

Page 7: Real-time heart rate variability extraction using the Kaiser window

996 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 10, OCTOBER 1997

but increases the main lobe width. If the peak amplitude ofthe Fourier transform of the Kaiser window in the stopband

region is represented by and , then theempirical values of and are given by [15]

(27)

(28)

in which denotes the transition band in Hz. In real-timeHRV detection the delay of the filter is of importance. Ifrepresents the time delay in seconds, then

(29)

A number of parameter choices can be thought of, but somecompromises should also be kept in mind. First, better per-formance of the filter can be obtained by choosing largervalues of , but it increases the number of filter coefficientsand, so, the amount of computations. It also degrades theon-line characteristic of the filter. Second, and areconflicting factors, however, they are not critical in the filterdesign. Considering the PSD of the HRV signal [Fig. 2(b)and (21)], having 40 dB for the minimum attenuation in thestopband region will be a reasonable choice. This attenuationcorresponds to Next, by substituting the value offrom (29) into (28) it follows that

(30)

Equation (30) imposes higher time delay for getting lowertransition band. Further, (26) can be expressed as

otherwise(31)

in which, for notational brevity, denotes the Kaiserwindow [the second fraction of (26)]. Once the Kaiser windowcoefficients are calculated, they can be replaced byin (30), thus, implementation of the proposed algorithm isexceedingly simple. The number of coefficients in the FIRfilter, represented by (31), is which is very large.However, the R-wave signal is sparse; its value is often equalto zero. Hence, in the whole length of the FIR filter only a fewnonzero points of the R-wave signal may take place. Therefore,the number of calculations for each output sample reduces toa few additions. The sparse property is of great value in theproposed real-time HRV signal detection method.

To recapitulate, the main steps involved in the proposedalgorithm are as follows.

1) Assume a real-time ECG signal that is being sampled atfrequency Select a desired value for , the highestfrequency component of the HRV signal.

2) Using (30) and (29), select an appropriate value for3) Calculate the coefficients of the filter using (31) and

place them in a look-up table. The number of coefficientsis equal to Since the filter is symmetrical, only halfof the coefficients are in fact required.

4) Pass the sampled ECG signal through the R peak detec-tor algorithm (see, also, Section VII).

5) Follow the samples of the R-wave signal while they arecoming out of the R peak detector algorithm. Whenevera nonzero value (R peak) is detected, select the first rowof the look-up table. With each new input sample selectthe next row and replace with the existing one. Eachoutput sample is obtained by summation of the selectedrows of the look-up table.

6) Keep every th sample of the output samples. This isthe HRV signal. Note that for time monitoring, isthe best selection, whereas for frequency or time analysis

is recommended.

B. Simulation Results

Validity of the proposed method is examined here byconsidering four different cases. In all the cases the R-wavesignal was produced by the IPFM model with threshold ,sampling frequency 300 Hz and data length 400 s. For the F-Hmethod Hz and for the proposed methodHz and s were employed. For the sake of comparison,the transient period and the delay in the detected signals havebeen removed from all the figures.

In the first case was assumed.Fig. 7(a)–(c) illustrates the ac part of the input signal, thedetected signal using the F-H algorithm, and the detectedsignal using the proposed method, respectively. Fig. 7(d) and(e) depicts the normalized PSD of the demodulated signalusing the F-H and the new algorithms, respectively. Fig. 8plots similar results, but forBecause of the higher input frequency, spurious componentscan now be observed in the detected signal. Fig. 9 presentsthe simulation results for

Now the intermodulation frequencies of themain components also exist. The price paid for having a lowerspurious component at 0.4 Hz in the proposed algorithm is aslight decrease in the magnitude of the main component at 0.3Hz. An interesting result is illustrated in Fig. 10. Fig. 10(a)shows the ac part of the input signal. Fig. 10(b) and (c)presents the detected signal by the F-H and the proposedalgorithms, respectively. Clearly, the ringing effect due to theGibbs phenomenon is observed in Fig. 10(b), while Fig. 10(c)gives a closer output in transients to the real one. In all thesimulations, closeness of the results of the new algorithm tothe original signals can easily be seen.

It is worth noting that a more reliable reconstructed signalcan be obtained if we select a higher value for the resamplingfrequency, . Since the lowpass filters in both the F-Halgorithm and the proposed method are not ideal, choosing

, which is suggested by the F-H algorithm, wouldbe the extreme case and may cause aliasing error. Hence,decreasing , for instance , gives more reliable

Page 8: Real-time heart rate variability extraction using the Kaiser window

SEYDNEJAD AND KITNEY: REAL-TIME HRV EXTRACTION USING THE KAISER WINDOW 997

(a) (b)

(c) (d)

(e)

Fig. 7. Detection of signal0:2 sin(2�0:15t). (a) Input signal, (b) detected signal using the F-H algorithm, (c) detected signal using the proposed method,(d) PSD of the detected signal using the F-H algorithm, and (e) PSD of the detected signal using the proposed method.

Page 9: Real-time heart rate variability extraction using the Kaiser window

998 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 10, OCTOBER 1997

(a) (b)

(c) (d)

(e)

Fig. 8. Detection of signal0:3 sin(2�0:3t). (a) Input signal, (b) detected signal using the F-H algorithm, (c) detected signal using the proposed method, (d)PSD of the detected signal using the F-H algorithm, and (e) PSD of the detected signal using the proposed method.

Page 10: Real-time heart rate variability extraction using the Kaiser window

SEYDNEJAD AND KITNEY: REAL-TIME HRV EXTRACTION USING THE KAISER WINDOW 999

(a) (b)

(c) (d)

(e)

Fig. 9. Detection of signal0:4 sin(2�0:15t)+0:4 sin(2�0:3t), (a) Input signal, (b) detected signal using the F-H algorithm, (c) detected signal using theproposed method, (d) PSD of the detected signal using F-H algorithm, and (e) PSD of the detected signal using the proposed method.

Page 11: Real-time heart rate variability extraction using the Kaiser window

1000 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 10, OCTOBER 1997

(a) (b)

(c)

Fig. 10. Transient performance of the F-H and the proposed algorithms. (a) IPFM input signal, (b) detected signal using the F-H algorithm, and (c)detected signal using the proposed method.

results. Specifically, reducing does not increase the amountof computations in our algorithm. But, estimation of the PSDnow requires additional calculations for both methods.

VI. REAL-TIME BAND PASS

FILTERING OF THE R-WAVE SIGNAL

It is believed that the major frequency components of theHRV are related to particular phenomena [22]. The threefrequency components which are normally considered are ther-moregulatory oscillating frequency at 0.05 Hz, blood pressureoscillating frequency around 0.1 Hz, and respiratory-relatedfrequency around 0.25 Hz. The proposed method can easilybe extended to separate the important narrow band frequencyregions, in real time, directly from the R-wave signal, ifis replaced with the impulse response of a suitable bandpassfilter (BPF). Looking at the variation of the specific frequencycomponents of the HRV is of paramount importance, because

it can represent the variation of the physiologically relatedphenomena such as considering the sympatho-vagal balance.

The impulse response of an appropriate BPF can simplybe obtained by a frequency shift in the lowpass filter of (31)through multiplication with a sinusoidal function

otherwise(32)

where are high and low cutoff frequencies of the BPF,respectively. Implementation of (32) is the same as (31), onlythe values of the coefficients must be modified. Again, the

Page 12: Real-time heart rate variability extraction using the Kaiser window

SEYDNEJAD AND KITNEY: REAL-TIME HRV EXTRACTION USING THE KAISER WINDOW 1001

(a) (b)

(c)

Fig. 11. Bandpass filtering of the IPFM output signal by the proposed algorithm. (a) Input signal0:2 sin(2�0:1t) + 0:2 sin(2�0:25t), (b) output signal,and (c) PSD of the output signal.

sparse property of the R-wave signal reduces the amount ofcomputation to a few additions per output sample. Althoughcan be selected to be equal to , due to the nonidealityof the BPF, a lower value is recommended especially when anarrow band filter is employed.

Fig. 11 illustrates the simulation results carried out bythe BPF method. Fig. 11(a) shows input signal

Fig. 11(b) and (c) plotsthe detected signal and its PSD with cutoff frequencies

ands. Clearly, the frequency component at 0.25 Hz has beenremoved quite well. Needless to say, we can use several BPFat different bands simultaneously, to discern the relationshipbetween interconnected physiological phenomena. The numberof filters is restricted by the speed of the installed softwareand hardware.

It is useful to note here that the complex demodulationtechnique has been used by Shinet al. for the same purpose

[27]. They have utilized multiplication by an exponentialfunction and then lowpass filtering. However, their method isnot real time and is also more complicated than our method.

VII. EXPERIMENTAL RESULTS

Employing a real-time R peak detection algorithm is thefirst step in an actual experiment. Often using a simple causalsliding averager for reducing the noise, differentiating andthresholding are adequate. These stages, of course, will imposemore calculations and time delay. However, these are not timedemanding tasks. Furthermore, the amount of the imposeddelay is negligible in comparison with

To illuminate the utility of the proposed method, twopractical examples are considered here. In both cases, ECGand respiratory activity were sent to the computer (486 IBM-PC) via an interface board (Lab Master DMA, Solon, OH)with sampling frequency 500 Hz and 12-b resolution. Theproposed method was implemented in the form of a C language

Page 13: Real-time heart rate variability extraction using the Kaiser window

1002 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 10, OCTOBER 1997

(a) (b)

(c) (d)

Fig. 12. Fixed breathing rate experiment. (a) ECG, (b) respiratory movement, (c) detected HRV signal, and (d) PSD of the HRV.

program. The program was also responsible for plotting ECG,respiration, R-wave signal, and HRV in real time on themonitor. PSD of the signals were computed off-line by theBlackman–Tukey spectral estimator [18].

Fig. 12(a) and (b) shows a part of ECG and respiratorymovement obtained from a young healthy subject in the supineposition who was constrained to breath according to the beepsounds generated by the computer at the rate of 11 breathsper minute. Chest movement was measured by the straingauge plethysmography method. For obtaining the R-wavesignal, a three-point causal sliding averager and a simpledifferentiating algorithm were used. Fig. 12(c) and (d) presentsthe detected HRV signal and its PSD using the proposedalgorithm with Hz and s. For convenience, incomparison the delay of the signals is not shown in the figures.Fluctuations of the HRV with respiration can be observedclearly from Fig. 12(c). As would be expected, HRV increases

during inspiration and decreases with expiration. The high-frequency (HF) component at 0.18 Hz (due to respiration)and low-frequency (LF) component around 0.1 Hz (due toblood pressure oscillation) are completely dominant in the PSDshown in Fig. 12(d). Fig. 12(e) depicts the output signal of thereal-time BPF of the R-wave signal with Hz and

Hz. This range corresponds to the respiratory regionof the HRV signal. Fig. 12(f) presents the similar result, butfor Hz and Hz which coincides withthe blood pressure oscillating region of the spectrum. ThePSD’s of these two signals are illustrated in Fig. 12(g) and12(h), respectively. Although the physiological interpretationof the experimental results is beyond the scope of this paper,it is easily observed from Fig. 12 that the marked change inthe second half of the HRV signal is related to the suddenactivation of the blood pressure component and not to thevariation of the respiratory pattern.

Page 14: Real-time heart rate variability extraction using the Kaiser window

SEYDNEJAD AND KITNEY: REAL-TIME HRV EXTRACTION USING THE KAISER WINDOW 1003

(e) (f)

(g) (h)

Fig. 12. (Continued.) Fixed breathing rate experiment. (e) real-time BPF of the R-wave signal with center frequency 0.2 Hz, (f) real-time BPF of the R-wavesignal with center frequency 0.1 Hz, (g) PSD of the signal of part (e), and (h) PSD of the signal of part (f).

As the second practical example, real-time detection of theHRV in the inspiratory-breath-hold experiment is illustratedhere [28]. In this experiment, ECG and pulmonary ventila-tion were measured simultaneously. The subject started freebreathing through a water-sealed spirometer filled with oxygenuntil receiving a signal to stop his breathing following a deepinspiration. HRV was monitored by the proposed algorithmwith the same parameters as before. The HRV is shown inFig. 13 along with the respiratory signal. In the period offree breathing, marked by A–B, synchronous fluctuations ofthe HRV with respiration is quite clear. Deep inspiration atthe beginning of the breath-hold period induces a significantchange in HRV which appears with 5-s delay with respect tothe inspiration. Stopping the breathing, in the period markedby B–C, diminishes the HRV, which is believed to be due tolack of the mechanical influence of respiration in the chestcavity. A sudden change in the HRV and then oscillation with

the respiratory rate, again with 5-s delay, indicates the end ofthe breath-hold period and returning to the normal position.

It is worthwhile here to point out that another advantageaccruing from the proposed algorithm is the clear definitionof HRV and its constituent parts as time signals, so thatrelating the HRV to other physiological signals, particularly forsystem identification purposes, is very straightforward. This,for example, can be observed in Fig. 12(b), (c), and (e) orFig. 13 for relating the HRV to the respiration.

VIII. C ONCLUSION

The proposed method presents a powerful, but simple, toolfor investigation of the HRV and the neuronal spikes, bothin time and frequency domains. This method stems fromthe IPFM model and the proof that the HRV signal can beextracted by lowpass filtering. The filter is based on the Kaiserwindow, which is an optimum selection among windowed-type

Page 15: Real-time heart rate variability extraction using the Kaiser window

1004 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 10, OCTOBER 1997

Fig. 13. Real-time monitoring of the HRV in inspiratory breath-hold experiment. The top trace shows pulmonary ventilation and the bottom one the HRV.

FIR filters. It also guarantees real-time behavior, simplicity indesign, and phase linearity. Even without the basic assumptionof the IPFM model, the new algorithm can still be used,similar to the LPFES method [8], on-line and with higherperformance. Obviously, it can also be employed for off-lineprocessing of the HRV with better characteristics than that ofthe existing algorithms. It is also an ideal method for followingthe rapid changes over time as well as time-frequency analysisof the HRV. The BPF version of the new method allows morecareful consideration of the HRV signal. Similarly, a bandstopfilter (BSF) can be designed using an identical procedure. Inall cases, the bulk of calculation is independent of the type offilter and is limited to a few additions for each output sample.

APPENDIX A

Derivation of (18), according to Zeeviet al. [20], is pre-sented here. From the definition of the IPFM model, timeoccurrence of consecutive impulses are related by

(33)

If is assumed for the time origin then from (33) itfollows that

(34)

On the other hand, ’s of the PPM signal of (17) satisfy theidentity

(35)

Equation (35) can be written as

(36)

Equations (19) and (21) are easily obtained by comparing (34)and (36).

APPENDIX B

In this appendix, derivation of (21)–(24) is illustrated byemploying a similar approach to that of Rowe [19].

Suppose a function has a single, simple zero atThen by using the properties of the impulse function we get

(37)

By applying the above result for the PPM signal of (17), weobtain

(38)

If is assumed, then

(39)

This restriction on , in addition to permitting us todrop the absolute-magnitude sign, is a sufficient condition for

to have a single, simple zero. Moreover,from (19) and (20) , therefore isequivalent to the low modulation depth condition in the IPFMmodel. Further, if we define , then

will be given by

(40)

Using Fourier series expansion, can be written as, which brings about (21).

To reach to (24), (23) can be written as

(41)

Page 16: Real-time heart rate variability extraction using the Kaiser window

SEYDNEJAD AND KITNEY: REAL-TIME HRV EXTRACTION USING THE KAISER WINDOW 1005

Substituting from (21) and then integrating yield

constant.

(42)

Integration of over with fixes the constantvalue to and completes the proof.

REFERENCES

[1] B. McA. Sayers, “Analysis of heart rate variability,”Ergonomic, vol.16, pp. 85–97, 1973.

[2] S. Akselrod, D. Gordon, F. A. Ubel, D. C. Shannon, A. C. Barger,and R. J. Cohen, “Power spectrum analysis of heart rate fluctuations:A quantitative probe of beat-to-beat cardiovascular control,”Sci., vol.213, pp. 220–222, 1981.

[3] R. W. deBoer, J. M. Karemaker, and J.Strackee, “Beat-to-Beat vari-ability of heart interval and blood pressure,”Automedica, vol. 4, pp.217–222, 1983.

[4] G. F. Chess, R. M. K. Tam, and F. R. Calaresu, “Influence of cardiacneural inputs on rhythmic variations of heart period in the cat,”Amer.J. Physiol., vol. 228, pp. 775–780, 1975.

[5] B. W. Hyndman and R. K. Mohn, “A model of the cardiac pacemakerand its use in decoding the information content of cardiac intervals,”Automedica, vol. 1, pp. 239–252, 1975.

[6] O. Rompelman, J. B. I. M. Snijders, and C. J. V. Van Spronsen, “Themeasurement of heart rate variability spectra with the help of a personalcomputer,”IEEE Trans. Biomed. Eng., vol. BME-29, no. 7, pp. 503–510,July 1982.

[7] R. W. deBoer, J. M. Karemaker, and J.Strackee, “Comparing spectraof a series of point events, particularly for heart-rate variability data,”IEEE Trans. Biomed. Eng., vol. BME-31, pp. 384–387, Apr. 1984.

[8] O. Rompelman, A. J. R. M. Coenen, and R. I. Kitney, “Measurement ofheart rate variability— Pt. 1: Comparative study of heart-rate variabilityanalysis methods,”Med. Biol. Eng. Comput., pp. 233–239, May 1977.

[9] E. J. Bayly, “Spectral analysis of pulse frequency modulation in thenervous systems,”IEEE Trans. Biomed. Eng., vol. BME-15, no. 4, pp.257–265, 1968.

[10] R. Weitkunat,Digital Biosignal Processing. Amsterdam, the Nether-lands: Elsevier, 1991, ch. 8.

[11] A. S. French and A. V. Holden, “Alias-Free sampling of Neuronal spiketrains,” Kybernetic, vol. 8, pp. 165–175, May, 1971.

[12] M. Merri, D. C. Farden, J. G. Mottley, and E. L. Titlebaum, “Samplingfrequency of the electrocardiogram for spectral analysis of the heart ratevariability,” IEEE Trans. Biomed. Eng., vol. 37, no. 1, pp. 99–105, Jan.1990.

[13] J. P. Saul, R. D. Berger, P. Albrecht, S. P. Stein, M. H. Chen, andR. J. Cohen, “Transfer function analysis of the circulation: Uniqueinsights into cardiovascular regulation,”Amer. J. Physiol., vol. 91, pp.H1231–H1245, 1991.

[14] G. Baselli, S. Cerruti, and S. Civardi, “Cardiovascular variability signals:Toward the identification of a closed loop model of the neuronalcontrol mechanisms,”IEEE Trans. Biomed. Eng., vol. 35, no. 12, pp.1033–1046, Dec. 1988.

[15] A. V. Oppenheim and R. W. Schafer,Discrete-Time Signal Processing.Englewood Cliffs, NJ: Prentice-Hall, 1989.

[16] R. J. Peterka, A. C. Anderson, and D. P. O’leary, “Practical considera-tions in the implementation of the French-Holden algorithm for samplingof neuronal spike trains,”IEEE Trans. Biomed. Eng., vol. BME-25, no.2, pp. 192–195, Mar. 1978.

[17] G. Pinna, G. Orsi, and G. Corsico, “Effect of record length on powerspectral estimation of the heart rate variability signal,” inProc. 13thIEEE Annu. Conf. EMBS,1991, pp. 261–264.

[18] W. A. Gardner, Statistical Spectral Estimation, A NonprobabilisticApproach. Englewood Cliffs, NJ: Prentice-Hall 1988.

[19] H. E. Rowe,Signals and Noise in Communication Systems. Princeton,NJ: D. Van Nostrand, 1965, ch. V.

[20] Y. Y. Zeevi and A. M. Bruckstein, “A note on single signed integralpulse frequency modulation,”IEEE Trans. Syst., Man, Cybern., vol.SMC-7, no. 12, pp. 875–877, Dec. 1977.

[21] A. M. Bruckstein and Y. Y. Zeevi, “Analysis of integral-to-thresholdNeural coding schemes,”Biological Cybern., vol. 34, pp. 63–70, 1979.

[22] R. I. Kitney and O. Rompelman,The Study of Heart Rate Variability.Oxford, U.K.: Clarendon, 1980.

[23] R. D. Berger, S. Akselrod, D. Gordon, and R. J. Cohen, “An efficientalgorithm for spectral analysis of heart rate variability,”IEEE Trans.Biomed. Eng., vol. BME-33, no. 9, pp. 900–904, Sept. 1986.

[24] Y. Noguchi, H. Hataoka, S. Sugimoto, H. Kobayashi, and M. Kobayashi,“Integral function method, a new analyzing method for heart ratevariability,” in Proc. 9th IEEE Annu. Conf. EMBS, 1987, pp. 1056–1057.

[25] M. G. Paulin, “Digital filters for firing rate estimation,”BiologicalCybern., vol. 66, pp. 525–531, 1992.

[26] A. J. R. M. Coenen, O. Rompelman, and R. I. Kitney, “Measurement ofheart rate variability: Part 2-Hardware digital device for the assessmentof heart rate variability,”Med. Biol., Eng. Comput., vol. 15, pp. 423–430,1977.

[27] S. J. Shin, W. N. Tapp, S. S. Resiman, and B. H. Natelson, “Assessmentof autonomic regulation of heart rate variability by the method ofcomplex demodulation,”IEEE Trans. Biomed. Eng., vol. 36, no. 2, pp.274–283, Feb. 1989.

[28] M. De Burgh Daly, “Interactions between respiration and circulation,”in Handbook of Physiology, Sect. 3, The Respiratory System, vol. II,Control of Breathing pt. 2, N. S. Cherniack Ed. Bethesda, MD: Amer.Physiological Soc., 1986.

Saeid Reza Seydnejad(S’88–M’89–S’95) receivedthe B.S. degree in electronic engineering from Sistanand Baluchestan University, Zahedan, Iran, in 1988,and the M.S. degree in biomedical engineering fromSharif University of Technology, Tehran, Iran, in1991. He is currently working toward the Ph.D.degree in biomedical engineering, Electrical Engi-neering Department, Imperial Collge, London, U.K.

In 1992 he was a Consultant Engineer for Za-hedan Medical University, Zahedan, Iran. From1991 to 1994 he was a Lecturer in Sistan and

Baluchestan University. His research interests include linear and nonlin-ear physiological system identification, cardiovascular system analysis, andcyclstationary processes.

Richard I. Kitney received the B.S. degree inelectrical engineering in 1968, and the M.S. degreein systems engineering in 1969 both from SurreyUniversity, UK, and the Ph.D. degree in biomedicalengineering from Imperial College in 1972. He hasalso received the D.Sc. in 1993 from University ofLondon.

He is a Professor of Biomedical Systems Engi-neering and Director of the Centre for Biologicaland Medical Research at Imperial College, London,U.K. He has published over 200 papers in the fields

of biomedical signal and image processing, and the application of computers tohealthcare. He has worked on the study of arterial disease, cardio-respiratorycontrol, biomedical image processing related to magnetic resonance imagingand ultrasound, the development of picture archiving and communicationssystems (PACS), and 3-D visualization techniques. He has worked extensivelyin the United States and has been a Visiting Professor at MassachusettsInstitute of Technology (MIT), Cambridge, MA, since 1991. He is a Co-Director of the joint Imperial College-MIT International Consortium forMedical Imaging Technology.

Professor Kitney is a member of both British Government and EuropeanUnion committees on the application of Information Technology to healthcareand is involved in the formulation of healthcare policy for the UK and to theEuropean Union (EU). He is also a fellow of IEE, Royal College of Medicineand Royal College of Physicians of Edinburgh.