Life Science

cancel
Showing results for 
Search instead for 
Did you mean: 

Analysis of ECG signal

Can anyone advice me on how to get a display and beats/min from a signal coming out of ECG???
I am receiving 3 signals from the microcontroller (after they are converted by 8 bit A/D) and one of them represents heart rate.
How can I convert that signal to display and give me a digital heartbeat/min value using labview???
0 Kudos
Message 1 of 32
(18,075 Views)
I have attached a VI that should do what you want if you have Labview 7.1 and Advanced Analysis Library.

If not, then this is what the VI does.

First you process the signal a little to enhance the R wave.

1. Take the derivative of the signal (difference function), name this signal X
2. Perform a Hilbert Transform of X to get Y
3. Combine to get Z = X + iY (complex) and take the magnitude of Z
4. This process will enhance the R wave amplitude in relation to the rest of the signal

Then you perform a peak detection to find all of the peaks and their locations.

Find the difference between the peaks to get the number of points between beats.

Divide this number by (Sampling Rate * 60) and invert the number to convert to beats/min.


The Advanced Analysis Library has the Derivative, Peak Detect, and Hilbert Transform functions used in the VI. I tried to save it as version 7.0 but it wouldn't let me.
Randall Pursley
Message 2 of 32
(18,048 Views)
Randall,
Thank you so much for your quick response and attached example.
I will try that and update you on what happened.
I assume that the input signal representing the heart beat is a digital signal coming out of the microcontroller in 8 bits via a serial cable as that is the signal I am working with.
Thanks again.
Rodawg
0 Kudos
Message 3 of 32
(18,042 Views)
Randall,
Thank you so much for your quick response and attached example.
I will try that and update you on what happened.
I assume that the input signal representing the heart beat is a digital signal coming out of the microcontroller in 8 bits via a serial cable as that is the signal I am working with.
Thanks again.
Rodawg
0 Kudos
Message 4 of 32
(18,043 Views)
What I sent you would as post processing. If you want to use it as real-time processing you would have to change the functionsx to their pt-by-pt versions and it should still work with a little modification. The VI was adapted from some work I did a couple years ago in which I was processing saved data.
Randall Pursley
Message 5 of 32
(18,040 Views)
Thanks again for your prompt response.
Could you advise me what was the format/representation of your data???
Looks like you were storing the data manually in the array you have.
Do you have any samples that I could look and use for this simulation to see and understand the logic and the vi more.
Thanks and have a great day.
0 Kudos
Message 6 of 32
(18,009 Views)
Here is a file with 30 seconds of test ECG data (60 bpm).
Randall Pursley
Message 7 of 32
(18,011 Views)
Here is another VI which may do some of what you are trying to do. EKG analysis can be very complex - many papers have been published on the subject.

Lynn
0 Kudos
Message 8 of 32
(18,002 Views)
Thanks alot Randall. Appreciate your help.
0 Kudos
Message 9 of 32
(17,983 Views)
Thank you Lynn. You have helped me quite alot in my previous problems as well.
0 Kudos
Message 10 of 32
(17,983 Views)