To begin, open MATLAB on the computer. In MATLAB's home panel, click the Set Path button to add the path to the EEGLAB folder. Click the Add Folder button and select the eeglab folder that has been unzipped.
Then click Save, followed by Close. In MATLAB's command window, type eeglab to launch EEGLAB. To install the BrainBeats plugin, click File, followed by Manage EEGLAB Extensions.
Then in the search bar, type brainbeats, select the brainbeats plugin in the list, and click Install. For loading the sample dataset into EEGLAB, click File and Load existing data. Navigate to the eeglab folder, then go to the plugins and BrainBeats folders.
Open the sample data folder and select the file dataset.set. In EEGLAB, sequentially click Tools, BrainBeats, and 1st level, subject level, to open the BrainBeats first general user interface or GUI. Select heartbeat-evoked potentials, or HEP, as the analysis to run and ECG as the heart data type.
Then click on the button to display the list of channels and select the ECG channel. Keep the options visualize outputs and save outputs selected and click OK.In the second GUI window, from the preprocess EEG section, change the power line noise to 50 Hz and click OK to launch. Once the warning message to remove the detected PPG channel appears, click Yes.
For the PPG signal, load the dataset. set file again, then in the EEGLAB, sequentially click Tools, BrainBeats, and 1st level, subject level, to open BrainBeats'first GUI. Select heartbeat-evoked potentials, or HEP, as the analysis to run and PPG as the heart data type.
Then click on the button to display the list of channels and select the PPG channel. Keep the options visualize outputs and save outputs selected and click OK.In the second GUI window from the preprocess EEG section, change the power line noise to 50 Hz and click OK to launch. Once the warning message to remove the extra ECG channel appears, click yes.
BrainBeats successfully detected the RR intervals from the ECG signal and some RR artifacts. A significant heartbeat-evoked oscillation in the alpha band from 150 to 400 milliseconds post-heartbeat at a fronto-central scalp site was observed. On the other hand, the intertrial coherence analysis suggested no significant phase locking or resetting of the EEG phase with respect to the heartbeats.
BrainBeats also detected the RR intervals from the PPG signal and some RR artifacts. A significant effect at the fronto-central scalp site in almost the whole time window following the R-wave and almost the whole frequency range was observed. Intertrial coherence analysis suggesting no significant phase locking or resetting of the EEG phase.