Matlab toolbox to analyze heart rate variability (HRV) from EKG measured with an EEG Sensor
This MATLAB toolbox extracts heartbeat peaks and interbeat interval measures
from a single channel of EEG that has been recorded by placing an EEG
sensor on the upper portion of the chest. Scripts provide automated
processing for all .set
files in a directory tree. An EEGLAB plugin is
also available. EEGLAB is required for EEG-Beats even if not run as a plugin.
EEG-Beats is freely available under the GNU General Public License. Please cite the following publication if using:
Thanapaisal S, Mosher S, Trejo B and Robbins KA (2020)
EEG-Beats: Automated analysis of heart rate variability (HVR) from EEG-EKG
https://biorxiv.org/cgi/content/short/2020.07.21.211862v1
-
Install the plugin through the EEGLAB Extension Manager (File -> Manage EEGLAB Extensions)
Alternatively you can directly unzip eegbeats.1.1.2.zip in the EEGLAB plugins directory.
-
Load an EEG .set file into EEGLAB
-
Run EEG-Beats through the EEGLAB Tools menu.
- Install EEG-Beats as above.
- EEG-Beats is designed to be run in two stages:
a. Extract the heartbeats from the EEG
b. Compute RR measures from the heartbeats.
EEG-Beats has four top level functions:
eeg_beats
takes an EEG.set
file and produces a structure containing the heartbeat peaks.eeg_ekgstats
takes the peak structure produced byeeg_beats
and produces an interbeat interval measure structure.eegplugin_eegbeats
provides the EEGLAB plugin infrastructure and is not meant to be called directly by users.pop_eegbeats
performs the entire process in one step. The EEGLAB plugin calls this function, but it also can be called from user scripts or from the command line.
The scripts
subdirectory has an extensive collection of scripts that are designed to call EEG-Beats
in batch mode on an entire study. A detailed list of scripts appears in the README.md
file located
in this subdirectory.
All parameters in EEG-Beats are settable. EEG-Beats uses a params
structure to hold the
parameters. The following functions are useful for listing the values of the parameters and setting them.
Example The following command on the command line lists all EEG-Beat parameters and their default settings.
outputBeatDefaults();
Example The following example creates an empty params
structure, sets the rrMinMs
parameter to 400 ms
and, then fills the structure with the default values for all other parameters.
params = struct();
params.rrMinMs = 400;
params = checkBeatDefaults(params, params, getBeatDefaults());
Version 1.1.2 Released 9/04/2020
- Removed extra line in plugin GUI
- Minor changes in documentation
Version 1.1.1 Released 8/25/2020
- Removed figure saving from pop_eegbeats
- Removed return figures from eeg_beats
- Removed ar and fft options for spectrum
Version 1.1.0 Released 8/21/2020
- EEG-Beats with EEGLAB plugin gui
Version 1.0.0 Released 7/28/2020
- Initial release of EEG-Beats sans EEGLAB plugin gui