+ All Categories
Home > Documents > Estimation of Heart Rate and Heart Rate Variability from ...

Estimation of Heart Rate and Heart Rate Variability from ...

Date post: 31-Dec-2021
Category:
Upload: others
View: 9 times
Download: 0 times
Share this document with a friend
4
Estimation of Heart Rate and Heart Rate Variability from Pulse Oximeter Recordings using Localized Model Fitting Federico Wadehn 1 , David Carnal 1 and Hans-Andrea Loeliger 1 , Abstract— Heart rate variability is one of the key parameters for assessing the health status of a subject’s cardiovascular system. This paper presents a local model fitting algorithm used for finding single heart beats in photoplethysmogram recordings. The local fit of exponentially decaying cosines of frequencies within the physiological range is used to detect the presence of a heart beat. Using 42 subjects from the CapnoBase database, the average heart rate error was 0.16 BPM and the standard deviation of the absolute estimation error was 0.24 BPM. I. INTRODUCTION Pulse oximetry is increasingly proving to be a useful tool for unobtrusive monitoring of essential physiological parameters such as the heart rate (HR) and the pulse rate variability (PRV), a surrogate measure for the heart rate variability (HRV), in both home-care and intensive care environments [1]. A pulse oximeter illuminates tissue of extremities such as fingertips, wrist or ear lobes with a photodiode and measures the reflected (or transmitted) light intensity, the so called photoplethysmogram (PPG) signal [2]. The received signal consists of two components. Firstly of an almost constant component which depends on the optical properties of illuminated tissues such as skin, muscle, etc., and secondly, of an oscillatory component caused by almost periodic changes of the optical properties of blood vessels due to the pulsatile motion of blood. Most of the well-performing algorithms for heart rate estimation using PPG signals resort to some form of spectral estimation, which has proven to be robust even in the presence of strong motion artifacts [2]. Determining the heart rate by finding the peak of the estimated spectrum boils down to finding the mono-frequency oscillation which best matches the PPG signal in a least squares sense. Thereby a uniform heart rate on the considered window is assumed and infor- mation about PRV is lost. When estimating the pulse rate variability from photoplethysmographic signals, the main goal is to find the temporal patterns of consecutive heart beats. Considering that the PPG pulse shape corresponding to a single heart beat is not uni-modular due to reflections of blood at extremities and due to motion artifacts [3], a simple peak detection would often fail. In this paper we will present an algorithm for heart beat detection based on locally fitting exponentially decaying cosines to PPG signals affected by moderate motion artifacts such as they occur when wearing a pulse oximeter during everyday-life activities or in clinical settings. 1 Federico Wadehn, David Carnal and Hans-Andrea Loeliger are with the Dept. of Information Technology and Electrical Engineering ETH Zurich, Switzerland, {wadehnf,loeliger}@isi.ee.ethz.ch 0 1 2 3 4 5 ECG (a) 0 1 2 3 4 5 PPG (b) 0 1 2 3 4 5 0 0.3 0.6 Scores for 10 different frequencies (c) 0 1 2 3 4 5 0 0.3 Time[s] Combined Score (d) Fig. 1. ECG, PPG, score signals (cf. Eq.(6)) for 10 frequencies and combined score (cf. Eq.(20)). Bottom: The red crosses indicate the peaks of the combined score and the black arrows the R-peaks of the ECG. Between two ECG peaks there should only be one PPG peak. II. LOCALIZED MODEL FITTING The pulse shape of a clean PPG signal, which corresponds to one heart beat, has a quite characteristic bell shape as shown in Figure 1b. Even though pulses corresponding to heart beats differ from one-another, one can clearly identify a characteristic form as described in [3]. Due to the recurrent pulse shape we employed a local model fitting algorithm to find the positions of the heart beats. A pulse peaking at time n, with amplitude β can approximately be modeled as an exponentially decaying oscillation with offset representing low frequency baseline-wandering i.e., ˜ y k = ( βe -ρp(n-k) cos (Ω m (n - k)) + α if k<n βe -ρ f (k-n) cos (Ω m (n - k)) + α if k n. (1) Due to the asymmetric pulse shape in which the falling edge is flatter than the rising edge [3], the pulse peaking at time n is modeled with different decays ρ p and ρ f for the left and right part of the peak as shown in Eq.(1). Assuming a fixed frequency Ω m , an exponentially decaying oscillation with offset as described in Eq.(1) can be modeled with a 978-1-4244-9270-1/15/$31.00 ©2015 IEEE 3815
Transcript
Page 1: Estimation of Heart Rate and Heart Rate Variability from ...

Estimation of Heart Rate and Heart Rate Variability from PulseOximeter Recordings using Localized Model Fitting

Federico Wadehn1, David Carnal1 and Hans-Andrea Loeliger1,

Abstract— Heart rate variability is one of the key parametersfor assessing the health status of a subject’s cardiovascularsystem. This paper presents a local model fitting algorithmused for finding single heart beats in photoplethysmogramrecordings. The local fit of exponentially decaying cosines offrequencies within the physiological range is used to detect thepresence of a heart beat. Using 42 subjects from the CapnoBasedatabase, the average heart rate error was 0.16 BPM and thestandard deviation of the absolute estimation error was 0.24BPM.

I. INTRODUCTIONPulse oximetry is increasingly proving to be a useful

tool for unobtrusive monitoring of essential physiologicalparameters such as the heart rate (HR) and the pulse ratevariability (PRV), a surrogate measure for the heart ratevariability (HRV), in both home-care and intensive careenvironments [1]. A pulse oximeter illuminates tissue ofextremities such as fingertips, wrist or ear lobes with aphotodiode and measures the reflected (or transmitted) lightintensity, the so called photoplethysmogram (PPG) signal [2].The received signal consists of two components. Firstly ofan almost constant component which depends on the opticalproperties of illuminated tissues such as skin, muscle, etc.,and secondly, of an oscillatory component caused by almostperiodic changes of the optical properties of blood vesselsdue to the pulsatile motion of blood.

Most of the well-performing algorithms for heart rateestimation using PPG signals resort to some form of spectralestimation, which has proven to be robust even in thepresence of strong motion artifacts [2]. Determining the heartrate by finding the peak of the estimated spectrum boils downto finding the mono-frequency oscillation which best matchesthe PPG signal in a least squares sense. Thereby a uniformheart rate on the considered window is assumed and infor-mation about PRV is lost. When estimating the pulse ratevariability from photoplethysmographic signals, the maingoal is to find the temporal patterns of consecutive heartbeats. Considering that the PPG pulse shape correspondingto a single heart beat is not uni-modular due to reflections ofblood at extremities and due to motion artifacts [3], a simplepeak detection would often fail.

In this paper we will present an algorithm for heart beatdetection based on locally fitting exponentially decayingcosines to PPG signals affected by moderate motion artifactssuch as they occur when wearing a pulse oximeter duringeveryday-life activities or in clinical settings.

1Federico Wadehn, David Carnal and Hans-Andrea Loeliger are with theDept. of Information Technology and Electrical Engineering ETH Zurich,Switzerland, wadehnf,[email protected]

0 1 2 3 4 5

ECG (a)

0 1 2 3 4 5

PPG (b)

0 1 2 3 4 50

0.30.6

Scores for 10 different frequencies (c)

0 1 2 3 4 50

0.3

Time[s]

Combined Score (d)

Fig. 1. ECG, PPG, score signals (cf. Eq.(6)) for 10 frequencies andcombined score (cf. Eq.(20)). Bottom: The red crosses indicate the peaks ofthe combined score and the black arrows the R-peaks of the ECG. Betweentwo ECG peaks there should only be one PPG peak.

II. LOCALIZED MODEL FITTING

The pulse shape of a clean PPG signal, which correspondsto one heart beat, has a quite characteristic bell shape asshown in Figure 1b. Even though pulses corresponding toheart beats differ from one-another, one can clearly identifya characteristic form as described in [3]. Due to the recurrentpulse shape we employed a local model fitting algorithm tofind the positions of the heart beats. A pulse peaking at timen, with amplitude β can approximately be modeled as anexponentially decaying oscillation with offset representinglow frequency baseline-wandering i.e.,

yk =

βe−ρp(n−k) cos (Ωm(n− k)) + α if k < n

βe−ρf (k−n) cos (Ωm(n− k)) + α if k ≥ n.(1)

Due to the asymmetric pulse shape in which the falling edgeis flatter than the rising edge [3], the pulse peaking at timen is modeled with different decays ρp and ρf for the leftand right part of the peak as shown in Eq.(1). Assuming afixed frequency Ωm, an exponentially decaying oscillationwith offset as described in Eq.(1) can be modeled with a

978-1-4244-9270-1/15/$31.00 ©2015 IEEE 3815

Page 2: Estimation of Heart Rate and Heart Rate Variability from ...

third-order autonomous linear state space model (LSSM):

xk+1 =

Apxk for k < n

Afxk for k ≥ n.(2)

yk = Cxk. (3)

An offset can be modeled by a third state in addition tothe two states used to model the oscillation. The state spacematrices are:

Ai =

ρi cos(Ωm) −ρi sin(Ωm) 0ρi sin(Ωm) ρi cos(Ωm) 0

0 0 1

, (4)

C =(1 0 1

). (5)

Each state xk encodes the magnitude, phase and offsetof the oscillation. Given noisy PPG measurements y =y1, ..., yN, with yk = yk+εk and εk ∼ N (0, σ), a localizedleast squares state estimation can be performed by locallyfitting the autonomous model to the data as described in [4].Fitting an oscillation with a fixed phase, but open amplitudeand open offset is reminiscent of template matching viacross-correlation. A measure for the goodness of fit betweenthe detrended PPG signal and the oscillation, the score signals1, . . . , sN , can be expressed with the local least squaresestimates x1, . . . , xN as

sn4= 1−

∑Nk=1 γ

|n−k|i (yk − yk(xn))2∑N

k=1 γ|n−k|i (yk − αn)2

, (6)

where αn is the local estimate of the offset (i.e. the trend).The score will give an indication on how well the PPG signalmatches a heart beat pulse shape (exponentially decaying co-sine) in that specific position, thereby indicating the presenceor absence of a heart beat. Due to the error weights γi with0 ≤ γi ≤ 1, i ∈ p, f and i = p if k < n, the errors willbe exponentially attenuated the further they are away fromthe time instant n at which the local fit is computed. Weused an error weight γp closer to one for the left side ofthe pulse (model fit for k < n), compared to the right sideγf , to account for the fact that for the rising edge the shapevaries less than for the falling edge (cf. Figure 1b), which isaffected by intersymbol interference caused by reflections ofthe blood at extremities. The state estimation is performedvia the following constrained optimization:

xn = argminxn∈S

N∑k=1

γ|n−k|i (yk − yk(xn))2. (7)

The state estimate xn is constrained to lie in the admissibleset

S 4= βv1 + αv2 : β ≥ 0, α ∈ R, (8)

with v14= (1, 0, 0)T, v2

4= (0, 0, 1)T and with β encoding

the amplitude of the oscillation and α encoding the offset.This admissible set (forcing the second component of xn tozero) will ensure that we locally fit an exponentially decayingcosine, peaking at n, with offset α to the PPG signal.

The decaying factors ρp and ρf as well as the errorweights γp and γf strongly influence the model as shown

in Figure 2. A model with strong locality (small γ) capturesonly single pulses, which results in higher accuracy of theestimated peak positions, at the expense of being less stablethan models with a smaller locality (bigger γ) that modelseveral consecutive pulses. A strong locality is more suitedfor heavily damped and spiky signals such as ECG signals(Figure 2 bottom) or PPG signals at low heart rates, whereasa weaker locality proved to be more suited for general PPGsignals, which are not so strongly damped and might containmovement artifacts. Since the pulse width is restricted within

0 0.5 1 1.5 2

0

.5

1

Err

orw

eigh

tγ|n−k|

0 0.5 1 1.5 2

Time [s]

PPG

and

Mod

elFi

ts

0 0.1 0.2 0.3 0.4 0.5

0

.5

1

Err

orw

eigh

tγ|n−k|

0 0.1 0.2 0.3 0.4 0.5Time [s]

EC

Gan

dM

odel

Fits

Fig. 2. Top: Fitted oscillations (red) with different frequencies withoutdecay (i.e., ρ = 1) for PPG signal (blue). Bottom: Fitted oscillations (red)with different frequencies and with decay (i.e., ρ < 1) for ECG signal inblue.

some reasonable range, but unknown a priori, we use a filterbank with different frequencies within the frequency rangeof physiological heart rates (i.e. 40−200 BPM) to fit severalautonomous models parameterized by different frequencies.For each autonomous model parameterized by a frequency,a separate score signal is obtained. Figure 3 shows a blockdiagram of the whole algorithm for the detection of singleheart beats.

The recursive computation of the M score signals, whichdepend on the state estimates, can efficiently be carried outvia a modified version of Kalman smoothing as described in[4]. The inverse covariance matrices of the state estimates

PPG

LSSM : f1

LSSM : f2

...

LSSM : fM

s(1)n

s(2)n

...

s(M)n

Com

bine

Scor

e

Peak

Det

ectio

n

HR

HRV

s(tot)n

Fig. 3. Algorithm for heart beat detection from PPG signal

3816

Page 3: Estimation of Heart Rate and Heart Rate Variability from ...

are denoted as−→Wn and

←−Wn respectively and the transformed

mean, i.e. the product of the inverse covariance matrix andthe mean of the state estimate, as

−→ξn =

−→Wn−→mn and

←−ξn =

←−Wn←−mn. The recursive Kalman filtering updates are:

−→ξn = γp(A

−1p )T

−→ξn−1 + CTyn (9)

−→Wn = γp(A

−1p )T

−→Wn−1A

−1p + CTC, (10)

where yn are samples from the PPG signal and−→ξ0 = 0, and−→

W0 = 0 initial values for the recursive computations.Similarly, the Kalman smoothing update rules go as follows:

←−ξn = γf

(ATf

←−ξn+1 + yn+1A

TfC

T)

(11)←−Wn = γf

(ATf

←−Wn+1Af +AT

fCTCAf

), (12)

with the initial values←−ξN = 0, and

←−WN = 0. Note

that the covariance matrices of the state estimates can beprecomputed offline, which is an important feature for real-time implementations.

Finally, the marginal parameters of the state estimates areξn =

−→ξn +

←−ξn and Wn =

−→Wn +

←−Wn. The local estimates

of the amplitude βn and the offset αn can be computedanalytically as functions of these parameters:

βn =(vT1Wnv2)(vT2 ξn)− (vT2Wnv2)(vT1 ξn)

(vT1Wnv2)2 − (vT1Wnv1)(vT2Wnv2)(13)

αn =(vT1Wnv2)(vT1 ξn)− (vT1Wnv1)(vT2 ξn)

(vT1Wnv2)2 − (vT1Wnv1)(vT2Wnv2). (14)

From these parameter estimates we finally get the local stateestimates xn:

xn =

βnv1 + αnv2, if βn > 0

αnv2, otherwise.(15)

The scalar parameters −→κn and ←−κn with −→κ0 = 0 and ←−κN = 0represent a measure for the localized energy of the signaland are computed as follows:

−→κn = γp−→κn−1 + y2n (16)

←−κn = γf(←−κn+1 + y2n+1

)(17)

κn = −→κn +←−κn. (18)

The score signal of Eq.(6) can then be written as:

sn(xn) = 1− κn − 2xTnξn + xTnWnxnκn − 2vT2 ξnαn + α2

nvT2Wnv2

. (19)

We thus obtain one score signal for each channel of the filterbank. The M score signals are further processed to obtainsingle heart beats as shown in Figure 1d. Instead of takingthe mean or the max over the score signals, we found thatsquaring the signals performed especially well since largerscore signals thereby get a higher weight, which helps toattenuate spurious side-peaks further. The M score signalsfor each component of the filter bank are combined into onesingle score signal according to:

s(tot)n =1

M

M∑m=1

(s(m)n

)2. (20)

Finally a peak detection on the combined score signal wasperformed to find the positions of the heart beats. In the peakdetection the minimum distance between two peaks was setto 0.2s, and the minimum peak height was set to 15% of theaverage of the previous 3 peaks.

III. DATA AND PERFORMANCE METRICS

To evaluate the performance of the local model fittingalgorithm we used ECG-PPG recordings from the Cap-noBase.org [5], an online-database containing 8 min longECG and PPG signals (sampling rate 300 Hz) from 42subjects recorded while receiving anesthesia. These signalsfeature moderate motion artifacts, but wide dynamic rangesof inter- and intrasubject heart rates. The ECG recordingswere used as the gold-standard for heart rate estimationusing 8s long sliding windows with a successive shift of2s. The accuracy of the HRV estimates was assessed usingthe manually annotated PPG heart beats from [5] as well asthe ECG signal.

We chose 20 frequencies f1, . . . , f20 between 0.8 Hzand 3.7 Hz (50 BPM to 220 BPM) for the filter bankof our model, to capture different PPG pulse widths withthe different state space models. The past and future errorweights γp and γf were chosen to correspond to a respectivedecay of 15% and 4% per second, thus capturing multiplepulses. Since, unlike an ECG signal, the PPG signal can beapproximated with an undamped oscillation we chose thedamping factor ρ = 1.

The performance of the heart rate estimation algorithmwas assessed using the averaged absolute estimation error

µ =1

W

W∑i=1

∣∣∣HRest(i)− HRtrue(i)∣∣∣, (21)

and the standard deviation of the absolute estimation error

σ =

√√√√ 1

W

W∑i=1

(∣∣∣HRest(i)− HRtrue(i)∣∣∣− µ)2

, (22)

where W is the total number of heart rate estimates, HRest(i)the i-th PPG heart rate estimate and HRtrue(i) the i-thground-truth heart rate from the ECG. As measures for theheart rate variability we chose the root mean square ofsuccessive differences (RMSSD) [6]:

RMSSD =

√√√√ 1

N − 1

N−1∑n=1

(In+1 − In)2 (23)

with In denoting the interval between two consecutive heartbeats.

IV. RESULTS

Figure 4 shows the Bland-Altman plot [7] with m =−0.003 BPM and sd = 0.29 BPM for the PPG heart rateagainst the ground-truth ECG heart rate for 42 subjects.The average absolute heart rate error µ for the 42 patientswas 0.16 BPM and the standard deviation of the absoluteestimation error σ was 0.24 BPM. Figure 5 shows the

3817

Page 4: Estimation of Heart Rate and Heart Rate Variability from ...

60 80 100 120 140 160−4

−2

0

2

4

0.5 (HRECG

+HRPPG

)

HR

EC

G−

HR

PP

G

m +1.96 sdmm −1.96 sd

Fig. 4. Bland-Altman plot of heart rate estimates for 42 subjects

RRi[ms]

400 600 800 1000 1200 1400RR

i+1

[ms]

200

600

1000

1400ECG

PPi[ms]

400 600 800 1000 1200 1400

PP

i+1

[ms]

200

600

1000

1400PPG

Fig. 5. Poincare-Plot of interbeat intervals for 42 subjects with averagebeat-to-beat interval marked with a red cross.

Poincare plot of successive RR-intervals of the ECG signaland PP-intervals of the PPG signal for all 42 subjects aswell as the average beat-to-beat interval for both recordingsmarked with a red cross. The average RMSSD was 24.8 msfor the manually annotated PPG signal, 23.3 ms using thelocalized model fitting approach on the PPG, and 24.4 msfor the ECG signal.

V. DISCUSSION AND CONCLUSIONS

By locally fitting exponentially decaying cosines withdifferent frequencies to PPG signals it is possible to detectsingle beats due to the characteristic pulse shape correspond-ing to a heart beat. This approach is similar to [8] wherethe PPG signal was preprocessed by correlating it with ageneric empirically determined pulse shape. The use of afilter bank for detecting QRS-complexes in ECG signals canalso be found in [9], in which the signal is subdivided intomultiple sub-bands for further processing. One differenceto our approach is that by locally fitting an exponentiallydecaying pulse, we account for the physiological signal shapecorresponding to a heart beat.

In contrast to the widely applied spectral estimationtechniques the local model fitting algorithm does not onlyestimate an average heart rate, but is able to provide anestimate of the heart rate variability. Our algorithm achievedan absolute average heart rate error of 0.16 BPM on theCapnoBase.org database which is along the lines with theerror rate of 0.35 BPM in [10], where the heart rate wasestimated using a 1-min sliding window. The drawback ofthe approach in [10] is that only an average heart rate isobtained, which is not suited for estimation of variationsof inter-beat times (HRV). The close match between theHRV and the PRV we obtained for the 42 subjects suggeststhat PRV extracted from PPG signals is a reasonably goodestimator for the HRV when motion artifacts are mild.

An alternative approach to locating individual heart beatsis sparse-input detection as in [11] augmented by blind modelidentification as in [12].

It is important to note that the used recordings wereperformed in a hospital setting for subjects at rest. Inthe presence of strong motion artifacts (e.g. during intensephysical exercise), spectral density estimation techniques forHR estimation tend to perform better, due to their enhancedrobustness by considering large time windows. In additionto this, when working in the frequency domain it is easier touse information from other sensors such as accelerometersand thereby reducing the effect of motion artifacts via sensorfusion [2]. The devised algorithm is therefore tailored forboth clinical settings as well as for long-time monitoring withwearable devices used in everyday life, but not for intensephysical activity.

ETHICS APPROVAL

All CapnoBase databases have been fully deidentifiedand may be used without further institutional review boardapproval.

REFERENCES

[1] A. Schafer and J. Vagedes, “How accurate is pulse rate variability asan estimate of heart rate variability?: A review on studies comparingphotoplethysmographic technology with an electrocardiogram,” Inter-national Journal of Cardiology, vol. 166, no. 1, pp. 15–29, 2013.

[2] Z. Zhang, Z. Pi, and B. Liu, “Troika: A general framework forheart rate monitoring using wrist-type photoplethysmographic signalsduring intensive physical exercise,” IEEE Transactions on BiomedicalEngineering, vol. 62, no. 2, pp. 522–531, 2015.

[3] J. A. Sukor, S. Redmond, and N. Lovell, “Signal quality measures forpulse oximetry through waveform morphology analysis,” Physiologi-cal Measurement, vol. 32, no. 3, p. 369, 2011.

[4] L. Bruderer, H.-A. Loeliger, and N. Zalmai, “Local statistical modelsfrom deterministic state space models, likelihood filtering, and localtypicality,” in Proc. 2014 IEEE Int. Symp. on Information Theory(ISIT), Honolulu, Hawaii, 2014.

[5] W. Karlen, S. Raman, J. M. Ansermino, and G. A. Dumont, “Multi-parameter respiratory rate estimation from the photoplethysmogram,”IEEE Transactions on Biomedical Engineering, vol. 60, no. 7, pp.1946–53, 2013.

[6] G. G. Berntson, D. L. Lozano, and Y.-J. Chen, “Filter propertiesof root mean square successive difference (rmssd) for heart rate,”Psychophysiology, vol. 42, no. 2, pp. 246–252, 2005.

[7] J. Martin Bland and D. Altman, “Statistical methods for assessingagreement between two methods of clinical measurement,” The Lancet,vol. 327, no. 8476, pp. 307–310, 1986.

[8] J. Weng, Z. Ye, and J. Weng, “An improved pre-processing approachfor photoplethysmographic signal,” in Engineering in Medicine andBiology Society (EMBC), 2005 Annual International Conference ofthe IEEE.

[9] V. X. Afonso, W. J. Tompkins, T. Q. Nguyen, and S. Luo, “Ecgbeat detection using filter banks,” IEEE Transactions on BiomedicalEngineering, vol. 46, no. 2, pp. 192–202, 1999.

[10] A. Garde, W. Karlen, P. Dehkordi, J. Ansermino, and G. Dumont,“Empirical mode decomposition for respiratory and heart rate esti-mation from the photoplethysmogram,” in Computing in CardiologyConference (CinC), 2013, pp. 799–802.

[11] F. Wadehn, L. Bruderer, D. Waltisberg, T. Keresztfalvi, and H.-A.Loeliger, “Sparse-input detection algorithm with applications in elec-trocardiography and ballistocardiography,” in International Conferenceon Bio-inspired Systems and Signal Processing (BIOSIGNALS), Lis-bon, Portugal, 2015.

[12] L. Bruderer, H. Malmberg, and H.-A. Loeliger, “Deconvolution ofweakly-sparse signals and dynamical-system identification by gaussianmessage passing,” in IEEE Int. Symp. on Information Theory (ISIT),Hong Kong, 2015.

3818


Recommended