Pwelch Sampling frequency value

8 views (last 30 days)
hamed
hamed on 18 Aug 2017
Hi all
I'm doing EEG signals analyzing for my project. I've filtered my signal by a bandpass filter(1-40 Hz) and after that, I want to compute PSD using Pwelch method.
My question is about sampling frequency value in Pwelch (fs).
[pxx,f] = pwelch(x,window,noverlap,f,fs)
my signals sampling frequency is 500 Hz but when I use fs=500 the f in [Pxx f] will be between (0-250) and the Pxx values are correspond to this frequency range(0-250) whereas In the previous step I've filtered my signal (1-40Hz). (Files are attached).
If I consider the f values and use pxx values correspond to f, I should use just 165 sample of pxx file from 1025 sample because 165th sample is equal to 40.0391 Hz and I need just PSD between 1 to 40 Hz.
I'm a bit confused about selecting the value of fs. it should be my sampling frequency or I should select it based on my signal frequency range after filtering. for instance here my maximum frequency is 40 should I select fs 80?
Best Regards,
Hamed

Answers (1)

Daniela Montemayor Zolezzi
Hi hamed,
When computing PSD, you use the sampling frequency you used while recording the EEG. So in your case it would be 500 Hz. Even if you have filtered afterwards, you still use the original sampling frequency.

Categories

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

Community Treasure Hunt

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

Start Hunting!