From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why am I getting very high values for the very low frequency region of a random signal?

I am tyring to produce a power spectrum graph for a Tachogram data, related to Heart Rate Variability Analysis. This data can be thought to be as a random signal, but has a frequency spectrum range of 0 - 1HZ.
The problem that I am facing is, I am getting very high values for very low frequency region, closer to DC value. Even the DC value is really high, in the range 10^8. It is suppose to be a low number. Any suggestions would be appreciated.

Thanks.
0 Kudos
Message 1 of 14
(3,994 Views)
What is your sample rate, how long is your measurement time and what window are you using? These are just few questions that would need answers in order to help tracking your problem.

So it could be very helpful if you could post your VI with the actual input data you are analyzing (saved as default).
0 Kudos
Message 2 of 14
(3,994 Views)
Since your signal contains a lot of DC (approx. value = 1000), you may consider removing some of it before computing your Power Spectrum. The problem is to figure out what the exact dc value is and make sure you do not remove part of the "interesting" signal. Unfortunately in your case, as I mentioned in another posting, your signal seems to include very low frequency and your measurement time of 300 seconds does not seem to be long enough to clearly separate "DC" from "Signal". My recommendation for now would be to measure at least 1000 seconds (or more) and see if subtracting the mean value from your signal works for you.

In other words, it looks like there is a lot of information concentrated between bin 0 (DC) and bin 1 of your spectrum and the only
way of decoupling these is to increase your measurement time. Also applying a Hanning window may not be the best choice in your case. Consider a Rectangular (None) window instead.

Finally you may also consider using some of the high-level measurement VIs instead. If you look in your Analyze>>Waveform Measurements palette you'll find VIs that can do Resampling (Spline and others), Power Spectrum (with window), DC measurement (with optional window) and many others.
0 Kudos
Message 3 of 14
(3,994 Views)
I got to point out something here. The vertical axis unit for the time domain signal is milliseconds,and not volts. I am a bit lost here, would the term DC apply to our case here ? Let's we call it the DC offset, can't we remove it by taking the mean of the raw data and then subtracting the values from it.

In the heart rate variability analysis case, they go by 5 minute segments of data, so utmost there will be only 300 seconds data for analysis, we can't go with 1000 seconds data.

Also, previously you stated that besides the DC offset, there is an component in the spectrum that has a higher value and you said it doesn't have complete period. How do I remove this component or reduce this irregularity ?

Your answer to my questions are really hel
pful and appreciate your effort.

Thanks.
0 Kudos
Message 4 of 14
(3,994 Views)
Well "DC" was the term used under the assumption that it is an amplitude y-axis (DC = Direct Courant). It may not be the correct term to use if the y-axis is in ms but as you say let's just call that "dc".

Yes you can remove the "dc" by subtracting the mean value but by doing this you "define" your dc to be the mean value. What I meant with the other component was, that if you look at your time signal, it looks like a DC of approx. 1000 overlayed with a 50% to 75% of a single period of a signal of amplitude approx. 10 and then something that more or less looks like noise. So I was wondering what signal you were actually chasing? What is the end goal of your measurement? How does an "ideal" signal or result look like? What information do
you expect to extract from the power spectrum? etc...
0 Kudos
Message 5 of 14
(3,994 Views)
Here is what my work is all about. I am trying to develop a software for Heart Rate Variability analysis. I am not sure if you are aware of heart beat waveforms, they are bunch spikes, occuring at irregular intervals. We have to do analysis on this waveform. How ? First we have to create a plot called Tachogram. This is done by, for example, let's name the first spike R1, the second one R2, and the third one R3, and so on. This is how the co-ordinate points are created. (R1, R2-R1), (R2, R3-R2), and so on...
Here R1 is the time instant at which the spike R1 occurs, and R2-R1 is the time difference between these peak occurences. So, if we plot these values, then it gives us one like what you saw on your time domain plot. What we have to do with this signal is, we have to apply FFT technique to produce its power spectrum for analysis. Generally the frequency range of the spectrum goes from 0 - 0.5 Hz. They part this range into VLF, LF, and HF, and analyze how much power is distributed in these regions. The distribution would tell you if you were stressed out,or have worked out, things like that. Normally, you can view spikes around LF, HF region. If you had viewed the power spectrum for the data that I sent, then that's what it pretty much looks like. I think I have said a lot about it now. Hope you get it.

