Life Science

cancel
Showing results for 
Search instead for 
Did you mean: 

calculating lung volume from airflow signal

Hi,
I'm acquiring airflow signal. But I want to calculate and display volume from airflow signal. In order to do this I know I want to take the integral of airflow signal. My sample rate is 250 Hz.My acquired airflow signal is attached . I've tried to use Integral x(t) function in order to do this.I put 0.004(1/250) to dt.And I didn't wire anything to initial condition and final condition. But I couldn't get the desire lung volume signal. Could anyone help me please?
0 Kudos
Message 1 of 24
(15,889 Views)
What is wrong with the signal? Why do you think you aren't getting what you expect? The integral works as expected. You might try truncating your data so that it starts at a zero value. What kind of values are you expecting?
Randall Pursley
0 Kudos
Message 2 of 24
(15,875 Views)
the peaks are too sharp in the integrated signal.In the attachment the second wiindow displays integrated signal. And the third one displays delayed integrated signal and the peas are round.I want to see like the third one.
I found at a publication that(which I taken the attachment http://www.biopac.com/AppNotes/app181intairflow/airflowint.htm)
It says:

To synchronize the two signals, you can enter a Maximum cycle period. The Maximum cycle period will allow you to set the length of the delay. By controlling the delay, you can add an additional calculation channel that will allow you to delay the flow signal by the same time period.

Do you have any recommendations to see integrated signal like the third one.Where and how should I put delay?

Thanks
0 Kudos
Message 3 of 24
(15,848 Views)
Another quick and dirty method of integrating a "realtime" trace of data is to simply sum the data and multiply it by the delta time. If the data has a very high order function or lots of noise or sharp peaks this will not give you an accurate result. Increasing the data acq rate will also give you a more accurate integration of the signal. The integral is simply the sum over time of the F(t)*dt where the dt can be seen 1/sample rate and the signal data is your f(t). The computational over head for such a result is very fast; use the sum array for the last set of data and multiply it by the elapsed time (number of points * 1/sample rate) to yield an integration in sample units*seconds. If you need a more accurate approximation of the integral you can still use the integration VIs.

-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 4 of 24
(15,669 Views)
thanks for your reply.
0 Kudos
Message 5 of 24
(15,662 Views)
When I do the following
Randall Pursley
0 Kudos
Message 6 of 24
(15,826 Views)
I get these results. Is this what you get?
Randall Pursley
0 Kudos
Message 7 of 24
(15,828 Views)
Hi, yes this is what I get. but some of my airflow signals I couldn't get this ,the integrated signal was strange.I saved the data with the same procedure. you can find data as attachment. What would be the reason for this?
0 Kudos
Message 8 of 24
(15,790 Views)
You can find the strange integrated signal in the attachment
0 Kudos
Message 9 of 24
(15,791 Views)
Hi Burcu !
Still stuck with peaks ? 😉
There is nothing strange in your integration signal : You are integrating over the whole signal range, and your data present a small offset. That gives a continuously increasing result.
Remember : the integral of a constant is a straight line.
And the integral of a sine function is a cosine function.
This second statement explains why you do not obtain the lung volume : you are integrating over the whole signal, instead of integrating on only a breath duration!
I suppose that your signal is the air flow rate (BTW, what is the signal unit ? ml/s, l/min ?). You are apparently recording both positive and negative air flow : air entering and leaving the lungs. Of course, the sum of the two operations should be near zero, since respiration produces an amount of CO2 (as volume) nearly equal to the consumed O2. Otherwise the lungs would collapse (out>in) or explode (in>out)!
What you have to do is to detect the instants when the air flow crosses the zero value (ie going from breath in to breathe out, or the reverse), and integrate the signal only between these two instants. You will get result which sign will depend on the breath direction.
I'm sure that with Randall help's you will rapidly find the solution now.

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 10 of 24
(15,779 Views)