by Stuart Lynne
The fitness_dashboard program captures real-time heart rate data, and specifically the RR interval data. This is used to compute various metrics such as DFA A1 and other HRV statistics such as RMSSD and SNDD.
The collected data contains artifacts due to the nature of the collection process as well as artifacts in the source data. These perturb the metrics by increasing the randomness and the variability of the signal being analyzed.
The 2019 paper from Lipponen and Tarvainen addresses this problem making specific recommendations on finding and dealing with artifacts.
|See:||A robust algorithm for heart rate variability time series artefact correction using novel beat classification||Lipponen|
For detection they propose:
a robust automatic method for artefact detection and correction from HRV time series is proposed. Detection of artefacts is based on two variable thresholds. The first threshold is estimated from distribution of successive RR-interval differences and the second one is estimated from distribution of differences between individual RR-intervals and median RR interval.
This is a summary, please refer to the Lipponen paper, section 2.2 Correction of erroneous heartbeats. The paper also provides guidance on correction of erroneous heartbeats:
… the decision algorithm for detecting real artefacts and removing extra detections. Firstly, RR interval is tested against the ectopic beat criterion and secondly against the long or short criterion if beat is classified long or short then missed and extra beat criterions are tested. If criterions are not fulfilled beat is classified as a normal rhythm.
Extra beats are corrected by removing the extra Rwave detection corresponding to the detected short RR interval and RR interval series is then recalculated.
Missed beats are corrected by adding new R-wave occurrence time so that it divides the detected long RR interval into two equal halves and RR interval series is then recalculated.
Long or Short beats, are corrected by interpolating new values to the RR time series.
Ectopic beats are corrected by replacing corrupted RR times by interpolated RR values.
The effect is to remove obviously incorrect data that will would increase variability with data that will have minimal impact on the accuracy of the metrics being calculated from the data.
This is a short summary of the decision equations, please refer to the Lipponen paper, section 2 Methods.
Eq1: S11(j) > 1 and S12(j) < -c1 * S11(j) + c2 Eq1: S11(j) < 1 and S12(j)>< -c1 * S11(j) - c2
Eq3: sign[ dRR(j)] * dRR(j+1) < -1 Eq4: | mRR(j) | > 3 Eq5: sign[ dRR(j)] * dRR(j+2) < -1
Eq6: | RR(j) / 2 - medRR(j) | < Th2(j) Eq6: | RR(j) + RR(J+1) - medRR(j) | < Th2(j)
This is a summary, please refer to the Lipponen paper, section 2.1 Decision algorithm.
N.B. Not Checked is specified where the algorithm had insufficient information to work on, typically the first and last elements of the RR data collected
The algorithm cannot differentiate between artifacts generated by the heart or ones induced by the measurement of the data.
In our context, recording fitness related data during strenuous activity, a large number of errors are generated from the movement of the heart rate monitor.tags: