LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring duration between peaks (noisy signal)

Solved!
Go to solution

Hello Experts,

 

I am new to labview and I have been working on a VI on acquiring the duration between 2 peaks (real time). The signal source is human ECG/EKG (heart signal - PQRS). It has one huge spike and couple other smaller ones in every beat, and the signal is noisy. Now, what I am trying to do is just to get the duration between these peaks in real time (so it changes at every beat or it could also be the average of several peaks).

Hopefully, I am not confusing any of you.

I have spent a lot of time trying, but can't really understand how to use some of the available functions.

If possible, can anyone of you post a simple example of how this could be done? (using sinosoid signal - with noise - as source would be enough).

crossing my fingers!

 

Thank you in advance!

0 Kudos
Message 1 of 8
(3,401 Views)

Probably the offline method that I would suggest would be to write down your data to a LVM/TDMS file in which you will have two columns , out of which one would be the Time channel , from there you can easily map peak-to-peak value to the corresponding time difference.

 

Alternatively , in real-time , you should use the Waveform Peak detection VI:

 

temp1.jpg

 

 

It also give the time locations at which the peaks were detected , so give the inputs accordingly and that should solve your problem.Smiley Happy

______________________________________________

Bandan Jot Singh | Applications Engineer | NI India
______________________________________________
0 Kudos
Message 2 of 8
(3,396 Views)
Solution
Accepted by topic author MrCoolMan

You are in luck. Go to help in the toolbar, select Find Examples. Search for peak. Open the example named "Peak Detection and Display.vi" That VI will give you a push in the correct direction. Also stay away from using Express VIs in your project. Express VIs is just some flimflam that NI has glued ontop on Labview, using very cheap glue. Express VIs do always cause problems than they do good

Also if you have noise problems. Some filtering will in most cases help. And Labview have many options for digital filtering. 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 8
(3,381 Views)

A Savitzky-Golay filter may help if you have noise issues that cannot be solved with the peak find routines alone.  You may also want to check out the biomedical startup kit for code which probably already does what you are trying to do.

0 Kudos
Message 4 of 8
(3,360 Views)

I'm also very new to Labview and am having trouble following exactly how to piece together this program. I think I understand how to assemble it but don't know where to find all of the individual components in Labview. I've spent hours trying to hook it up and have yet to get a working version, is there any chance that you could post an actual VI for this? I'm also having trouble understanding how you run this program using dynamic data (real-time ECG) instead of a source generated one. Thanks

0 Kudos
Message 5 of 8
(3,307 Views)

@zach843 wrote:

I'm also very new to Labview and am having trouble following exactly how to piece together this program. I think I understand how to assemble it but don't know where to find all of the individual components in Labview. I've spent hours trying to hook it up and have yet to get a working version, is there any chance that you could post an actual VI for this? I'm also having trouble understanding how you run this program using dynamic data (real-time ECG) instead of a source generated one. Thanks


Instead of HIJACKING a thread that is by most remotely connected to your problem. Start your own threadSmiley Mad As a reminder good questions draw good answers. It very hard to see why and how you struggle. In the new thread you are going to start. You must describe your problem much better. Like what you have done so far. And posting whatever you have created as code. Is always smart.

See if this will be a better forum for your post http://decibel.ni.com/content/groups/biomedical-user-group



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

You misinterpret, the original post was made by a group member of mine for a project that we are working on so we have EXACTLY the same problems and I am not hijacking someone's thread that is only remotely connected.

0 Kudos
Message 7 of 8
(3,277 Views)

That was a great example! Thanks for your help!

Since I am trying to have the duration displayed in the VI. Right now, it has the location positions in the block of data (DBL). In the VI there is an up and down button where you can look at the value of the location of the first peak and the 2nd peak. To get the duration, I have to take the difference of the two locations (substract).

Now, i am still trying to figure out how to go about this (splitting the data of the DBL?).

Hope, this is not too confusing

 

Thanks again in advance!

0 Kudos
Message 8 of 8
(3,210 Views)