Jump to content

Heart rate


vee_yar

Recommended Posts

Respected seniors,

This is my first project in Labview, and also this is my first post in the extremely active labview forum.

I am trying to develope a system to monitor ECG waveform and to calculate heart rate.

I am using (labview 8) DAQ 6025E to acquire ECG signal,and also I got a noise free ECG waveform on the display

but I am unable to calculate heart rate from the ECG waveform.I want to display heart rate(BPM) on the front panel while the VI is running(real time heart rate display).

I have attached my labview code for your referrence.

Expecting suggestions from experts.

Thanking you in advance

Link to comment

QUOTE(vee_yar @ Feb 12 2007, 09:10 AM)

but I am unable to calculate heart rate from the ECG waveform.I want to display heart rate(BPM) on the front panel while the VI is running(real time heart rate display).

Here's a few suggestions I have for your VI:

You're calculating the heart rate based on finding peaks each time this loop runs. However, this loop will execute every 0.1 sec (It's timed by your DAQ acquisition -- Continous samples at 1kHz, grabbing 100 at a time). So, right now you're assuming that you're going to find two peaks in your data each iteration of the loop... This means that you'll need a signal hooked up going at 20 Hz -- or a patient with a heart rate of at least 1200 beats per minute! :wacko: (Talk about a stress test! :) )

What you'll want to do is to store the last peak found and store it on a shift register of the while loop, since there will many iterations of the loop without any peaks at all. You know that there will only be, at maximum, one peak per cycle, so you don't have to worry about if there's more than one. Now, for each subsequent peak detection, you can take the time of the current peak, subtract it from the value on your shift register (the time the last peak was found), and find the difference. Then, as you did, take the inverse of that time to find the frequency (altough this is in 1/sec, you want 1/min, so multiply by 60)

You may also want to consider averaging the BPM you find over time. If there's some peaks that aren't detected, or if you find some extra peaks, this number will jump all over place. You'll probably want to average over the last few times to smooth it out.

I've attached a quick fix I did to your VI to help my explaination... You'll of course want to clean it up -- And this doesn't look at all at the averaging issue.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.