From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate blood pressure signal periodically

Hello,

I'm acquaring the ECG and blood pressure signals with a DAQ device.

I made a subVI for calculate the beats per minute by usign the peak detector vi. It works fine.

Now I would like to integrate the blood pressure signal between the time of each peak wave from the ECG signal, and after each beat write the result to a numeric indicator.

How can I integrate periodically the blood pressure signal starting from the time of the peak and ending at the time of the next peak from the ECG signal?

I have the time stamp at which each peak occur from the heart beat calculating VI, I just want the blood pressure signal to integrate starting at the time of the first peak, until the the time of the next peak, when is detected. And so on, so every 2 peaks I have one numeric value which represent the integral of that signal, in that dynamic period.

 

signals.jpg

0 Kudos
Message 1 of 13
(4,269 Views)

Hi simo,

 

I have the time stamp at which each peak occur

When you know the timestamps you can easily get a subarray of your blood pressure data to integrate. What exactly is the problem?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(4,246 Views)

@GerdW wrote:

Hi simo,

 

I have the time stamp at which each peak occur

When you know the timestamps you can easily get a subarray of your blood pressure data to integrate. What exactly is the problem?


 

 

Thank you GerdW for the reply!

How are you thinking to get the dynamic subarray of data? this is all in realtime, I need to calculate it beat by beat from the raw signal.

 

Regards

0 Kudos
Message 3 of 13
(4,232 Views)

Hi simo,

 

How are you thinking to get the dynamic subarray of data?

All I see from your image are plots from two signals. So I guess you have some buffers to store those data. And as you already know the timestamps it should be easy to get subarrays of your signals stored in some buffer(s)!

 

As long as you only show frontpanel images you will get only that general advice…

 

this is all in realtime

You use a cRIO or PXI system?

 

I need to calculate it beat by beat from the raw signal.

You said that before…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(4,216 Views)

I use the NI USB-6218 BNC for acquire data and LabVIEW on a personal computer.

 

For now I don't have a buffer for store the data, I just use the write to measurement file when I'm interested in register them.

 

I show you the Index.vi block diagram;

The ECG BPM sub-VI (red heart) gives me in output the timestamps (for now this terminal is disconnected), and when the boolean "Pulse" is true, I know that at that time a peak occurred.

How can I create the buffer you talk about? I mean, what is the most efficient way?

I don't think is necessary to store all the signal data since the program will run for many minutes, but just the data in the period between two peaks will be perfect for calculate the integral on the blood pressure wave. At the end, I'm interested to store just the numeric value of the integral.

 

Screen Shot 2014-12-10 at 08.14.27.png

 

 

Regards

0 Kudos
Message 5 of 13
(4,173 Views)

Hi simo,

 

- collect data in an array stored in a shift register

- stay away from DDT for that purpose

- once you detected the next pulse you can clear your storage buffer and collect the data of the next heart beat period

 

There are example VIs coming with LabVIEW. They also demonstrate how to use arrays, shift registers and other basic stuff…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(4,158 Views)

- collect data in an array stored in a shift register

 

Can you please give me an example code?

I'm looking at the examples coming with LabVIEW but I can't find what I need.

 

Best Regards

0 Kudos
Message 7 of 13
(4,128 Views)

Hi simo,

 

adding (random) data to an array stored in a shift register:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(4,120 Views)

Since I don't have the possibility to take the real data for now, I just simulate a sine wave. The peak detection works fine and it calculate te BPM perfectly.

I converted the data type as you suggested before and made the array.

How can I store the data just from one pulse to the next one? Right now I guess is just storing continuosly.

 

Regards

 

Screen Shot 2014-12-10 at 11.47.32.png

0 Kudos
Message 9 of 13
(4,112 Views)

Hi GerdW,


I've seen the tutoruals and the examples offered by NI but I can't figure out how to do this Smiley Sad

Is it correct what I've done with the shift register?

 

Regards

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