I am trying to compute the FFT based Power Spectral Density (PSD) but do not really understand it.
My signal is a real time r-r interval signal. I am interpolating it and resampling it at 100Hz and then pasing it to the FFT Power spectral Density.vi
I am not sure if my PSD calculation is correct. Can someone suggest where am I going wrong. I am posting a snapshot of the block diagram and front panel.
Thank you for posting at NI Fourm.
I don't see any problem for the PSD calculation part. Are you getting some results you are not expecting in the end?
Right click the PSD VI and select help for further information on how to use this VI.
I am not getting the results as expected.
I had a look at the processing in detail and also used my r-r signal on Labview HRV analysis toolkit.
It seems that I need to detrend my signal before calculating the PSD.
THe most common technique is the Wavelet Detrend V I in the Advanced signal processing toolkit. This removed the baseline trend in the signal.
Is there a way of computing this without using the ASPT.
Alternately can I get an evaluation version of the toolkit to check if this serves the purpose?
I think it is worth to use the evaluation version of the toolkit to check if the issue you have really lies in the PSD.
The other possible cause is your input signal. You said you resampled it at 100Hz, what is the highest frequency of your input signal?
I am acquiring a pulse signal from the finger using a led and photodiode sesnsor. This signal is in the range of 0-4Hz
I thne calculate peaks in the signal and take the difference in time between the consecutivepeaks. this is the rr singal.
It is this signal that I wish to calcluate the PSD for. Hoever if u imagine that the time difference in two peaks (the rr value) ranges from 0.6s to 0.8s and plotted at the time of second peak. This signal has a frequency range of 0-0.5 HZ . this is discrete data and the points are not equally placed. Hence following interpolation and resampling the signal is given to the PSD function.
To answer your question, this signal too is in the range of 0-0.5Hz.
I have attached a jpg which shows sampling and cubic interploation.
HI Mark and Jaspal
The reason for not getting the results as expected is this. You are passing an array to the FFT and PSD functions. The correct input is a waveform with waveform timing details (dt). The timing details are essential for both this functions. Remember then doing signal processing timing details. Either as dt or sample frequency are required in almost all types of calculations. Pay attention to details
By the way. If you are working with beat to beat heart rate variability. You should not use a function based on standard FFT algorithm. The reason for this is that this type of calculations requires a constant sample rate. The interval between is heart beat is not constant. You should use the "Unevenly Sampled Signal Spectrum VI" You find an example here .....National Instruments\LabVIEW 8.6\examples\math\sig_proc.llb\Generalized Fourier Spectrum.vi