# ECG, heart rate and heart rate variability

The following algorithms are based on single channel ECG signals that are acquried by the movisens sensors EcgMove, EcgMove 3, or EcgMove 4.

The following process is used to analyse ECG signals and to calculate Heart Rate Variability parameters.

  1. Artefact detection based on raw ECG signal: The ECG signal amplitude and the number of zero crossings per second have to be within a normal physiological range.
  2. R-Peak detection: R peaks are detected with an adapted algorithm from Hamilton, 2002 (opens new window).
  3. NN-List generation: The R-Peaks are filtered by an algorithm that was adapted from Clifford et al. 2002 (opens new window). The signal is checked for valid changes of consecutive RR-intervals, and also for valid changes of consecutive R-peak amplitudes. Most of the detected R-peaks and RR-intervals respectively that do not relate to nromal heart beats are filtered out. The final list of beats is the NN-List.
  4. Segmentation: The RR interval list is segmented into segments with a length of 2 minutes and a shift of 30 seconds
  5. Segment validation: Each segment is checked if enough NN intervals are available for further analysis. Segments with insufficient NN intervals are discarded. For at least 90% of the segment valid NN intervals have to be available.
  6. Detrending: In ambulatory settings stationarity of the heart rate is main concern for heart variability calculation. Therefore the NN-intervals are detrended to meet stationarity criteria Eleuteri et al. 2012 (opens new window)
  7. Calculation of statistical HRV parameters: The parameters SDNN, RMSSD, SDSD, SD1, SD2, pNN50 and Baevsky SI are calculated.
  8. Interpolation: The NN-List is resampled with 4Hz
  9. Calculation of frequency domain HRV parameters: The power spectral density is estimatied using Welch’s method. The the parameters LF, HF, LF/HF parameters are calculated from the spectrum.

Notes for the calculation of HRV parameters (internal segmentation vs. output intervals):

  • DataAnalyzer

    • Segmentation: segment length is 2min, segment shift is 30s. All HRV parameters are calculated for each segment.
    • For each output interval the mean values of the internally calculated values are output.
    • If the output interval is smaller than 30 seconds, values are repeated.
  • Sensor

    • Segmentation: segment length is 30s, segment shift is 30s (no overlap). HRV parameter RMSSD is calculated for each segment.
    • For each output interval (1min fixed) the mean values of the internally calculated two values are output.
    • Segments are smaller on the sensor to reduce latency for sensor based triggering.

Literature:

# R-Peaks (R)

This parameter displays the exact positions of the R peaks of the ECG as events. The temporal resolution depends on the sample rate of the ECG. The default samplerate of movisens ECG sensors is 1024Hz.

The following figure shows a 10 second snapshot of the raw ECG signal and the R peaks underneath. ECG signal with detected R peaks

# Normal-to-normal beat intervals (Nn)

This parameter calculates the positions of the normal beats and the distance in [ms] to the last normal beat. It will show one value per normal heartbeat. A graph showing the RR or NN intervals as time series is also referred to as tachogramm.
ECG signal with normal-to-normal beat intervals

movisensLIVE: nn.csv can be calculated live on the sensor.

# Beat Drop Reason (BeatDropReason)

This output parameter provides the justification for excluding an R-Peak from further analysis.

Coding Beat Drop Reason
1 Maximum allowed R-amplitude variation to previous and next R-peak amplitude is exceeded
2 Maximum allowed RR-interval variation is exceeded
4 Maximum R-amplitude [mV] is exceeded
8 The R-amplitude [mV] falls below the minimum threshold
16 Maximum RR-interval [ms] is exceeded
32 The RR-interval [ms] falls below the minimum threshold

# Beat by beat heart rate (HrBxB)

The heart rate values are output beat by beat, with one value per beat being displayed. The unit is [1/min]. ECG signal with beat by beat heart rate

movisensLIVE: bpmbxb_live.csv can be calculated live on the sensor.

# Heart Rate (Hr)

This parameter caluclates the mean heart rate per output interval. The unit is [bpm].

movisensLIVE: hr_live.bin can be calculated live on the sensor. It also uses the hrv segment validation.

# High Frequncy HF (HrvHf)

This parameter calculates the mean value of the HRV parameter High Frequency (HF) per output interval. HF describes the spectral power in the frequency band between 0.15 and 0.4 Hz. The unit is [ms2]. The output interval is adjustable – see the top of this section for more details.

# Low Frequncy lF (HrvLf)

This parameter calculates the mean value of the HRV parameter Low Frequency (LF) for each output interval. LF describes the spectral power in the frequency band between 0.04 and 0.15 Hz. The unit is [ms2]. The output interval is adjustable – see the top of this section for more details.

# HRV parameter Low to High Frequency Ratio LF/HF (HrvLfHf)

HRV parameter Low to High Frequency Ratio (LF/HF) This parameter calculates the mean value of the HRV parameter Low Frequency to High Frequency Ratio (LF/HF) per output interval.

# HRV parameter RMSSD (HrvRmssd)

This parameter calculates the mean value of the HRV parameter RMSSD per output interval. RMSSD is the root mean square of successive differences of beat intervals. The unit is [ms]. The output interval is adjustable – see the top of this section for more details.

movisensLIVE: hrvrmssd_live.bin can be calculated live on the sensor.

# HRV parameter pNN50 (HrvPnn50)

