NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Active Participant
rpursley8
Posts: 958

Re: calculating lung volume from airflow signal

For each set of data, try doing the following

1. Truncate any part of the data that is not actually representative of the airflow measurements
2. Find the average value of the remaining data and subtract that from your signal
3. Take the running integral as before

Your signal should be the airflow signal
Randall Pursley
Trusted Enthusiast
chilly charly
Posts: 3,438

Re: calculating lung volume from airflow signal

Just a correction to my previous post :
there is no real need to find the zero crossing point : the lung volume is simply the positive and negative maxs of the signal integral over several breaths. Sorry to have missed that !
The only thing that remains to be done is to remove the DC component when present, as in the last Burcu's example...

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...        
Member
burcu
Posts: 82
0 Kudos

Re: calculating lung volume from airflow signal

Hi,
My signal is airflow and unit is liters/second.I'm trying to calculate volume from this signal.I'm taking integral of this signal offline after saving airflow data.It is strange that I saved a data 1 as you can find as attachment and I can see a proper signal when I take the integral of it.
Member
burcu
Posts: 82
0 Kudos

Re: calculating lung volume from airflow signal

However, Ican't see the proper signal in my saved data called 2 as you can find in the attachment. Isaved these two data in the same ondiitons with the same vi. Why can I see with data 1 a proper volume signal while I can't see with data 2?
Member
burcu
Posts: 82
0 Kudos

Re: calculating lung volume from airflow signal

I'm sending the vi as attached.How should I modify this in order to see volume properly.
Active Participant
rpursley8
Posts: 958

Re: calculating lung volume from airflow signal

If you look at the 2.txt data you will see that there is a DC offset across your data of around 0,12. When you subtract the DC offset from the data, you get a good looking plot. There is a function called 'AC&DC Estimator' that will give you the number to subtract from your data. Add this to your program before you take the integral. Also, it wouldn't hurt to apply a lowpass filter as with your ECG data, you seem to have 50/60 Hz riding on your signal.

As for getting your data, you really need to start from a known state. If I were you, I would have your subject take as big a deep breath as he can and hold it until you start the acquisition and then exhale as much as he/she can. Have the subject repeat two or three more times (in the same acquisition) and then breathe in whatever way you want. The first few will give you a max/min reference for (assuming the exhale is the minimum volume or zero reference point) the rest of your analysis.
Randall Pursley
Member
burcu
Posts: 82
0 Kudos

Re: calculating lung volume from airflow signal

Hi,
I used AC&DC estimator and it worked. Thanks for your help.
Member
LW-s
Posts: 17
0 Kudos

Me again with new subject...

Hello Charlie,

I am trying to acquire pressure signals from the parallel port in order to calculate flow and volume waveforms and some time data related to flow waveform.
but i have some problems;

1- i need to automaticly measure and digitally display the inspiration time and expiration time which are related to flow waveform; inspiration time is the total duration of flow travilling on the positive side and expiration time is the duration of flow travelling on the negative side.

2- my sample rate is 200 Hz in the waveform graph. should i use and array to combine x and y values and should i use 0.005 value for x-axis.

3- when my pressure signal is zero at the input, i see 24 value on the inport at labview. how can i deal with it and pull the value to zero for zero input value.
other vaules of input are accurate. when i send 255, i see 255 on inport function.

i am attaching an example flow graph, and i will send a screenshot of my block diagram at my next message.

thanks for your help.

Burcu
Member
LW-s
Posts: 17
0 Kudos

Block diagram

i am attaching my block diagram`s screen shot...
Member
LW-s
Posts: 17
0 Kudos

flow

I am attaching an example flow waveform graph...
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page