variance and psd of the ecg signal

5 次查看(过去 30 天)
m
m 2011-9-28
Hello i am new in matlab and i have two question :
first: i can calculate the psd of ECG signal (with your help): "psdest = psd(spectrum.periodogram('Hamming'),sig,'NFFT',4096,'Fs',250);"
but i want to get percentage of the total power in a 2.7 Hz bandwidth symmetrically distributed around the dominant frequency( the frequency where the PSD is maximum), then normalized that in the 2.5–14 Hz range
and my secound question : how i can calculate the variance of ECG signal from time-domain ECG signal (without windowing)?
please help me,thank you very much for your attention.

回答(1 个)

Wayne King
Wayne King 2011-9-29
Hi, how is this different than:
If you want to normalize based on the 2.5-14 Hz band instead of 0 to the Nyquist as I did in my example, then you can do that, just use that interval in avgpower(psdest,[2.5 14])
To choose the 2.7 Hz bandwith around the maximum frequency, you just need to know the frequency spacing which you can get from
df = psdest.Frequencies(2)-psdest.Frequencies(1);
From that you can construct an interval that is maximum frequency plus or minus 2.7/2
Fs = 250;
t = 0:1/Fs:4-(1/Fs);
sig = cos(2*pi*10*t)+randn(size(t));
psdest = psd(spectrum.periodogram('Hamming'),sig,'NFFT',4096,'Fs',250);
[mx,I] = max(psdest.Data);
df = psdest.Frequencies(2)-psdest.Frequencies(1);
numbins = round((2.7/2)/df);
relperc = ...
100*avgpower(psdest,[psdest.Frequencies(I-numbins) psdest.Frequencies(I+numbins)])/avgpower(psdest,[0 Fs/2])
To normalize on [2.5 14]
100*avgpower(psdest,[psdest.Frequencies(I-numbins) psdest.Frequencies(I+numbins)])/avgpower(psdest,[2.5 14])
The variance in the time domain is just var().
  1 个评论
Wayne King
Wayne King 2011-9-29
By the way, you better hope that the maximum power is in the interval [2.5, 14] Hz or normalizing on that interval won't make sense.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Spectral Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by