Hello everyone,

I am trying to calculate Event-related changes of EEG activity such as event-related desynchronization (ERD) or event-related synchronization (ERS) like G. Pfurtscheller. First I want to show you how I processed my Data in Matlab:

1. First I segmented my Data based on the EMG Stimuli. (Then I had 14 Trials with 1000 Samples = 8s, because my sampling frequency is 125 (The Trials consist 4s of Rest-Periods and 4s of movement Periods).

2. I applied a Bandpass Butterworth filter on the Trials:

fs = 125;

[c,d] = butter(2,[8 30]/(fs/2),'bandpass');

for i = 1:14

C3_filt_Trial{i} = filtfilt(c,d,Segmente_C3_roh(:,i));

end

3. Then I calculated the Power for all Trials by squaring:

for i = 1:14

P_event{i} = C3_filt_Trial{1,i}.^2;

end

4. After that I averaged the Power for all Trials, I got 1000 Samples for P_event_average:

for i = 1:14

P_event_average = mean(P_event{1,i},2);

end

5. And then I calculated the Power for the Rest Periods:

for i = 1:14

P_rest_squared{i} = (C3_filt_Trial{1,i}(1:500,:)).^2;

end

6. The Power for the Rest Periods was then averaged, so I had 500 samples for P_rest_average:

for i = 1:14

P_rest_average = mean(P_rest_squared{1,i},2);

end

7. Finnaly I want to use the Equation:

ERD/ERS = (P_event_average)-(P_rest_avg)/(P_rest_avg)*100%

The Problem is that the arrays have different dimensions, due to the rest period which consists 0-4s of the whole trial. I am unsure if my processing pipeline in general is correct. I would really appreciate your help.

Greetings

Similar questions and discussions