Introduction

Nowadays, many computerized systems are being implemented to help clinicians to detect and classify cardiac abnormalities [1, 2]. One of the aspects of the heart activity that offers valuable information is the analysis of the heart rate (HR, number of heartbeats per unit of time). The time separation between two consecutive heartbeats is called RR interval. Variation between successive RR intervals is called Heart Rate Variability (HRV) [3], and provides an indicator of the physical state of the heart [4].

The analysis of HRV can be performed in both time and frequency domains. Spectral analysis allows to measure HRV by decomposing signals into frequency bands, associated with different components of the Autonomic Nervous System (ANS) [5]. The low frequency (LF) index (0.04–0.15 Hz) is influenced by the sympathetic and parasympathetic branches of the ANS; the high frequency (HF) component (0.15–0.40 Hz) is related to baroreflex function. Time domain indexes are directly measured from the RR interval series [6]. The most used parameters are SDNN (standard deviation of RR intervals), IRRR (difference between third and first quartile), pNN50 (proportion of adjacent RR intervals differing by more than 50 ms), SDSD (standard deviation of differences between adjacent RR intervals), rMSSD (square root of the mean of the squares of differences between adjacent RR intervals), MADRR (median of the absolute differences between adjacent RR intervals) and HRVi (HRV triangular index).

In spite of the information provided by both frequency and time HRV analysis, the ANS is a complex system that cannot be completely analyzed employing linear measures. Several authors have proposed the use of nonlinear techniques to analyze the unpredictability of the time series, such as an instantaneous HR, arising from the complexity of the mechanisms that regulate HRV [7]. Among the nonlinear indexes, the approximate entropy (ApEn), measure of the the fluctuations in the time series), and the Poincaré plot (graphical representation of the dependence between successive RR intervals) can be considered. This last measure is usually quantified by fitting an ellipse to the plot, which results in two parameters characterizing the ellipse: SD1 and SD2. The first is a measure of the HF variation of the HR, while SD2 measures the LF variation of the HR [7].

In the last decades, many interesting studies about the use of HRV as a tool to help in the diagnosis of different diseases have been published [8,9,10,11,12]. Despite these continuous investigations, these advances have not been transferred to the clinical protocols. One reason can be the lack of standardized HRV reference values for healthy populations, which are very common for other physiological indexes, such as body temperature or blood pressure. Other reason is the heterogeneity of measurement protocols and software tools used to obtain HRV indexes. The acquisition of HR data at different moments of the day, or in different body positions, also affect HR, as well as the duration of the HR signal recording. It is just in this context where the present work is framed, which presents several recommendations to perform HRV-based experiments, in an attempt to solve the gap between the research field and the clinical practice.

Lifestyle, environmental factors or physiological conditioning [13] influence HRV indexes as well. Some causes are unmodifiable, such as age [4], gender [14, 15] or genetics [16]. As physiological factors, the influence of hormones over the HRV can be quoted [17], as well as respiratory or neurological causes [18]. Related to environmental constraints, chemical working environments and pollution also affect HRV parameters [19], and physical activity [20], alcohol, tobacco and drugs consumption [21] can lead to HRV values that can be altered by the lifestyle.

Related to the lack of reference values, in an attempt to standardize HRV studies, different guiding values have been proposed [22,23,24,25]. Several works established suggestions for planning experiments, related to body position [26], or software analysis [27].

In addition, methodological problems related to acquisition and analysis of heart rate data may also arise [28]. This may lead to different results for HRV parameters, that cannot be compared, and can even be questioned by other researchers. For example, Tegegne et al. employed baseline data of 10-s electrocardiograms (ECGs), and calculated the rMSSD as a measure of cardiac parasympathetic nervous system activity [14]. Their results were challenged by Lombardi et al. [29]. They were concerned about the HRV measurement, duration of the ECGs, and use of the rMSSD measured on a very short-term basis. Other example is provided in Sammito and Böckelmann [23], who employed signals with a duration less than 5 min to calculate several commonly used HRV parameters for 24-h ECG measurements. This was considered an inconsistent methodology by Bauer et al. [22], who indicated that the HRV values did not reflect 24-h spectral analysis. In a further study, considering the methodological indications given by Bauer, Sammito and Böckelmann obtained very different results for some of the analyzed parameters. For example, SDNN values for mean aged 20–60 years, ranged from 55.76–92.55 with the first methodology [23], and from 182.82–259.25 in the latest work [25].

