Clear Filters
Clear Filters

How to classify raw EEG data as alpha, beta, delta etc. frequencies from different channels such as AF4, AF3, FC5, FC6 etc?

39 views (last 30 days)
I'm using a EEG device with 14 channels. I need to classify raw EEG data as waves of different frequencies such as alpha, beta, delta etc. from each channel and compute the average relative power from each channels. I'm entirely new to EEG and Matlab, Please help. Can it be exported in csv format?
  2 Comments
Dmitry Kaplan
Dmitry Kaplan on 10 Jun 2022
This is a little vague because, as you say, you're new to it. There are several steps here:
  1. Read the data into matlab. Either get Matlab to read it directly from the device (difficult and hard to debug) or get the device to export the file to a csv (either very simple or near-impossible). If the device has an export function at all, there's a good chance it can write a csv, if not then it's harder. If you have a csv file use readtable() or csvread() or readmatrix() to get the data into matlab.
  2. You will need to use an FFT to convert time-domain data to frequency domain. The bands that you're interested in are: Gamma greater than 30(Hz) beta (13-30Hz), alpha (8-12 Hz), theta (4-8 Hz), and delta (less than 4 Hz). They will all be present ALL the time, but some will predominate. I am afraid that you will need to understand how to perform FFT's (or, better, spectrograms) in order to get much further.

Sign in to comment.

Answers (1)

Gagan Agarwal
Gagan Agarwal on 4 Oct 2023
Edited: Gagan Agarwal on 4 Oct 2023
Hi Surakshya Pradhan,
I understand that you are trying to classify raw EEG data as alpha, beta, delta frequencies from different channels such as AF4, AF3, FC5, FC6 etc.
You can follow these steps to achieve data classification:
  1. If your EEG device is compatible with MATLAB, you can directly read the data from the device using MATLAB functions otherwise get the device to export the data to a CSV file and use readmatrix” to load it from CSV file into MATLAB workspace.
  2. Preprocess the imported data.
  3. Apply signal processing techniques to extract the frequency components of interest (alpha, beta, delta, etc.) using functions like Fourier transform, bandpass filtering.
  4. Calculate the power spectrum density (PSD) using the “periodogram” function.
  5. Integrate the PSD within specific frequency bands (e.g., alpha, beta, delta) to obtain the relative power.
  6. Repeat steps 3 and 4 for each channel of the EEG data.
  7. Compute the average relative power from each channel by taking the mean of the relative power values obtained in step 4
Please refer to the following documentation for additional information on “readmatrix” and “periodogram”:
I hope this helps!

Categories

Find more on EEG/MEG/ECoG in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!