This parameter calculates the mean value of the HRV parameter pNN50 per output interval. pNN50 is the percentage of NN intervals greater than 50ms. The unit is [%]. The output interval is adjustable – see the top of this section for more details.

# HRV parameter SD1, SD2, SD1/SD2 (HrvSd1, HrvSd2, HrvSd2Sd1)

SD1 and SD2 represent short and long term variability repectively. SD1 and SD2 can be derived from the Poincaré plot of the beat intervals. SD1 is the short half axis, SD2 is the long half axis of a fitted ellipse. SD1 and SD have the unit [ms]. Also the ratio SD2/SD1 can be calculated. The unit is []. The output interval is adjustable – see the top of this section for more details.

# SDNN (HrvSdnn)

This parameter calculates the mean value of the HRV parameter SDNN per output interval. SDNN describes the standard deviation of the beat intervals. The unit is [ms]. The output interval is adjustable – see the top of this section for more details.

# Beavsky Stress Index (BaevskStressIndex)

This parameter was developed by R.M. Baevsky. It is based on frequency distribution of the heart beat intervals. It has no unit []. The output interval is adjustable – see the top of this section for more details.

Literature:

  • Baevsky, R.M. Die Methodik der Analyse der Herzrhythmusvariabilität (übersetzt), 1999
  • Baevsky, R M. Noninvasive methods in space cardiology. Journal of cardiovascular diagnosis and procedures. 1997, Bd. 14, 503-51
  • Baevsky, R M und andere. HRV Analysis under the usage of different electrocardiography systems. s.l.: Committee of Clinic Diagnostic Apparatus and the Committee of New Medical Techniques of Ministry of Health of Russia. 2004.

# HRV Segment Validation (HrvIsValid)

This parameter is the result of the segment validation.

movisensLIVE: hrvisvalid_live.bin can be caluclated live on the sensor.

# ECG derived respiration (Edr)

Respiration can be derived from the ECG signal. This algorithm is based on the principle shown in Moody 1986. It exploits respiration-induced beat-to-beat variations in R-wave amplitude to reconstruct a surrogate respiratory signal. From this signal the respiration rate is calculated. This approach works best at rest activity because respiration-induced changes in R-wave amplitude are relatively small and can be masked by artifacts due to movement.

The steps of the algorihtm are as follows:

  • The single channel ECG and the acceleration signal (accX) is used as input
  • Step 1 and 2 of the ECG processing is used to generate the R peak amplitudes
  • A surrogate respiratory signal is created by spline interploation of the R amplitudes and high pass filtering the signal.
  • Hilbert transform is used to calculate the phase of the surrogate respiratory signal
  • Calculate instantaneous angular frequency from the derivative of the phase signal.
  • Respiratory frequency is calculated internally in 30-s windows from the intervals between successive phase wraps.
  • Serveral quality checks are performed
    • Absolute filtering of intervals (2s to 7s) and filtering cycle-by-cycle-variation to reject abrupt changes
    • Enough intervals in window
    • Variance of instantaneous angular frequency signal
    • Variance of intervals
    • Reject windows with high acceleration signal

Literature:

  • Moody, G. B., Mark, R. G., Bump, M. A., Weinstein, J. S., Berman, A. D., Mietus, J. E., & Goldberger, A. L. (1986). Clinical validation of the ECG-derived respiration (EDR) technique. Computers in cardiology, 13(1), 507-510

# List of inter beat intervals as text file

This generates the text file ‘ReportIbi.txt’ that contains all RR intervals (time between the current and last R peak). Each line of the text file shows one value as output. The unit is [ms].

# PDF Report

Report Type Description Aligned at full days
ReportHrvPdf PDF Detailed report with plots of activity class, MET, heart rate, HRV spectrogram, LF, HF, LF/HF, Baevskii Stress Index, Table of HRV parameters in different activity classes (one page per day). Preview. (opens new window) The values of these reports are output using a 1-minute interval, regardless of the output interval of the DataAnalyzer, and serve only as feedback for the participants of the study. no

The table 'HRV parameters by activity classes' contains the calculated mean values of various HRV parameters for the corresponding recorded activity classes.

  • Lying defines the time in which the DataAnalyzer classified the activity class "Lying".
  • Resting defines the time in which the DataAnalyzer classified the activity class "Sitting" or "Standing" (activity class "Lying" excluded).
  • At activity defines the time in which the DataAnalyzer has classified the activity class "Cycling", "Jogging" or "Walking" (everything that does not belong to "Lying", "Resting" or "Unknown").

# HRV Spectrogram

The HRV spectrogram displays the frequency spectrum over time, with the x-axis representing the time course, and the y-axis the frequency spectrum in Hz. It is divided into two main frequency ranges:

  • Low Frequency (LF): Range between 0.04 and 0.15 Hertz (Hz). The LF component is associated with the activity of the sympathetic nervous system, responsible for the mobilization of energy and consequently for the stress responses.
  • High Frequency (HF): Range between 0.15 and 0.4 Hz. The HF component is associated with the activity of the parasympathetic nervous system, responsible for relaxation, recovery, and regulation of the heart rhythm. The intensity of HRV is represented by the colors. Darker colors like blue indicate higher intensity whereas lighter colors such as red and yellow indicate a lower level of heart rate variability. This allows you to assign the effects of various behaviors (sporting activities and relaxation sessions or stress) on the body.
© 2026 movisens GmbH, Imprint