필터 지우기
필터 지우기

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