Comparison of HRV indices obtained from ECG and SCG signals from CEBS database

Background Heart rate variability (HRV) has become a useful tool of assessing the function of the heart and of the autonomic nervous system. Over the recent years, there has been interest in heart rate monitoring without electrodes. Seismocardiography (SCG) is a non-invasive technique of recording and analyzing vibrations generated by the heart using an accelerometer. In this study, we compare HRV indices obtained from SCG and ECG on signals from combined measurement of ECG, breathing and seismocardiogram (CEBS) database and determine the influence of heart beat detector on SCG signals. Methods We considered two heart beat detectors on SCG signals: reference detector using R waves from ECG signal to detect heart beats in SCG and a heart beat detector using only SCG signal. We performed HRV analysis and calculated time and frequency features. Results Beat detection performance of tested algorithm on all SCG signals is quite good on 85,954 beats (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {Se}=0.930$$\end{document}Se=0.930, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {PPV}=0.934$$\end{document}PPV=0.934) despite lower performance on noisy signals. Correlation between HRV indices was calculated as coefficient of determination (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}R2) to determine goodness of fit to linear model. The highest \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}R2 values were obtained for mean interbeat interval (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2 = 1.000$$\end{document}R2=1.000 for reference algorithm, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2 = 0.9249$$\end{document}R2=0.9249 in the worst case), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\text{PSD}}}_{{\text{LF}}}$$\end{document}PSDLF and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\text{PSD}}}_{{\text{HF}}}$$\end{document}PSDHF (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2 = 1.000$$\end{document}R2=1.000 for the best case, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2 = 0.9846$$\end{document}R2=0.9846 for the worst case) and the lowest were obtained for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\text{PSD}}}_{{\text{VLF}}}$$\end{document}PSDVLF (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2 = 0.0009$$\end{document}R2=0.0009 in the worst case). Using robust model improved achieved correlation between HRV indices obtained from ECG and SCG signals except the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}R2 values of pNN50 values in signals p001–p020 and for all analyzed signals. Conclusions Calculated HRV indices derived from ECG and SCG are similar using two analyzed beat detectors, except SDNN, RMSSD, NN50, pNN50, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\text{PSD}}}_{{\text{VLF}}}$$\end{document}PSDVLF. Relationship of HRV indices derived from ECG and SCG was influenced by used beat detection method on SCG signal.

