Scenario Validation

Working with OpenViBE signal processing scenarios and doing scenario/BCI design
Post Reply
Sophie
Posts: 3
Joined: Thu Jan 25, 2024 6:39 pm

Scenario Validation

Post by Sophie »

Hello!

I am a PhD student working in OpenVibe for the first time and I have no signal analysis experience. I am calling upon the OpenVibe community for comments, suggestions and validation on my scenario.

Here's one of the sub-objectives of my research: I need to know the attention employees pay to learning activities in an elearning course.
  • Input: I have recorded EEG data for 20 subjects using a Unicorn 8 channel 250 Hz headset while the participants were doing a 25-30 min elearning course. The data for each participant is in a CSV file.
  • Treatment: I need to isolate Beta, Alpha and Theta bands for Cz, Pz, P3 and P4 in order to calculate Pope's index of attention using a Hanning sliding window
  • Output: a csv file with that index, to which I'll be able to add event id for specific time periods
My questions to the community:
  1. Is the attached OpenVibe scenario valid for what I am trying to do? If not, please let me know how to fix it.
  2. Should I be applying Signal decimation and if so, where?
  3. My output CSV file returns error messages (sampling rate cannot be 0, error have been thrown during streamed matrix, plus others). What am I doing wrong?
Thank you!
Image

kyunghowon
Posts: 11
Joined: Tue Apr 04, 2023 9:14 am

Re: Scenario Validation

Post by kyunghowon »

Hello.
Unfortunately, I cannot see the attached image.

2. I don't think decimation is essential for the original sample rate of 250Hz.

Best regards,

Sophie
Posts: 3
Joined: Thu Jan 25, 2024 6:39 pm

Re: Scenario Validation

Post by Sophie »

Sorry about that. I'm new to this forum.

Here's a link to the image:

https://uqam-my.sharepoint.com/:i:/r/pe ... 1&e=C9t21F

and a second try on posting it:

Image

kyunghowon
Posts: 11
Joined: Tue Apr 04, 2023 9:14 am

Re: Scenario Validation

Post by kyunghowon »

Hello.

Thank you for the update.

First of all, I noticed a few points to be fixed.
For Spectral analysis box, its outputs are amplitude, phase, real part, and imagery part of FFT.

Your data dimension is changed from [1 x time] -> [Frequency bins x 1]

Therefore, its first output is amplitude per frequency bin up to 250Hz/2 = 125Hz.
So, you should select frequency bands using the Frequency Band Selector box after the spectral analysis box, and you need Spectrum Average box afterward. Then, it will produce one value.

Actually, you can divide branches into different bands after the spectral analysis box. You can filter the data with broadband to reduce motion artifacts and EMG, such as [1 40] Hz.

Here is my suggestion:
csv fille reader -> temporal filter -> channel selector -> spatial filter box (channel average) -> time-based epoching -> windowing -> spectral analysis -> frequency band selector (1: theta, 2: alpha, 3: beta branch) -> spectral average -> simple dsp -> epoch average -> csv writer.

Also, you need to be careful to apply CAR when there are only eight channels, as it can be affected by a few noisy channels.

I don't understand some questions below:
1. Output: a CSV file with that index, to which I'll be able to add event id for specific time periods
=> Usually, it is natural to record event markers during recording with continuous data, as it has time points.
The output of the scenario cannot have an exact time period because after FFT there is no time information, but it represents amplitude per frequency bin during the epoch extracted from time-based epoching box, then you averaged epochs through the epoch average box.

2. My output CSV file returns error messages (sampling rate cannot be 0, error have been thrown during streamed matrix, plus others). What am I doing wrong?
=> Because it is not signal, but spectrum. You need to change the input and out of somes boxes into a spectrum (yellow points). Based on your scenario, it will create a CSV with Time, End Time, frequency 0 to 125. With frequency band selector and spectrum average, it will have Time, End Time, and one column.

Maybe you can look at the neurofeedback scenario if you are interested in band power in addition to FFT amplitude.
http://openvibe.inria.fr/neurofeedback/

Best regards,
Last edited by kyunghowon on Tue Feb 20, 2024 4:05 pm, edited 1 time in total.

Sophie
Posts: 3
Joined: Thu Jan 25, 2024 6:39 pm

Re: Scenario Validation

Post by Sophie »

Thank you so much for your help!

I will rework the scenario with your suggestions and do some tests.

Sincerely,

Post Reply