Heart rate variability (HRV) is the physiological phenomenon of variation in the time interval between heartbeats. It is measured by the variation in the beat-to-beat interval (source: Wikipedia).
NeuroAnalyzer allows detecting and analysis of HRV using ECG channel.
The following time-domain parameters are analyzed:
= hrv_detect(eeg) nn_seg, r_idx
Output:
[ Info: ECG channel found: 24
[ Info: Detected NN segments: 1288
Check peaks:
= eeg.data[24, :, :][:]
ecg = Plots.plot(ecg[1:20*sr(eeg)], # 20 seconds
p =:black,
lc=0.5,
lw=false,
legend=false,
yticks=false)
xticks= Plots.vline!(r_idx[1:21], # 21 peaks
p =:dot,
ls=:red,
lc=0.5)
alphaplot_save(p, file_name="images/rr.png")
hrv_analyze(nn_seg)
Results:
menn = 926.176
mdnn = 937.5
vnn = 6966.958
sdnn = 83.468
rmssd = 68.297
sdsd = 68.323
nn50 = 27
pnn50 = 0.021
nn20 = 67
pnn20 = 0.052