LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to calculate heart rate in simple way by using visa serial

Solved!
Go to solution

I am new in Labview, this is my mini project title " PC based ECG monitoring". In this miniproject, i have hardware part which are ECG circuit and DAQ (MPLAB) and will using Labview for graphic user interface. my problem is, i have done the chart for the ecg monitoring, and i need to calculate the heartbeat and detect bradycardia and tachycardia. for bradycardia is more or equal to 100bpm and for tachycardia is less than 60bpm.  for the 2 diasease, when it is either bradycardia  or tachycardia, the alarm will light up.  i also have a problem to do the peak detection and mark all the maximum and minimum peak and put the location of the peak. thanks. here i got attach my vi.

0 Kudos
Message 1 of 11
(8,277 Views)

First of all, how quickly are you supposed to be getting data?  We need a sample rate before we can do anything.

 

The ECG is giving a raw voltage, right?  So we need to build up an array of the voltages and perform a peak detection.  Count the number of peaks, divide by the number of minutes you are acquiring over, and then you have your beats per minute.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 11
(8,267 Views)

Don't you have you heart terminology the wrong way round?

Tachycardia is an abnormally fast heart beat

Bradycardia is an abnormally slow heart beat

 

Rod.

 

0 Kudos
Message 3 of 11
(8,266 Views)

@Rod wrote:

Don't you have you heart terminology the wrong way round?

Tachycardia is an abnormally fast heart beat

Bradycardia is an abnormally slow heart beat

 

Rod.

 


Well, if you want to get into the details, 60bpm is not adnormal either.  My pulse is regularly 55-60bpm.

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 11
(8,264 Views)

sample rate

eg. iteration in 10 sec = 2000 samples
so 1 sec = 200 samples

eg. peak found in 15th samples and 45th samples,

 

1st peak at 15/200samples = 0.075 sec
2nd peak at 45/200samples = 0.025 sec

0.025-0.075 = 0.15
so HR = 60/0.15 = 387bpm

raw voltage? do you mean raw signal from simulator? 

do u have any example for this problem??
thanks for your response and i really appreaciate your help.

0 Kudos
Message 5 of 11
(8,231 Views)

 

sorry, i am blur because this is group work. DAQ not i m doing

 

 


the sample rate is 100 
at DAQ, use 300us to read all the program and will send 1 sample in 0
.01sec


thanks for any help.

0 Kudos
Message 6 of 11
(8,186 Views)

@Mashimaro wrote:

eg. peak found in 15th samples and 45th samples,

 

1st peak at 15/200samples = 0.075 sec
2nd peak at 45/200samples = 0.025 sec

0.025-0.075 = 0.15
so HR = 60/0.15 = 387bpm


Try your math again there.  Does it make sense that the 45th sample happened before the 15th?

 

45/200 = 0.225 seconds

0.225-0.075 = 0.150 seconds/beat

60sec/0.150sec/beat = 400bpm

 

That is a much higher heart rate than my wife as a nursing student has ever seen.  I'd say your sample rate is likely wrong here.  Even your 100samples/sec seems low to me.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 11
(8,117 Views)

400 bpm = mouse or hummingbird?

 

I agree that some information is missing or incorrect.  Since this is a group project, it appears that the group should get together and make sure that everyone is using the same information, such as sampling rates.  Someone in the group must serve as the project architect/manager with the responsibilty to define or verify that the interfaces between the segments being worked on separately by different individuals or subgroups are clearly defined.

 

Lynn

0 Kudos
Message 8 of 11
(8,081 Views)
Solution
Accepted by Mashimaro

here is the complete one....
thanks alot ..

0 Kudos
Message 9 of 11
(7,903 Views)

So it's the solution to read 135 values from device, but to use only the first one???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(7,888 Views)