The main goal of this work was to provide indications to record and analyze HR data in HRV-based experiments. Suggestions were selected according to the existing literature [22,23,24,25,26], and were concerned to body posture, moment of the day, and HR signal duration.

The rest of the paper is organized as follows. Section 2 presents methodology, sample population, protocol for data collection, analyses and statistics. Sections 3 and 4 present and discuss the main findings. Finally, Section 5 presents the main conclusions.

Methods

HR data were acquired from RR intervals and processed. Different versions of the original HR data were obtained by automatically and manually filtering original signals. The central 3-min and 1-min portions of the filtered signals were also extracted. HRV analysis was performed over all versions, and the most robust indexes in frequency and time domains were obtained. Some nonlinear indexes were also calculated. Statistical analysis was used to evaluate the results.

Study population

Two women (subjects 1 and 2), and 4 men (subjects 3, 4, 5 and 6) with median age of 50 years old were recruited for the study. All of the provided written informed consent. They did not suffer from cardiac pathology, psychiatric disorder, or other documented disease. They were not taking drugs or illicit substances. Ethical approval was obtained from the Research Committee of the University of Vigo. The study was conducted in accordance with the ethical principles of the Declaration of Helsinki.

Protocol of data collection

Data were collected in identical conditions for all participants. HR signals from RR intervals were obtained, avoiding noise and movement. A detailed explanation about the process was given to each participant: they had to perform a total of six 5-min daily HR signals, during 15 days. Recordings corresponded to two body positions (lying, sitting), and three different hours. Morning recordings were acquired on an empty stomach situation, between 07:00–08:00 a.m. Afternoon data were obtained between 14:00–15:00 p.m. Finally, night signals were recorded between 21:00–22:00 p.m.

Heart rate signal database recording

To preserve privacy, a confidential code was assigned to each individual. Each participant was provided with a Polar WearLink chest strap (http://www.polar.com), with Bluetooth connection, which sent the heart beats signal to a laptop.

In each period (morning, afternoon and night), each participant placed the strap over his/her chest, performing two different signal acquisitions (first lying, second sitting). The acquisition time for each recording was 5 min.

To record the signal, the open source tool gVARVI (graphic heart rate Variability Analysis in response to audioVisual stImuli, https://milegroup.github.io/gVarvi/) was employed [30]. After the acquisition, data were visually validated to ensure they were correct, employing the gHRV application (https://milegroup.github.io/ghrv/) [31]. Consistent values for the number of beats, mean HR and mean RR were also checked. If an error occurred during the process, it was repeated.

In total, 540 files were stored, 90 per participant: 15 morning-lying, 15 morning-sitting, 15 afternoon-lying, 15 afternoon-sitting, 15 night-lying, 15 night-sitting. The database can be freely downloaded from milserver.esei.uvigo.es, “Recommendations for HR Signal Acquisition Database” [32], and from Synapse Repository (https://doi.org/10.7303/syn18524965).

Heart rate signal processing

Different versions of each original signal were obtained from the acquired data. The RHRV package (rhrv.r-forge.r-project.org) was used for all calculations [6]. The process involved the next steps:

  1. 1)

    Signal extraction: in addition to the original signal, four versions were obtained:

    1. a)

      Filtered signal: calculated by applying automatic filtering to the original data generated in the previous step. It was applied to reduce incorrect data and remove artifacts [33].

    2. b)

      Manual filtered signal: for the rarer cases in which the automatic artifact removal algorithm failed, artifacts were manually removed from a graphical window, employing a function included in the RHRV package [6].

    3. c)

      Three-minute signal: the portion of the signal corresponding to the 3 central minutes was extracted from the filtered signal, employing an R-based algorithm.

    4. d)

      One-minute signal: similarly, the central 1-min portion of the filtered signal was extracted.

  2. 2)

    Interpolation: with cubic spline interpolation at 4 Hz. It was performed to avoid discontinuity problems, and to get a proper HR signal to calculate spectral parameters.

  3. 3)

    Spectral analysis: the Short-Time Fourier Transform (STFT) was applied in all cases, and 1-min windows shifted 1 s were used. Powers in the LF and HF bands were obtained. The total power (HRV) (sum of the powers in the previous bands) was also calculated.

  4. 4)

    Time analysis: calculated over each original and version signal. Values for SDNN, IRRR, pNN50, SDSD, rMSSD, MADRR, HRVi were obtained.

  5. 5)

    Nonlinear analysis: also computed over original signals and versions. Values for ApEn, SD1 and SD2 were calculated.

