Selected HRV features for extraction.
Heart rate variability (HRV) is a physiological measurement that can help to monitor and diagnose chronic diseases such as cardiovascular disease, depression, and psychological stress. HRV measurement is commonly extracted from the electrocardiography (ECG). However, ECG has bulky wires where it needs at least three surface electrodes to be placed on the skin. This may cause distraction during the recording and need longer time to setup. Therefore, photoplethysmography (PPG), a simple optical technique, was suggested to obtain heart rate. This study proposes to investigate the effectiveness of PPG recording and derivation of HRV for feature analysis. The PPG signal was preprocessed to remove all the noise and to extract the HRV. HRV features were collected using time-domain analysis (TA), frequency-domain analysis (FA) and nonlinear time-frequency analysis (TFA). Five out of 22 HRV features, which are HR, RMSSD, LF/HF, LFnu, and HFnu, showed high correlation (rho > 0.6 and prho < 0.05) in comparison to standard 5-min excerpt while producing significant difference (p-value < 0.05) during the stressing condition across all interval HRV excerpts. This simple yet accurate PPG recording system perhaps might useful to assess the HRV signal in a short time, and further can be used for the ANS assessment.
- autonomic function
Human body is interacting between each other where it consists of many different interacting systems. Any changes in human body will generate response to all parts of the body include the autonomic nervous system (ANS) . ANS controls the system that regulates bodily functions such as the digestion, respiratory rate, heart rate, pupillary response, urination, and sexual arousal. Any changes in ANS can be detected by heart rate variability (HRV) since HRV and ANS is directly related.
Heart rate can be defined as the number of heart beats per minute while heart rate variability (HRV) is the fluctuation in the time intervals between adjacent heartbeats. HRV refers to the time series of the interval variation between consecutive heart beats and it can be analyzed in time, frequency and nonlinear domains . The fluctuations in HRV value reflects neurocardiac function of the body as it is generated through heart-brain connection and autonomic nervous system (ANS) dynamics [3, 4].
HRV is a common measurement that can be extracted from the physiological measurement and helps to monitor the psychological stress . It is because, HRV has direct connection with the autonomic nervous system (ANS) where any changes that occurred in human body can be directly detected by the HRV. The common methods to get the HRV are by using the ECG. However, there are several difficulties to record the ECG signal. First, it requires at least three surface electrodes to be placed on the skin to get single lead channel . This clearly shows bulky of wires are needed for the recording and might cause distraction and uncomfortable feeling to the patient. Furthermore, it requires several times to set up the ECG before start the recording.
In deriving the HRV signal, appropriate QRS algorithms need to be applied to detect the peaks and its R wave, to obtain the interval of RR, and to find acceptable interpolation and resampling to produce a consistently sampled tachogram. By using the ECG signal, the resultant HRV could have several errors in the HRV signal due to drift, electromagnetic and biological disturbance, and the complicated morphology of the ECG signal .
Therefore, a simple recording system in deriving the HRV signal is needed. PPG which is an electro-optical technique that detect the changes of blood volume in the microvascular bed of the tissue is believed able to overcome the problem that faced by ECG signal and has been suggested as an alternative method to derive the HRV signal .
The PPG sensor’s system is equipped with a light source and a detector, it also developed with red and infrared (IR) light-emitting diodes (LEDs) that commonly used as the light source. The light intensity of the PPG sensor monitor has been changed via the reflection from or transmission through the tissue. Figure 1 shows the signal from ECG and PPG signal. Derivation HRV signal from ECG is calculated from R-R interval, while the calculation of HRV signal from PPG signal is used inter-beat interval (IBI) or pulse interval (PPI) .
The light traveling through biological tissue passes many materials, including pigments in the skin, bone, and arterial and venous blood. The changes of blood flow mainly occur in the arteries and arterioles (but not in the veins). For example, during the systolic phase of the cardiac cycle, the arteries contain more blood volume than the diastolic phase. PPG sensors optically detect changes in the blood flow volume, for instance, changes in the detected light intensity in the microvascular bed of tissue through the reflection from or transmission through the tissue .
As previously discussed, both ECG and PPG system are able to provide information on cardiovascular activities. While ECG system allow better depiction of real cardiac movement through the measurement of the electrical signals produced by the action potential of the tissue, PPG allow adequate cardiovascular measurements such as heart rate and cardiac output only through pulsatile flow of blood in the arteries. Several studies have shown that the cardiovascular parameters collected through PPG systems are highly correlative and comparable to the measurements taken through standard ECG system [8, 10, 11]. This proves that despite not being able to illustrate exact cardiac waveforms or ectopic beats, PPG could serve as better alternative for portable heart monitoring device.
In terms of measurement accuracy, there are several factors to be considered to ensure the reliability of data collection. Topographical factor such as position of sensor placement on the body plays an important factor since different area of the body constitutes different accuracy of perfusion readings. The most accurate perfusion readings are recorded in earlobe; however, the wrist does allow perfusion readings with appropriate accuracy . PPG watch is not subjected to electrical interference and drying or dropping-off of electrodes .
Therefore, this study proposes a PPG recording system for heart rate variability measurement that can be further used for mental stress assessment.
ECG and PPG signal has been collected from 12 healthy subjects randomly selected with no prior symptoms of autonomic or cardiovascular disorder, ages between 20 and 30 years old. The data was collected with duration of 30 min including 10 min of adjustment, 10 min of rest (baseline) and 10 min of mental arithmetic testing. As a type of mental stress test, participants were needed to conduct an internet arithmetic test for 10 min in order to evaluate HRV under stress conditions such as time constraint. Lead II ECG setup with three electrodes were placed on the skin of the subject. For PPG signal, the wristband was placed on the left wrist. The subject was asked to sit down and make sure they are familiarized with the procedure. The ECG and PPG were recorded simultaneously after device was setup. The data was imported to the MATLAB software for the signal processing (Figure 2).
2.1 Signal processing
The recorded PPG and ECG signals were then pre-processed to extract the HRV using MATLAB software (Figure 3).
2.1.1 HRV derived using PPG
The PPG signal began with the band pass filter to attenuate noises contained in the signals. The band-pass filter was made of cascaded lowpass and high-pass filters. The cut-off frequencies that have been used 5 and 11 Hz. The low pass filter (LPF) eliminates the noise from other part of body, such as the muscle noise and also 50 Hz power line noise. The high pass filter (HPF) which is used to remove the motion artifacts .
After that, the PPG signal undergo the slope sum function (SSF). This method is to enhance the systolic peak of the PPG pulse and to suppress the balance of the pressure waveform by using equation in Eq. (1) .
where w and sk are the length of the analyzing window and the filtered PPG signal, respectively. The SSF algorithm initialize the localization of the onset and offset of SSF then the pulse peak is identified as the local maxima within the range. The SSF signal produced coincides completely with the PPG pulse onset and offset and the pulse peaks appeared within the range of SSF pulse .
2.1.2 HRV derived using ECG
For ECG processing, Pan and Tompkins algorithm was implemented to get the HRV signal . The Pan and Tompkins procedure are more complex as ECG signal contains superimposition of several waves (P, QRS, and T waves) as seen in Figure 3 . After initial denoising using BPF, the waveform undergoes differentiation process to obtain slope information overcome baseline drift. The next step is to perform signal squaring to emphasize higher frequency signal components (QRS waves) while attenuating components of low frequency. Resultant signal obtained through the squaring phase was then smoothed using moving average filter with a moving window integrator at 80 ms. A thresholding process is required to ensure that only the true QRS complex detected and the adaptive thresholds have been set for the classification of the locations of the detected R points.
The N-N interval was then computed and outliers presented in the signal was removed. Some of the data segment loss through the outlier extraction method was substituted by a new data segment using a linear interpolation method that resulted in NN intervals with nonequivalent moment sampling. However, the use of irregularly sampled NN intervals during HRV analysis characteristics such as frequency and TF analysis would cause generation of additional harmonic components and artifacts in (Figure 4) .
Therefore, the HRV signals were resampled at standard sampling frequency of 4 Hz . Finally, the NN interval was passed through detrending process to overcome irregular trends.
2.2 HRV feature extraction
|Processing method||HRV features||No. of features|
|Time analysis||HR, SDNN, SDANN, RMSSD, HTI, NN50, pNN50||7|
|Frequency analysis||VLF, LF, HF, LF/HF, LFnu, HFnu, TP||7|
|Nonlinear analysis||Shannon entropy: LF, HF, LF/HF, Total(O); Renyi entropy: LF, HF, LF/HF, Total(O)||8|
2.2.1 Time-domain features
In this study, the time domain has been analyzed from HRV signal. Besides that, HRV features were extracted which are standard deviation of the normal-to-normal intervals (SDNN), standard deviation of the average of normal-to-normal intervals (SDANN) and root mean square successive difference (RMSSD). SDNN, SDANN and RMSSD were calculated by using equations in Eq. (2), Eq. (3) and Eq. (4) respectively.
where N is total window length and NN is normal-to-normal time interval.
where N5 is 5 min window length and NN is normal-to-normal time interval.
where N is total window length.
2.2.2 Frequency-domain features
For this research, AR using the Burg estimation technique has been used to optimize forward and backward prediction errors. The power spectrum of the AR technique using the Burg estimation can be calculated as follows,
where êp represents the sum of both forward and backward prediction errors or the total least square error while p denotes the model order and â (l) indicate pth order of the AR coefficient.
2.2.3 Nonlinear time-frequency features
Nonlinear analysis was performed using Modified B-distribution (MBD) as the technique is capable of providing high resolution TF distribution without cross-terms for HRV analysis. . The kernel for the MBD as follows,
where Γ defines as gamma function and β is a real positive number between 0 and 1 that regulates the trade-off between component resolution and cross-cutting elimination.
2.3 Multiscale HRV comparison and correlation analysis
In order to investigate the statistical significance (p-value < 0.05), Spearman’s correlation is conducted between HRV features of multiple length under both resting and stress conditions. It is performed to determine the correlation between the HRV features produced through PPG signal in comparing with standardized ECG signal. A nonparametric Wilcoxon signed-rank test was performed to observe the difference between resting (baseline) and arithmetic stress test.
3. Result and discussion
This chapter presented the results obtained through pre-processing, feature extraction of HRV and multiscale comparison and correlation analysis along with relevant discussions of the findings.
3.1 Signal processing
3.1.1 HRV derived using PPG
Figure 5 presented the attenuation of the PPG signal pulses after the application of the SSF conversion. The pulse peaks became more distinct throughout the entire signal duration using SSF conversion as lower ectopic beats were also amplified to match ordinary pulse peaks that facilitate peak detection during thresholding method. Figure 6 showed the resulting HRV signal that was obtained after removal, resampling and detrending of the outlier.
3.1.2 HRV derived using ECG
Figure 7 showed the changes in the ECG signal throughout the Pan and Tompkins algorithm processes. It can be seen that the algorithm was able to detect the R-R intervals throughout the signal excerpt. This method was chosen due to the simplicity and efficacy of this algorithm in QRS detection among adult subjects with 99.3% accuracy rate . The subsequent HRV signal produced (illustrated in Figure 8) after smoothing procedure was then used for feature analysis. Smoothing process which comprised of the outlier removal, resampling and detrending.
While evaluating the algorithm necessary for the HRV signal acquisition, it can be said that the pre-processing of the HRV signal recorded using the PPG system is simpler, as the signal contained only one type of wave (blood pulse) compared to the ECG signals usually containing a combination of three waves (P, QRS and T waves). Despite that, the HRV signal produced through both recordings do have relatively consistent magnitude.
3.2 HRV feature extraction
The analysis discussed in this section focuses mainly on the HRV features extracted using PPG method. Generally, the features selected have been associated with significant reactivity under stress conditions.
3.2.1 Time-domain features
The HRV signal obtained under resting and stress conditions were subsequently plotted in Figure 9 which also showed the HRV obtained with time excerpts of 10 min duration. In addition, different lengths of HRV excerpts carry different weightage of information on the HRV of the sample. Longer HRV excerpts allow better visualization of fluctuations in the HRV measurements in both conditions. However, it is difficult to distinguish the difference of HRV changes between resting and stress testing through visual inspection only.
3.2.2 Frequency-domain features
The PSD can be classified into three components which are VLF band between 0.0033 and 0.04 Hz, LF band between 0.04 and 0.15 Hz and HF band between 0.15 and 0.4 Hz .
Based on the findings in Figure 10, the LF components increases during stress testing while HF components relatively decreases.
3.2.3 Nonlinear time-frequency features
For the plotted Figure 11, it was observed that more complex changes experienced during stress testing in 10 min. TFD plot was able to provide supplementary visualization of more complex changes within the HRV features during stress phase. Next, the changes within VLF and LF frequency bands were also more noticeable in TFD analysis.
3.3 Multiscale HRV comparison and correlation analysis
Based on this finding, it can be seen that most of the HRV features extracted using the PPG device produced similar measurements as the ECG, especially for the TA and FA features. However, for more sophisticated measurements, such as nonlinear TF characteristics, the correlation between the two techniques was less important, particularly for smaller HRV characteristics. This could be due to the fact that PPG waveform mainly reflects the central artery properties which means factors such as artery stiffness may attenuate the signal and resulted in differences of NN intervals obtained between different individuals . The PPG signals are also influenced by other parasympathetic activity such as temperature variations  and could significantly changes due to factors such as body age, vascular age, physical status, sleeping hours, physical activities .
Correlation analysis was performed to assess the interdependence between PPG-derived HRV and ECG-derived HRV as shown in Table 2.
|Features||r Rest||r Stress|
|Nonlinear analysis||ShEn LF*||0.800||0.818|
In general, HRV features resulted less correlated in resting than during stress conditions. This is most likely due to the fact that HRV showed a more depressed dynamic during stress phase. Other than that, HRV features such as HR, NN50, TP, VLF, LF, HF, Lfnu, Hfnu, LF/HF, and Renyi entropy (LF, HF and Total(O)) has also showed significant correlation between the values measured for HRV excerpts collected using PPG and ECG. This prove that PPG is able to produce HRV signal with equivalent significant to HRV signal produced by ECG during stress testing [8, 22]. Besides, it can be deduced that HR, RMSSD, LF/HF, Lfnu and Hfnu features showed consistent characteristics as valid surrogate of the standard HRV which means regardless of length of HRV signal (between 1 and 10 min), these features would produce values that high correlate to value produced with standard HRV excerpt.
This study intends to investigate if there is different length of HRV excerpts provide valid measurement of HRV indices with comparison to standard 5-min excerpt for detection of mental stress. Although many studies have shown that HRV analyzes provide a reliable quantification technique for mental stress, it is hard to compare the precision of each method as their experimental design (i.e., duration of HRV characteristics) differs. Although it was claimed that the excerpt of 5-min HRV is the gold standard , the growing demand for wearable devices to instantly evaluate mental stress has increased interest in HRV computing characteristics shorter than the 5-min HRV standard . In order to investigate the utility of various length of HRV excerpts in quantifying HRV features, 22 features were extracted at each time interval. The agreement between features at each time interval was compared with standard 5-min excerpt under both resting and stress phases. Overall, TA features (except HTI) conform significantly across all excerpts in correlation to standard excerpt while FA features (i.e., VLF, LF, HF, and TP) showed significant correlation across excerpts longer than 3 min while LFnu, HFnu and LF/HF showed consistent high correlation for all excerpts. As for time-frequency analysis, Shannon entropy measurements showed significant correlation for signal excerpts longer than 4 min while for Renyi entropy, only HF and Total(O) measurements showed significant correlation throughout all time excerpts.
Despite that, the limitation of these analyses is that correlation coefficient is blind to the possibility of bias caused by the difference in the mean or standard deviation between two measurements .
In comparison to conventional ECG, a correlation assessment between HRV characteristics obtained by PPG was also performed to observe any variation between the extracted measurements and analyze whether the PPG system is sufficiently robust to obtain HRV characteristics according to clinical standards. For this research, an ultra-short and short-term HRV feature was presumed to be a valid surrogate of the equivalent standard HRV if the feature sustained at a high correlation (i.e., rho > 0.6 and prho < 0.05) with the equivalent 5-min standard feature over all time scales and produced consistent trend and significant difference (p-value < 0.05) during the rest and stress phase. Therefore, it can be deduced that HR, RMSSD, LF/HF, LFnu and HFnu features showed consistent characteristics as valid surrogate of the standard HRV which means regardless of length of HRV signal (between 1 and 10 min), these features would produce values that high correlate to value produced with standard HRV excerpt. In the future, methods such as machine learning may be applied to test the accuracy between the use different PPG specifications such as measurement site, probe contact force and LED wavelengths which affect the reliability of its recordings or between different experimental protocol such as type of stressor and subject conditions.
This study was supported by the Research University Funding from Universiti Teknologi Malaysia, Malaysia (FRGS: R.J130000.7851.5F219).