hrv spectral analysis
Mostrar comentarios más antiguos
Hello, I've been trying to perform spectral analysis for hrv for some time already but there all the time problems with it.
I'm using such code:
%Spectral Analysis - WELCH metod
odstepRR=odstepRR.*1000; %odstepRR it an array with NN intervals
fs = 400;
maxF=fs/2;
odstepRR=detrend(odstepRR,'linear');
odstepRR=odstepRR-mean(odstepRR);
%Calculate PSD
[PSD,F] = pwelch(odstepRR,128,64,[],fs); %uses a hamming window
VLF = [0.0033 0.04];
LF = [0.04 0.15];
HF = [0.15 0.4];
% find the indexes corresponding to the VLF, LF, and HF bands
iVLF= (F>=VLF(1)) & (F<=VLF(2));
iLF = (F>=LF(1)) & (F<=LF(2));
iHF = (F>=HF(1)) & (F<=HF(2));
% calculate areas, within the freq bands (ms^2)
aVLF=trapz(F(iVLF),PSD(iVLF));
set(handles.vlf, 'string', num2str(aVLF));
aLF=trapz(F(iLF),PSD(iLF));
set(handles.lf, 'string', num2str(LF));
aHF=trapz(F(iHF),PSD(iHF));
set(handles.hf, 'string', num2str(aHF));
aTotal=aVLF+aLF+aHF;
set(handles.tp, 'string', num2str(aTotal));
% calculate areas relative to the total area (%)
% pVLF=(aVLF/aTotal)*100;
% pLF=(aLF/aTotal)*100;
% pHF=(aHF/aTotal)*100;
%calculate LF/HF ratio
lfhf =aLF/aHF;
axes(handles.axes5);
set(handles.text45, 'visible', 'on')
set(handles.axes5, 'visible', 'on')
%plot area under PSD curve
area(F(:),PSD(:),'FaceColor',[.6 .6 .6]);
grid on;
What am I doing wrong? The program doesn't count the spectral parameters (TP, HF, LF) and the plot is in different freq bands than it should be (on X axis freq should be 0.0-0.5 Hz). Shall be grateful for any help. ;)
3 comentarios
NICOLE MIN
el 30 de Nov. de 2020
hi
i just want to know is there any solution to tour code above?
NICOLE MIN
el 30 de Nov. de 2020
im stuck at calculating aLF onwards . please help
thanks
Apoorva Gangula
el 24 de Mayo de 2021
What is odstepRR here?
I'm doing a project for fetal heart rate analysis and need to do spectral analysis as a part of it
please answer this
Respuesta aceptada
Más respuestas (3)
Pradeep Kumar R
el 23 de Feb. de 2016
1 voto
hi guys i'm doing a project of fetal heart rate variability analysis i'm finding difficult to find and plot the heart rate of fetal i've extracted the fetal signal but only heart rate part i'm not able to come to a solution please help me with that.i've attached my code please help me out
KYAW KYAW
el 26 de Jul. de 2012
0 votos
Dear Wayne King,
I am facing problem for optimizing the peak frequency location in frequency domain analysis for normal and low respiratory rate.
Theoretically, the highest peak frequency must occured at 0.16667 Hz but in pratical is 0.164 to 0.1799(mostly 0.176 above).
My frequency resolution in X axis is 0.0078 which is in FFT only and I optimized then I got the wrost results.
The low frequency lower than 0.10 Hz(low respiratory rate) has issue for spectral analysis that is can't get the peak frequency in 0.10 Hz around there.
Please advise me why theoretical and experimental results are different and can't achieve for very low frequency.
In addition, why the peak frequeny occured in FFT is not same as AR Burg in some of the cases.
Thanks and best regards
1 comentario
Wayne King
el 26 de Jul. de 2012
please post a separate question for this.
Pradeep Kumar R
el 23 de Feb. de 2016
0 votos
hi guys i'm doing a project of fetal heart rate variability analysis i'm finding difficult to find and plot the heart rate of fetal i've extracted the fetal signal but only heart rate part i'm not able to come to a solution please help me with that.i've attached my code please help me out
Categorías
Más información sobre Parametric Spectral Estimation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!