Studies

To verify how different factors affect HRV analysis, the widely used SDNN parameter was calculated in various studies:

  1. 1)

    Time of day: morning, afternoon and night recordings.

  2. 2)

    Body position: lying and sitting.

  3. 3)

    Quality: original signals and automatically and manually filtered ones.

  4. 4)

    Duration: complete records and 3-min and 1-min portions.

Stability of HRV indexes was also studied, and time evolution from day 1 to 15 was analyzed. All HRV indexes were categorized as follows [6]:

  • Global: HRV, SDNN, IRRR, ApEn.

  • High frequency: HF, pNN50, SDSD, rMSSD, MADRR, SD1.

  • Low frequency: LF, HRVi, SD2.

Statistical analysis

In all studies, results were expressed in terms of average values. Since data were proven to be not normally distributed, the Wilcoxon test was used, and a p value of statistical significance of 0.05 was considered. Calculations were performed employing the R software package (www.r-project.org), and the free open source software package GASATaD (Graphical Application for Statistical Analysis of Tabulated Data, https://milegroup.github.io/gasatad/).

The well-known boxplot graphs were used, and time evolution graphs for the HRV parameters were also obtained, in case they provided relevant information.

Results

Time of the day

To establish the influence of the time of day on the HRV indexes, as an initial starting selection, specific recordings were considered, by fixing all other confounding factors. Particularly, the automatically filtered HR recordings for the sitting position were considered. A similar study was performed for the supine position, and results were similar.

Median values for SDNN corresponding to the different periods of day were calculated. A decrease in those values from morning to night was observed (Fig. 1).

Fig. 1
figure 1

SDNN values for all periods of time

Results yielded statistically significant differences when contrasting morning versus afternoon and night in almost all cases. Thus, experiments should not mix recordings performed at different times. For simplicity for individuals, maybe the best moment to acquire HR data is the morning period. Moreover, other factors affecting HRV could be avoided, such as food or alcohol and coffee consumption, fatigue, or even work stress [34].

Body position

The automatically filtered HR recordings for the morning period (determined as best moment in the former study) were selected. Median values for SDNN corresponding to the different positions were calculated. Those values significantly decreased for subjects 3 and 5 from lying to sitting position, and had no statistically significant differences for the other subjects (Fig. 2).

Fig. 2
figure 2

SDNN values for all positions

A stability index for both positions was also calculated, obtained as the standard deviation divided by the mean value. The average value for this index was lower for the sitting position (0.26 ± 0.13), than for supine posture (0.37 ± 0.24).

Our results totally agree with those of Young and Leicht, who stated that any resting position could be valid [26]. Since acquiring HR data seems to be easier when subjects are seated than lying (stretchers are not needed), our recommendation is to acquire HR data in sitting position. In any case, mixing signals recorded in both positions is not recommended.

Quality

Considering the previous results, the influence of the original, automatically and manually filtered signals over the SDNN parameter was studied. Figure 3 shows the daily evolution of the SDNN parameter for each subject and type of record, considering HR signals from morning period and sitting position (previously determined as best moment and position, respectively).

Fig. 3
figure 3

Daily evolution for SDNN values

From Fig. 3, it can be observed that for subjects 2, 3 and 5 there is a slight difference between original and filtered recordings; however, for subjects 1, 4 and 6, differences appear, specially when comparing original and manually filtered data.

Figure 4 shows the boxplots of SDNN values for the analyzed types of records. Significant differences were found when comparing original data versus manually filtered signals for subjects 1, 4 and 6.

Fig. 4
figure 4

SDNN values for original, automatically and manually filtered signals

From our results, it cannot be stated that automatic filtering is obliged in all cases. However, HRV measures obtained from filtered data will be more precise, because artifacts and noise have been previously removed. Thus, it is recommended to apply automatic filtering in all situations, if this is possible.

Duration

To test the effects of the signals’ length, the 1-min and 3-min automatically filtered portions, and the entire automatically filtered signal from the morning period and sitting position (best conditions), were compared. Results are presented in Fig. 5. It can be observed that SDNN values obtained for the complete signal were greater than those obtained for the 1-min portion in all subjects. Despite this, significant differences were only found when comparing the SDNN value calculated for the entire signal with the SDNN for the 3-min and 1-min portions for subjects 3 and 5, who had the lower variability. Thus, no recommendation can be deduced from the previous information.

Fig. 5
figure 5

SDNN values for automatically filtered signals and 1-min and 3-min portions

It was verified that differences from the 5-min and 3-min recordings were usually due to the presence of artifacts in the first seconds of the acquisition process, as it can be seen in the first seconds of the signal, in Fig. 6, where an artifact appears. The causes are twofold: 1) the individual was not completely relaxed when the acquisition process began, and his/her HR was not stable; and 2) the device was not completely ready to provide valid, reliable information.

