Borrar filtros
Borrar filtros

hrv spectral analysis

1 visualización (últimos 30 días)
Olga
Olga el 9 de Feb. de 2012
Editada: Jan el 7 de Oct. de 2013
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. ;)

Respuestas (1)

Wayne King
Wayne King el 9 de Feb. de 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 comentarios
Olga
Olga el 12 de Feb. de 2012
And it is not possible to change the units, is it?
Wayne King
Wayne King el 13 de Feb. de 2012
the PSD is in squared units by definition.

Iniciar sesión para comentar.

Categorías

Más información sobre Parametric Spectral Estimation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by