0

Could anyone please suggest ideal Window size and overlapping samples for pwelch function in Matlab. I have several 200 ms EEG signals with sampling rate 1000 (signal length or number of samples = 200) to evaluate spectral power. By default pwelch uses hamming window and divides the data into 8 segments with 50% overlap. Are these default values okay for a signal with only 200 samples? The default values are working fine and its giving me a PSD plot. I want to make sure that what I am doing is conceptually correct and if someone could suggest any better way of doing this? This is a study of ERP response to stimuli in a 200 ms time duration. I want to compare the spectral powers in different frequency bands.

Thanks for the help!

user8020776
  • 13
  • 1
  • 3

1 Answers1

0

Considering your time window is only 200 ms, I would suggest using pwelch with a single 200 ms window and no overlap. The frequency precision of the underlying Fourier transform is related to the length of the data segment used. Specifically, the spacing between Fourier Transform bins is related to the length of the data segment as (Fs / N) where Fs is the sampling rate of the data, and N is the length of the segment. So for example with a sampling rate of 1000 Hz and a 200 ms data segment, the effective resolution of your frequency transform will be 4 Hz. (1000 / 200).

see also: https://electronics.stackexchange.com/questions/12407/what-is-the-relation-between-fft-length-and-frequency-resolution

If you were analyzing a longer section of data (say, a few seconds), then using pwelch with overlapping windows would be more appropriate.

A good introduction to frequency based analyses is the text 'Analyzing Neural Time Series Data' by M.X. Cohen.

DMR
  • 1,479
  • 1
  • 8
  • 11
  • Is there any thumb rule for selecting window size and overlap samples? In pwelch we can choose the frequency resolution. So we can provide the number of DFT points to 500 or 1000 or as many as we want, to get desired number of frequency bins. So I don't understand the significance of Fs/N bins. – user8020776 Jun 21 '17 at 15:37
  • Increasing the FFT points will zero-pad the data, which will increase the number of FFT bins returned, but is not increasing the ability to resolve neighboring frequencies in the same way as increasing the length of your data record with real data. See for example this answer: https://dsp.stackexchange.com/questions/11560/why-do-we-say-that-zero-padding-doesnt-really-increase-frequency-resolution . In terms of a general rule, it depends on what frequencies you want to analyze and what conclusions you want to be able to make. There is a tradeoff between temporal and frequency resolution. – DMR Jun 21 '17 at 18:37
  • I am trying to compare the spectral powers in different frequency bands of 0-4 Hz, 4-8 Hz, 8-12 Hz and 12-30 Hz for my 200 point data. – user8020776 Jun 22 '17 at 18:55