LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT based Power spectral density

Hi,

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. 

 

Thanks.

 

Download All
0 Kudos
Message 1 of 6
(5,431 Views)

Hi,

 

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.

 

Thanks,

Best regards,

Mark M.
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 6
(5,388 Views)

Hi Mark,

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?

 

Cheers,

 

0 Kudos
Message 3 of 6
(5,347 Views)

Hi,

 

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?

Best regards,

Mark M.
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 4 of 6
(5,328 Views)

Hi Mark,

 

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.

 

0 Kudos
Message 5 of 6
(5,324 Views)

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 VIYou find an example here .....National Instruments\LabVIEW 8.6\examples\math\sig_proc.llb\Generalized Fourier Spectrum.vi   



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 6 of 6
(5,319 Views)