LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

peak detect

Hello!
I´ve been using Peak Detect vi (version 7.1) to calculate ECG Peaks. I noticed that it finds the first peaks allright, but the more the ECG curve advances, the more Peak Detect returns peaks distant from the real peaks. Could it be that i should change Peak Detect´s width(i started with 10), or should i use another vi?
Thanks in advance,

Luanna
0 Kudos
Message 1 of 13
(4,350 Views)
Hi Luanna,

Have you seen the following white paper

 http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/55181a206a523fd186256abe006...

hope this helps.

Cheers,

--Russ
0 Kudos
Message 2 of 13
(4,343 Views)
Hi!
Thank you for the document! I read it but i´m still confused... my "peak detect" is findind the right amplitudes,
but the Time Locations are shifted(TimeLocations[i] = t0 + dt*[Locations]). There is a catch: the vi, before it runs "peak detect"
enhances the ECG signal. I´ve tried to take that out, but if i do "peak detect" doenst find any peaks at all.
So, using the enhanced signal and "peak detection" i´ve tried to run my application inputing
less data (just 1/3) and still the locations are shifted, mainly at the end. I also changed width(less, more), but it didnt get any better... what could i be doing wrong?

Thanks for your help!

Luanna
0 Kudos
Message 3 of 13
(4,313 Views)
I guess i am a little confused reading this - to help you I think we would need to see a screenshot of the program that is written. Are you cropping the data at all, using a multiplier, or otherwise doing something that would adversely affect the X-Axis. And are you sure that the t0 is set up to the right number, as in will it always be off by some random number, or is it a consistent number that it is off by each time?

Tom
0 Kudos
Message 4 of 13
(4,295 Views)
Hi Luanna,

Is the vi you are referring to before your peak detector a filter of some type? If so this could be the source of the time delay.

look at

http://forums.ni.com/ni/board/message?board.id=170&message.id=125934&query.id=23329#M125934

or
http://forums.ni.com/ni/board/message?board.id=170&message.id=22656&query.id=23329#M22656

or
http://forums.ni.com/ni/board/message?board.id=170&message.id=62137&query.id=23332#M62137

these are just some of threads that discuss the delay introduced by filters you could search and find even more I am sure

hope this helps

Cheers,

--Russ
0 Kudos
Message 5 of 13
(4,288 Views)
0 Kudos
Message 6 of 13
(4,284 Views)
Thank you, unclebump! I´ve looked the links, and i think that what i´m using is not exactly a filter. I say "i think" because
this vi is not mine, and i´m still trying to understand it... I´ve attached an image of what is done to the signal before it passes to
"peak detect". If you could look, please.

Thank you very much for your support.
Regards,

Luanna
0 Kudos
Message 8 of 13
(4,253 Views)
Luanna
The first problem that I see with your code is that you take a derivative. Math tells us that if we are taking a derivative of a function, lets use for example sin and cosine. If you take the derivative of sin(theta) you get cos(theta). I don't know exactly what the ECG function you are looking at looks like though, but I can assume that part of your problem stems from the derivative.  Also, the hilbert function is an envelope creating function and has been accurate for all wave envelopes I have taken for ultrasonic signals.  We do something different with our hilbert transform. That subvi is also included along with the sin/cos graph to show you the peak can change in time(or degrees in this instant).
Try overlaying the graph you are using to pull off the peak with the original ECG also, that may help.

Tom
Download All
0 Kudos
Message 9 of 13
(4,238 Views)
Hello, Tom, i´ve checked your tip and you´re right, the enhanced signal has peaks different from the original signal. Thanks! Well, now i´m trapped 🙂 Do you have any peak detection code, specific for ECG?

Actually, peak detection is the first problem. The main problem is that, after peak detection, i calculate rr intervals and use the RR curve to calculate power spectrum(FFT). My power spectrum has many peaks, what is not how a RR interval spectrum should look like. I thought that could happen because of the shifted time locations, but i dont know if it has that much influence over the FFT.

In short, i´m quite lost... a more precise peak detection algorithm would be of great help.
Thanks for everything!!
Regards,

Luanna


0 Kudos
Message 10 of 13
(4,195 Views)