LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

respiration rate

Solved!
Go to solution

Hi! Im a biomedical engineering student and i need to detect the respiration rate on labview based on three axis accelerometer, I a m using the accelerometer z-axis for the breathing movements of the chest and thorax, but i can't see the respiration signal. Also I am using an analog butterworth filter with cutoff frequency of 1 hz (cause the respiration frequencies are between 0.1 and 0.5 hz) and a digital filter on labview . So this is my question, how can i sample low frequencies or the filtered signal? I attach the vi file i am using. Thanks!

0 Kudos
Message 1 of 8
(1,971 Views)

Can you post a sample of your data?  Without the analog filter would be preferable.

 

 Respiration will show up as a displacement of the chest.  To get that from an accelerometer, I think you would have to integrate the signal twice

Randall Pursley
0 Kudos
Message 2 of 8
(1,936 Views)

There is no point in posting a picture of Express VIs.  We can't open them to see how they're configured.

LabVIEW 8.5.1 - 2019 Pro Dev
0 Kudos
Message 3 of 8
(1,915 Views)

Oh sorry, i see other questions in forums and see pictures of the block diagram, i supposed it was the best.Here is my VI, and i sampled twice, continous samples with a sampling of 1k at 10k of rate, and i can see the displacement, but if i sample at N samples with the same rate i cant see my signal filtered (only digital filter of lowpass is used)  I used Labview version 12.0 

0 Kudos
Message 4 of 8
(1,893 Views)

why integrate the signal twice? If i do a sample test, at zero g position of the accelerometer, the amplitude is of 1.5 volts , and i get 1.6 or 1.8 volts, so i know that its correct, but how can i determine i have enough data to see the right signal of displacement and not noise or other movements? 

0 Kudos
Message 5 of 8
(1,888 Views)
Solution
Accepted by topic author beqyWilliams

An accelerometer is not measuring displacement, it is measuring acceleration.  But I guess the signal is oscillatory so if all you want is respiratory rate, then it would work fine.  You probably need a Bandpass filter with a low cutoff around 0.1 Hz to eliminate any constant acceleration due to gravity.

 

I am not really familiar with the Express VIs but the filter one doesn't have an initialization input, so it may be resetting for each set of data that is acquired.  You might want to use the standard filter function in the Signal Processing palette.

 

 

 

RespFilter.png

Randall Pursley
Message 6 of 8
(1,872 Views)

Hi, thanks for your help. Im already able to get data from the accelerometer, but I dont understand very well the data acquisition modes, for example, I do my data acquisition by continous mode and filter, but if I want only 60 seconds of data acquisition, how do I do that? I understand that it can be on N samples, cause I want 1000 samples per Second, but how can I establish that 1000 samples per Second in 1 min? I know its very basic aknowledge but I read and read and I still dont understand it. Thank you.

0 Kudos
Message 7 of 8
(1,802 Views)

Well, let's say you set up your Express VI to acquire 1000 points at 1 kHz.  Data should output every second, right?

 

The easiest way, if you use what I posted would be to have a new input that selects how many seconds you want to acquire data.  Say you set it to 60.  Take this input and compare it to the while loop counter (which starts counting at 0).  When the while loop reaches its 60th iteration (i=59), then stop the acqusition.

 

If you sample 1000 points at 10 kHz then you will, of course, sample until you reach the 600th iteration since data would then be output every 0.1 seconds.

 

 

original_mod.png

Randall Pursley
0 Kudos
Message 8 of 8
(1,768 Views)