Fig. 6
figure 6

Original HR data signal: artifacts are evident at the beginning of the recording

A solution to avoid this problem could be to acquire a 5-min recording, and consider only the 3-min central portion. Thus, initial 1-min recorded data would be discarded, and the 3-min central segment would provide a more reliable analysis. In any case, researchers should avoid comparing experiments with different record length.

Indexes stability

Robustness and reliability are not equal for all HRV parameters, and vary for time, frequency and nonlinear analyses. In this study, the most stable indexes were also established. This is equivalent to obtain the indexes with less fluctuation over the 15 days. To quantify the stability of these indexes, the ratio between the standard deviation and the mean value was obtained for all HRV parameters. In this way, a stability measure was obtained.

For this study, global indexes were analyzed, as well as those corresponding to high and low frequency components (Table 1). Calculations were performed over recordings acquired in optimal conditions, according to our results: 3-min segments of automatically filtered records, sitting position and morning period.

Table 1 Variation coefficient for HRV indexes. Bold text indicates values lower than 0.3

Global indexes

In general, for linear indexes, both SDNN and IRRR showed low variation coefficients. Results indicate that IRRR is less sensitive to artifacts than SDNN. However, the most stable one is ApEn. Our recommendation is to use the nonlinear measure ApEn, or the linear IRRR index, although SDNN could also be used in some occasions, for example with high quality recordings.

Low frequency indexes

As it can be seen in Table 1, HRVi is more stable than LF. The recommendation is to use HRVi to quantify low frequency HRV.

High frequency indexes

From Table 1, for low-quality HR recordings containing artifacts, only the MADRR parameter shows a variation coefficient under 0.3 for all cases, which indicates that this is the most stable index. However, in high quality recordings, the most common rMSSD parameter could also be used.

Discussion

