フィルターのクリア

hrv spectral analysis

32 ビュー (過去 30 日間)
Olga
Olga 2012 年 3 月 14 日
コメント済み: Apoorva Gangula 2021 年 5 月 24 日
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 件のコメント
NICOLE MIN
NICOLE MIN 2020 年 11 月 30 日
im stuck at calculating aLF onwards . please help
thanks
Apoorva Gangula
Apoorva Gangula 2021 年 5 月 24 日
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

サインインしてコメントする。

採用された回答

Wayne King
Wayne King 2012 年 3 月 14 日
Hi Olga, I think your problem is that your frequency resolution is too poor.
You are only obtaining PSD estimates at steps of 1.5625 Hz. Look at:
diff(F)
This is based on your sampling frequency and window (segment) length.
Therefore the code:
VLF = [0.0033 0.04];
LF = [0.04 0.15];
HF = [0.15 0.4];
iVLF= (F>=VLF(1)) & (F<=VLF(2));
iLF = (F>=LF(1)) & (F<=LF(2));
iHF = (F>=HF(1)) & (F<=HF(2));
Is going to return a vector of zeros for iVLF, iLF, and iHF. Look at the output for
nnz(iVLF)
nnz(iLF)
nnz(iHF)
You are trying to obtain power estimates on a grid that is much finer than your frequency resolution.
  6 件のコメント
Olga
Olga 2012 年 3 月 15 日
That's too bad. Thanks a lot for your help ;)
Bach
Bach 2012 年 7 月 27 日
you can increase the number of FFT to improve the resolution. The frequency resolution = fs / nfft.

サインインしてコメントする。

その他の回答 (3 件)

Pradeep Kumar R
Pradeep Kumar R 2016 年 2 月 23 日
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
KYAW KYAW 2012 年 7 月 26 日
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 件のコメント
Wayne King
Wayne King 2012 年 7 月 26 日
please post a separate question for this.

サインインしてコメントする。


Pradeep Kumar R
Pradeep Kumar R 2016 年 2 月 23 日
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

カテゴリ

Help Center および File ExchangeSpectral Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by