LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to Calculate Heart Rate from the Serial data

Hello,

I want to Calculate Heart Rate from the Data which is ECG coming serially through COM Port.

What could be the technique?

I suppose that i have to use the tick counter and count the time between two pulses and than give the rate.

Could there be anyother good technique?

0 Kudos
Message 1 of 10
(3,903 Views)

Hi,

 

you could perform a fourier transform to the waveform and evaluate the frequency components.

 

Cheers

Edgar

0 Kudos
Message 2 of 10
(3,901 Views)

Agree with Edgar. The Heart Rate monitor would have coninous, somewhat periodic signals (based on teh activity of teh cocerned indivdual) and the FFT would be the best way forward.

0 Kudos
Message 3 of 10
(3,894 Views)

This all depends on the data you are getting from your ECG. If you are receivng the output from the ECG system, then you need to perform post-processing of the data to determine frequency. If you are receiving unsolicited packets at each detected heartbeat then you need to be recording the timings upon arrival and determining frequency from these timings. Can you elaborate a little?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 10
(3,892 Views)

Thanks to all.

I am getting serial data in single numeric format which is the representation of a voltage amplitude of the ECG.

Since ECG is a low frequency signal, do you think that using FFT Transform could be a good technique.

Also i have to sample my data too for that.

Regards

0 Kudos
Message 5 of 10
(3,875 Views)

Thoric is right in that it depends on exactly what data you are receiving.  You've stated you are receiving a voltage signal.  But, are you receiving a continuous signal (lets say you get over 1000 voltage values per second), or are you receiving voltage values only when the ECG exceeds a certain threshold (1 pulse per heartbeat)?  This will determine whether or not FFT is possible for you.

 

 

0 Kudos
Message 6 of 10
(3,870 Views)

Sampling is good if you want to really analyse your data. you could then very specifically analyse the individual highs and lows and thereby get a better undertsanding of your signal.

0 Kudos
Message 7 of 10
(3,863 Views)

Thanks alot, the signal is continuous and is coming at a buad rate of 115200 at the serial port.

0 Kudos
Message 8 of 10
(3,836 Views)

I wanted to ask that if i note the time in which the peak is coming using the tick count vi, should i then require sampling of my data?

0 Kudos
Message 9 of 10
(3,835 Views)

Yes i would think so. The peak will be one of the analog values which will be sampled. There will also be a point which would be the lowest in term of signal amplitude. Sampling effectively takes points in your data based on your sampling rate, frequency etc.

0 Kudos
Message 10 of 10
(3,832 Views)