In this work, recommendations to perform HRV experiments have been established. Specifically, suggestions are referred to the body posture to acquire HR data, as well as to the best moment of the day, quality and duration of the acquisition process (signal length). Stability of HRV indexes has also been studied.

For the best moment of day, indexes decreased from the early hours to the night. Important differences were found between morning and afternoon/night. Thus, it would be advisable to acquire HR data in the morning. In addition, factors affecting HRV could be avoided, such as food or alcohol and coffee consumption, fatigue, or even work stress. In fact, other diagnostics tests, such as blood or urine tests, are already performed in the morning, and on an empty stomach, to prevent from physiological changes affecting cholesterol and glucose levels, and it is demonstrated that fasting also affects the circadian rhythm [34].

The position adopted while recording the HR signal may also affect HRV [24]. No concluding results were obtained; however, indexes of sitting position were more stable than those obtained in lying position. For simplicity, it seems easier to acquire data in the sitting position. In any case, it is not recommendable to mix in the analysis data from different body positions.

The quality of the HR recordings and its influence over the HRV parameters was also analyzed. If proper HR signals are acquired (as those from subjects 2, 3 and 5), signal filtering may not be needed. However, if the original signal presents artifacts (as those from subjects 1, 4 and 6), reliability of HRV indexes may be questioned. Thus, it is recommended to filter the HR series before performing HRV analysis. Manual filtering is also suggested if possible, because in some occasions, automatic filtering cannot deal with noise and outliers.

The duration of HR signals can also affect HRV. Some studies indicate that HRV analysis in short-term recordings may substantially differ from HRV values in long-term signals [29]. In other works, 5-min short-term recordings are recommended; 1-min signals are necessary for the HF parameters, and 2-min recordings are needed for the LF component [4]. Without discussing the recommendation of using 5-min signals, the influence over HRV of recordings shorter than 5 min was analyzed. Results indicate that the value of the SDNN parameter calculated for the entire signal was greater than the SDNN value for the 1-min portion. Values for this measure for 3-min portions were intermediate. This does not seem to be a determining factor. However, comparison of recordings of different length should be carefully performed. In addition, discard of the first seconds of the acquired HR signal would avoid artifacts and provide more trusted results.

The final aspect analyzed in this work was the stability of indexes. For global parameters, results indicate that the nonlinear ApEn measure suffers minor variations. In addition, indexes obtained from the spectrum are less stable than those obtained directly over the time signal. When using high quality recordings, SDNN and IRRR values behave in a similar way. However, if artifacts are present, the IRRR estimation was more robust, which is consistent with other published works [6, 35]. Thus, when the quality of the recorded signals is not good enough, maybe the IRRR is the best parameter to be considered. The most robust indexes in low and high frequency domains were, respectively, HRVi and MADRR. This is again in good agreement with other results previously provided in literature [35].

Conclusion

The task of planning experiments that involve the analysis of HRV is a complex task, and must be carefully performed. Designing the methodology for HR data acquisition and processing is not a trivial question. The reliability and utility of results will depend on the HR signals initially recorded, and the HRV measures obtained from the data analysis.

In this paper, the influence of different factors when acquiring HR data has been studied. Aspects such as the moment of the day and body position to acquire HR data have been analyzed. The quality and length of the signals has also been assessed. Results indicate that HRV analysis is clearly affected by these previous factors. Thus, investigators must be cautious when performing experiments that include signal acquisition as the starting point of methodology.

As general recommendations, HR data should be acquired in the morning and sitting position. Filtering of data is suggested to avoid artifacts and noise. Finally, for comparison tasks, signals of the same duration should be used.

It should be indicated that we were not pretending to establish standardized values in HRV parameters or to provide exclusive rules for data acquisition. This is only a contribution to improve the use of HRV analysis, and there is still too much work to be done. Future challenges will address the issue of obtaining more information about stability indexes, and procuring more recommendations for HR data acquisitions in other different situations.