hrv spectral analysis
1 view (last 30 days)
Show older comments
Hi, I'm trying to perform the spectral analysis for HRV of ECG signals. I've done the PSD,but how do I split the spectrum into these frequency bands for HRV parameters (ULF, VLF, LF, HF - 0,003 to 0,4 Hz)? How do I show it on the plot power[ms^s](frequency[Hz])? I've done psd with this code:
fs = 400;
xdft = fft(odstepRR);
xdft = xdft(1:length(odstepRR)/2+1);
xdft(2:end-1) = 2*xdft(2:end-1);
psdest = 1/(length(odstepRR)*fs)*abs(xdft).^2;
freq = 0:fs/length(odstepRR):fs/2;
plot(freq/100,10*log10(psdest));
grid on;
btw. odstepRR is my vector with NN intervals. Shall be very gratefull for your help. ;)
0 Comments
Answers (1)
Wayne King
on 9 Feb 2012
Hi Olga, you have your frequencies in your freq vector. You can use that information to subset your psdest vector.
Keep in mind that your frequency resolution is determined by the sampling frequency and the length of the data vector. So depending on how long odstepRR is, you may have a very small step between elements of freq (much less than 1 Hz), or a step much larger than 1 Hz.
But you can do something like
indices = find(freq> 0.1 & freq<0.4);
ULF = psdest(indices);
to separate the power estimates in the band.
If you use spectrum.periodogram from the Signal Processing Toolbox, there is an avgpower() method that you can use to integrate the power in the PSD estimate over a given interval.
x = randn(1024,1);
psdest = psd(spectrum.periodogram,x,'Fs',400,'NFFT',length(x));
ULFpower = avgpower(psdest,[0.1 0.4]);
4 Comments
See Also
Categories
Find more on Parametric Spectral Estimation 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!