How to measure HRV (heart rate variability) in BrainBay?

hrv
ekg
openbci
brainbay
Tags: #<Tag:0x00007fcb5aea5f88> #<Tag:0x00007fcb5aea5d58> #<Tag:0x00007fcb5aea5b28> #<Tag:0x00007fcb5aea5808>

#1

Does anybody know how to calculate HRV in BrainBay? There is an excellent design to measure heart rate: Heart rate detection in BrainBay

I want to extend it to calculate HRV, but I can’t figure out how to measure the interval between heart beats. In that design mentioned above the threshold element perfectly separates heart beats from noise and draws each beat on the graph. There should be some way to measure the time distance between each peak.

This site explains a little bit about HRV: http://www.megaemg.com/knowledge/heart-rate-variability-hrv/

The image below illustrates what I want to do. I want to map hearth beats to intervals :


#2

Hi @cyrbon,
Welcome to NeuroBB!

Just yesterday I was discussing this topic with a friend who’s interested in HRV, so your comment is synchronously timed.

I don’t have EKG sample data on hand to test with, but here is an (untested) .con file that should do something like what you’re looking for: openbci_ekg_brainbay_heart_rate_hrv.con (7.8 KB)

What I did in this configuration is to add an expression evaluator that gets the inverse of the heart rate (time between beats) and then converts that into milliseconds. This is connected to an oscilloscope element for display.

It will probably be necessary to adjust the gain and drawing interval on the final oscilloscope element (labelled HRV in the .con) in order to get the HRV graph to scale appropriately.

Let me know if that works! I’ll see if I can get some EKG data to test it with tomorrow.

Cheers,
Adam