include atrial fibrillation [9], brain stroke [10][11][12][13][14], sleep bruxism [15] diagnosis, and assessment the progress of rehabilitation of patients after ischemic brain stroke [16]. HRV is traditionally obtained from electrocardiogram (ECG) [17]. Over the recent years, there has been interest into non-invasive heart rate monitoring without using electrodes [18]. Seismocardiography (SCG) is a technique of recording and analyzing cardiac activity by measuring precordial acceleration. Recordings are taken using accelerometer on subjects in supine position [19]. In the past, SCG was mainly a tool for physiologists, due to the need of complex recording devices [20].
Technological improvements and miniaturization of accelerometers and the availability of low cost computational power have provided the reasons for reconsidering seismocardiography in clinical practice [21,22]. Various applications have been proposed for SCG, including HRV analysis, detecting heart arrhythmia, and myocardial ischemia [22][23][24].
The feasibility of HRV analysis using SCG signals has been described earlier in papers [17,18,[25][26][27][28]. Ramos-Castro et al. [18] and Landreani et al. [26,27] showed that SCG signal acquired by smartphones can be used to perform HRV analysis. Laurin et al. [17] proved the validity of HRV indices obtained from SCG signal and Tadi et al. [25] study showed high correlation between HRV indices obtained from ECG and SCG.
The purpose of this study is to compare HRV indices obtained from SCG and ECG on signals from CEBS combined measurement of ECG, breathing, and seismocardiogram database and to determine the influence of heart beat detector on SCG signals. CEBS database is a multi-channel signal database available at PhysioNet.org [29][30][31]. A preliminary version of this work was presented in paper [28].

Data set
CEBS database contains 60 multi-channel signals acquired on 20 healthy volunteers. Each recording consists of four channels with a sampling frequency of 5 kHz: ECG (lead I and II), respiratory signal and SCG. Electrocardiogram (ECG) and respiratory signal were registered using Biopac MP36 data acquisition system. ECG (channel 1) was recorded with a bandwidth between 0.05 and 150 Hz and channel 4 (SCG) was recorded using the tri-axial accelerometer LIS334ALH by ST Microelectronics and 0.5-100 Hz bandwidth [29][30][31].
Subjects were asked to be awake and stay still in supine position on a bed during the measurement. After attaching the sensors, the basal state (before playing the music) was acquired for 5 min (recordings b001-b020). Then, the subjects started listening to music for 50 minutes (recordings m001-m020). Finally, the subjects were monitored for 5 min after the music ended (recordings p001-p020) [29,31].

ECG signal processing
Several heart beat detectors have been proposed for ECG, which detect QRS complexes [32,33]. In this study, we applied Pan-Tompkins algorithm [33] implemented by Wedekind [34] to detect R waves in ECG lead I. Pan-Tompkins algorithm consists of the following steps: band-pass filtering (to reduce noise, baseline wandering, muscle noise, etc.), differentiation, squaring of samples, moving average filtering, and correlation analysis [32,33]. After preprocessing, amplitude thresholding is applied to identify R waves in the ECG signal. The interbeat intervals are calculated as differences between time of occurrence of successive R waves as in the following equation: where t RR,i is the ith cardiac interval in ECG and t n denotes the occurrence of nth R wave.

SCG signal processing
Heart beat detection on seismocardiograms is based on nearly periodic appearance of fiducial points in SCG signal [35]. We chose Aortic valve opening (AO) wave which indicates the start of ventricular contraction and is usually visible as a single sharp wave [19].
In this study, we compare two beat detection algorithms: beat detection algorithm proposed by Tadi et al. in paper [25] used as a reference method of heart beat detection and the heart beat detector on SCG signals described in paper [24] described further as the tested beat detector.

Reference beat detection algorithm
Algorithm presented by Tadi et al. in 2015 [25] uses R waves as reference points and is based on the windowing method proposed in papers [36,37]. The first step of the algorithm is applying a band-pass filter with cut-off frequencies of 4 Hz and 50 Hz. Then, the SCG signal is smoothed using a moving average filter, whose window has the duration of 10-20 ms. The R waves in the ECG signal are localized using Pan-Tompkins algorithm and are the reference points. The location of AO wave of a cardiac cycle is determined as a maximum value of the SCG signal within a 90 ms window.

Tested heart beat detector
Beat detector proposed by Tadi et al. in 2016 [24] consists of the following steps: applying band-pass filtering to the signal (3rd order Butterworth filter with cut-off frequencies of 1 Hz and 45 Hz), motion noise cancellation, Hilbert transform and applying band-pass filter with cut-off frequencies of 0.5 Hz and 3 Hz to obtain a waveform with the same periodicity as heart rate.
Motion noise detection consists of calculating signal power envelope, and thresholding. Signal power envelope is calculated from the SCG signal using root mean square operation and a sliding window with a length of 500 ms. Signal parts, where the power envelope exceeds the threshold (twice the median value of signal power envelope), are classified as motion artifacts.
According to Tadi et al. [24], Hilbert transform improves the heart beat detection in SCG signals, because it facilitates the detection of the dominant peaks associated with heart beats. The envelope of the signal s(t) can be obtained by applying the Hilbert transform defined in the following equation: Hilbert transform yields a 90 • phase shift of s(t) and thus we can calculate the magnitude of its envelope as in the following equation: where s a (t) is an analytic signal. In the last step, we find local maxima of the magnitude of Hilbert envelope separated by at least 400 ms. These maxima determine the positions of AO waves. The interbeat intervals in SCG are calculated as differences between timing points of successive AO waves as in the following equation: where t AO,i is the ith cardiac interval in SCG and t n denotes the occurrence of nth AO wave.

HRV analysis
We calculated the mean interbeat interval (mean NN), the standard deviation of all interbeat intervals (SDNN), the ratio of number of interbeat interval differences greater than 50 ms (NN50), the proportion calculated by dividing NN50 (pNN50) by the total number of interbeat intervals, the root mean square of differences (RMSSD) of successive RR intervals in accordance with current recommendations [2]. For frequency domain analysis, we used sampling frequency equal to 3 Hz and Hann window defined in the following equation: The power of the low-frequency band ( PSD LF ) was computed in the band 0.04-0.15 Hz, the power of very low-frequency band ( PSD VLF ) was calculated for frequencies under 0.04 Hz, and the power of the high frequency band ( PSD HF ) was computed in the band 0.15-0.4 Hz. The LF/HF ratio was computed as the PSD LF /PSD HF ratio.

Results
Due to the lack of annotations of recordings from CEBS database [39], the heart beats in SCG signal were annotated using the algorithm described in "Reference beat detection algorithm". Heart beats determined by this algorithm are treated as reference beats for SCG signal. Tested heart beat detector based on algorithm proposed in paper [24] was evaluated as the number of true positives (TP), false positives (FP), false negatives (FN), the number of beats, sensitivity, and positive predictive value (precision).
When the difference between position of reference AO wave and detected AO wave is within 180 ms margin, then this AO wave position is considered a true positive. False negative occurs when tested beat detector omits a true AO wave in reference annotation. False positive is determined for false detected AO wave.
Sensitivity (Se) is defined in the following equation: and positive predictive value (PPV) is defined in the following equation: The number of beats is the sum of TP and FN. Table 1 presents beat detector performance measures on signals b001-b020. Table 2 presents beat detector performance measures on signals m001-m020 and Table 3 shows performance measures on signals p001-p020. The best heart beat detection performance of tested algorithm within the analyzed series was achieved on signals m001-m020 (overall sensitivity of 0.939 and positive predictive value of 0.945) due to the lower number of false positive and false negative results. The worst overall performance was achieved on signals p001-p020 (overall sensitivity of 0.877, precision of 0.857) and the performance of heart beat detection expressed as the overall sensitivity was 0.893 and for overall precision value of 0.896.
Mean and standard deviations of HRV indices obtained from interbeat intervals from ECG and SCG are presented in Table 4 for signals b001-b020, for signals m001-m020 in Table 5, in Table 6 for signals p001-p020, and in Table 7 for all analyzed signals.
Mean and standard deviation values of calculated indices are similar in each group of signals except SDNN, RMSSD, NN50, pNN50, and PSD VLF , where values achieved for tested algorithm are significantly greater. HRV indices mean and standard deviation are similar for 5-min signals (b001-b020 and p001-p020).   Tadi et al. [25] observed that HRV indices obtained from ECG and SCG have strong linear relationship. To examine the strength of linear correlation between HRV indices obtained from ECG and SCG, we used MATLAB Curve Fitting Tool to calculate Table 4    the goodness of fit to the 1st degree polynomial (linear) model. The goodness of fit is expressed as the coefficient of determination R 2 . Table 8 presents, Tables 9, 10, and 11 present correlation of determination ( R 2 ) calculated for linear model describing the relationship of HRV indices calculated from ECG and SCG on recordings b001-b020, m001-m020, p001-p020, and all recordings.     R 2 values calculated for linear fit between HRV indices derived from ECG and reference SCG beats indicate strong linear relationship except for NN50 and pNN50 in all signal groups except signals p001-p020 for NN50. When using tested heart beat detector, obtained R 2 values are lower for all recording groups. Mean NN, PSD LF and PSD HF have the maximum value of R 2 for each group of recordings. The weakest correlation was observed for SDNN, RMSSD, PNN50, and LF/HF for all groups of recordings, except LF/HF for recordings p001-p020.  Despite the similarities of mean and standard deviation of analyzed HRV indices among the analyzed signals (heart beats obtained from ECG lead I, reference SCG beats and SCG with heart beats obtained using tested algorithm), there are significant differences in correlation between HRV indices between ECG and SCG signals. These discrepancies show that the correlation between HRV indices obtained from ECG and SCG depends on the quality of heart beat detection on SCG signals. To reduce the influence of the outliers in the model which are shown in Figs. 2 and 4, we applied robust model fitting using least absolute residual (LAR) method described further in [40] and least squares method (LSq). Then, the maximum value of R 2 coefficient was chosen as a result of robust model fitting. R 2 coefficients for recordings b001-b020 are shown in Table 12, for recordings m001-m020 are presented in Table 13 and R 2 values for recordings p001-p020 are shown in Table 14. Table 15 presents the R 2 values for all analyzed recordings.  Using robust model fitting improves the correlation between HRV indices obtained from ECG and SCG except for p series and all analyzed signals due to the large number of outliers found in linear model.

Conclusion
In this study, we presented the feasibility of HRV analysis using SCG signal and compared results obtained from ECG and SCG heart beats. Mean interbeat interval (Mean NN), PSD LF and PSD HF are most robust to SCG signal noise and have the strongest linear correlation. HRV indices obtained from heart beat intervals using two different beat detectors on SCG signals are similar except SDNN, RMSSD, NN50, pNN50, and PSD VLF , which are induced by noise in SCG signals and the limitations of tested beat detector. Using robust fitting to the linear model improves the correlation between HRV indices obtained from ECG and SCG signals [28] (except the R 2 values of pNN50 values in p series and for all analyzed signals) and indicates the need to design a reliable heart beat detector which works on SCG signals. Beat detection performance of tested algorithm on all SCG signals is quite good on 85,954 beats ( Se = 0.930 , PPV = 0.934 ) despite lower performance on noisy signals. Sensitivity and PPV on signals b001-b020 ( Se = 0.893 , PPV = 0.896 ) is lower than reported in paper [28] ( Se = 0.995 , PPV = 0.991 ) and Rivero et al. paper [41] ( Se = 0.99 , PPV = 0.97 ). Tested algorithm has lower performance on SCG signals m001-m020 than reported in Li et al. [39] paper ( Se = 0.9933 , PPV = 0.9941 ) due to the fact that tested algorithm based on the beat detector proposed by Tadi et al. [24] was susceptible to noise which strongly worsens the performance of heart beat detection. Other causes of worse performance include the occurrence of AO waves which are not the most prominent peaks and the fact that the heart beats on SCG signals detected as the nearest local maximum after the occurrence of the R wave in ECG signal may not occur within 90 ms.
Strong linear relationship between most HRV indices obtained from ECG and SCG signals, especially between indices derived from ECG and reference beat detector on SCG signals, indicates the reliability of using SCG-derived interbeat intervals for HRV analysis [18,25,28]. Lower coefficients of determination between HRV indices obtained from ECG signal and beats detected on SCG signal using tested algorithm are caused by the noise found in analyzed signals. The possibility of recording and processing cardiac vibrations using one device broadens the scope of applicability of SCG [18,25]. HRV analysis on SCG signal performed on smartphones may be used in mental stress assessment [27] or atrial fibrillation detection [42]. In future works, we will investigate the influence of other SCG beat detection algorithms on HRV indices.
Abbreviations SCG: seismocardiography, seismocardiogram; HRV: heart rate variability; ECG: electrocardiogram; CEBS: combined measurement of ECG, breathing and seismocardiogram; AO: atrial valve opening wave; mean NN: mean interbeat interval; SDNN: standard deviation of all interbeat intervals; NN50: the ratio of number of interbeat intervals greater than 50 ms; pNN50: the ratio defined as the division of NN50 by the total number of interbeat intervals; RMSSD: root mean square of successful differences of interbeat intervals; PSD LF : the power of low-frequency band of interbeat intervals; PSD VLF : the power of very low-frequency band of interbeat intervals; PSD HF : the power of high frequency band of interbeat intervals; LF/HF: the ratio of PSD LF and PSD HF ; TP: true positive; FN: false negative; FP: false positive; Se: sensitivity; PPV: positive predictive value; R 2 : coefficient of determination of linear regression fit; LAR: least absolute residual method; LSq: least squares method.

Authors' contributions
SS participated in design of study, investigation and the analysis of results. PSK and EJT helped to draft the manuscript and supervised the study. All authors read and approved the final manuscript.

Funding
This study was supported by Silesian University of Technology.