LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help on autocorrelation

Hi all, I am doing a project on Heart sound.I am suppose to come up with a display showing a real time Heart sound,FFT and Heart Rate.I am using NI USB 6008 to collect the data frm my hardware unit.I Managed to get all the others except Heart rate.I was told to use auto correlation to estimate the heart rate from the Heart sound.I have some problem with auto correlation.Anybody can help me troubleshoot my source code for me?. I really appreciate ur help.Thanks
Here,I ve attached my source code.Pls troubleshoot .I have to submitthis project  by this week
0 Kudos
Message 1 of 9
(3,559 Views)
I have this vi that computes heart rate from existing data.  It uses a Hilbert Transform and a derivative to enhance the R wave and then does peak detection to get the peaks.  From that you can count points to get heart rate.
Randall Pursley
0 Kudos
Message 2 of 9
(3,544 Views)
Take a look at this simulated heart rate signal and a real-time peak detector for heart rate.
Randall Pursley
0 Kudos
Message 3 of 9
(3,538 Views)
Hi,Thanks for ur help. But i wud like to what does this Hibert transform does .Is it possible to explain the program.Once again,  thanks for the help
0 Kudos
Message 4 of 9
(3,516 Views)

Hi Thanks for those sample vis .is it possible for you explain how does hilbert program works.

thanks

0 Kudos
Message 5 of 9
(3,506 Views)
In the frequency domain, the Hilbert transform changes the sign of the frequency content on the negative side of the spectrum.  The simplest example is sine/cosine.  The Hilbert transform of a sine wave is a cosine wave and vice versa.  These signals together are considered a Hilbert pair.  Just like in the simple sine/cosine case, where cos^2 + sin^2 = 1, the same is true for any Hilbert pair.

Since any signal can be represented as a sum of sines and cosines, then the Hilbert transform will generate a signal where each sine is matches with a cosine function and every cosine function is matches with a sine function.  So if you take your original signal and make it the real part of a complex signal and take the Hilbert transformed signal and make it the imaginary part of a complex signal (the form is called an 'analytic signal'), then the resulting magnitude signal should be easier to deal with when trying to do peak detection, which is the whole point of the process.
Randall Pursley
Message 6 of 9
(3,495 Views)
Dear Randall Pursley,
                                     Thanks for that lenghthy explanation.I really appreciate your help.
    I would like you to answer another question as well.What does this aurocorrelation does? Sorry for asking too many qns. iam new to Labview



Ratnam
0 Kudos
Message 7 of 9
(3,487 Views)
Hi Ratnam,

There is lots of  information on what the Autocorrelation function works. Here's the official definition from our website:

Measurement Encyclopedia: Autocorrelation

I will recommend you to refer to the Help for the "AutoCorrelation.vi" by right-clicking on the VI and choosing "Help". Here you will get a more detailed explanation and some examples where the VI is incorporated.

Of course, you can also Google the term "autocorrelation".

Have fun!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 8 of 9
(3,473 Views)
All that I can see is that it might also enhance the peaks to some extent, but that is about it.  A better peak detector using this method might be to pull out a single heartbeat from your data and correlate the whole set of data to this.  This is assuming that the heartbeat from beat to beat doesn't change much just the space in between them.
Randall Pursley
0 Kudos
Message 9 of 9
(3,472 Views)