We were talking about the "other component", I can't really see where it lies, must be in the 60-80 sec. range in the graph. If you look at the spectrum, I am getting a huge value around 0.0033 Hz, how do I minimize or remove this ?

Also, I am using Unevenly Spaced Signal Spectrum.vi, I am not sure what excactly is the unit for the Power Spectrum output. Technical Papers denote, Periodogram algorithm used by this VI, gives Power Spectral Density ? If that's right, then the unit is V^2/HZ.
Please advise.

Again, I should thank you for your time and effort.
I have to meet a deadline this week in finishing this project, and your help is immense to me at this point.

Thanks & Best Regards,
0 Kudos
Message 6 of 14
(3,994 Views)
Well, I understand now that you are measuring a time "jitter" and that your "offset" corresponds to the mean heart beat time of approx. 1000 ms. So again if you want to analyze the variation in frequency you need to remove the "uninteresting dc".

The huge value you see at 0.0033 (that is the first bin) can be caused by different things. If you have not removed your "dc" AND are using a Hanning window (or any window for that matter), bin 1 will mainly represent the spectral leakage from your dc. So don't use a window in your case.

Next, as mentioned before, I see more a signal that contains less than a period and this will show up in your spectrum as a signal somewhere between bin 0 (dc) and bin 1 (0.0033 Hz). I also
mentioned that it will be difficult to get a good spectral interpretation of that signal when you don't have more of it. If this is really the signal you are looking for, well you may ahve to estimate its frequency and amplitude (and phase) in the time domain and try to subtract your estimate until bin 1 is minimized. Then your signal looks like the remaining information can be analyzed using the power spectrum.

Finally there are techniques to compute densities of an unevenly sampled signal. However I would again suggest you to resample your time domain signal instead(using for example the tools in your Analyze>>Waveform Measurement>>Conditioning palette) and then use a standard Power Spectrum. This could make your life a lot easier. The Resampling VI does accept unevenly sample XY-set input and resample your signal to an evenly spaced Waveform.
0 Kudos
Message 7 of 14
(3,993 Views)
What you have said is really informative. Thanks a lot!

You suggested not using a window, but if I try without one, the spectrum is crowded without any clear pattern showing up. I think not removing the dc, was the problem why that high value for 0.0033 HZ showed up. You talk about bins here, how do you label the bins here ? How do you seperate them ?

Also, I am using FFT Power Spectral Density.vi for my PSD analysis. This function asks what type of averaging you want to perform, I am going with "no averaging". Am I doing the right thing, or I should choose one from Vector Averaging, RMS averaging or Peak Hold ? And this function also has the Window constants input, and it's optional using it. The question is,
in my case, should I use the window constant for noise bandwidth ? Should I really use that ?

Thanks & Best Regards,
0 Kudos
Message 8 of 14
(3,992 Views)
I would recommend you to read for example the "LabVIEW Analysis Concepts" document that explains all the different concepts, "bin", "averaging" etc...

You can access the document from your Desktop: Start>>Programs>>Nat. Inst.>>LabVIEW **>>Search the LabVIEW Bookshelf

Select the "Measurement Manual" or the "Analysis Concepts" depending on your LabVIEW version.
0 Kudos
Message 9 of 14
(3,992 Views)

Hii,

   I am working on a same project as yours "Heart rate variability analysis in time domain and frequency domain". But the problem is that i have jus 10 seconds of ECG data..I tried to get it from Physiobank..no use. Can u plzzzzzzzzz send me the data if u have.PLZ ITS URGENT.

I too am facing problem in the frequency domain, actually how do i get the units of msec2??  I have used the express vi of PSD , Auto regression model and the units are V/sqroot(Hz). I  see 2 peaks only if i use dB representation of PSD .(i am sending u the pic) The 2 peaks correspond to VLF and HF(to get LF/HF ratio i need LF )...can u plz see the pic and tell me. Plz i need this info as early as possible.............Thanks in advance.

0 Kudos
Message 10 of 14
(3,519 Views)