Skip to main content
. 2020 Mar 17;20(6):1670. doi: 10.3390/s20061670
Algorithm 1 Detection of heartbeat events.
Inputs:
  • xSCG: SCG signal


Begin:
  • Compute xDET and xSQR according to Equations (2) and (3), respectively

  • Calibration:
    • 1.
      Find positive xSQR periods such that:
      • (a)
        are separated by 400 ms up to 1500 ms
      • (b)
        relative variation in separation is not greater than ±30%
    • 2.
      Find xDET maxima around periods found at point 1
    • 3.
      Compute τS from Equation (4)
    • 4.
      Incrementally align sample beats:
      • (a)
        align waveforms around time instants found at point 2
      • (b)
        refine alignment by performing cross-correlation of xSCG within ±τS of the time instants found above at point 4a
    • 5.
      Extract SCG beat template (median)
  • Annotation:
    • 6.
      Perform steps 1–3
    • 7.
      Perform steps 4a–4b by aligning the template and the current xSCG, xDET waveforms
    • 8.
      Mark the maximal alignment point as heartbeat location

Return time instants of heartbeats