Reputation: 11
I am sort of new to LabVIEW and was trying to replicate the VI found in the following paper to model respiration in the human body using this circuit:
Image of Block Diagram from paper that I replicated:
The VI from the paper looks like the image above, which I replicated and made sure I got the same graphs when using the same inputs of: RC=1 cm H2Os/L , RP= 0.5 cm H2Os/L , CL= 0.2 L/ cm H2O , CW =0.2 L/ cm H2O and CS= 0.005 L /cm H2O. The amplitude input of the sine wave is 2.5, and the breaths/min input was 15. These inputs are for an adult model.
My results match with the following picture from the paper:
Using the same model, when I try to change the inputs for a child with a certain respiratory illness I get issues. I believe the model should still work since it is just a rough model of the lungs.
For example, when I want the inputs into the VI to be :
RC=18.1 cm H2Os/L , RP= 19.2 cm H2Os/L , CL= 0.008 L/ cm H2O , CW =0.02 L/ cm H2O1 and CS= 0.0018 L /cm H2O and breaths per min 35, I get graphs that freak out and look like the following. They start fine for a second and then end up looking like nothing.
The only way I obtained sinusoidal graphs that look correct with my new inputs is when I mess with the transport delay and put it at a larger delay of 20 seconds. In the paper with the adult values, I believe the delay is at 1 sec for that transport delay function because that led me to get the same results. I believe the model should still work with the new child values, but it just seems like something about that transport delay messes with it, or is it something else? I'm not sure why the transport delay is there personally as I am a novice, but I'm guessing that if I increase it to 20 seconds to make the graphs come out sinusoidal, the model is no longer accurate.
Overall, the over encompassing issue here is that I just don't know why the model can work with adult values, but when I change them, the model's graphs don't come out sinusoidal unless I crank up the transport delay. I know this might be confusing at first glance, but this is just a hail mary attempt to see if anything in the setup stands out to anyone.
Thank you.
Upvotes: 1
Views: 77
Reputation: 2996
In general, the electric circuit model is quite simple, and should always have sinus shaped solutions. So, no strange behavior for some parameter ranges here.
However, a computer simulation has its own limits. For example, a sinus curve drawn with 50 points per period results in a nice, smooth curve. With just 5 points, it needs lots of imagination to recognize that graph as sinus curve.
And if those points are used as input to the simulation, the result will be fine for 50 points, but weird (and wrong) for just 5 points per period.
So, don't use too few points!
Small numbers can also cause problems. The simulation calculates how much air will flow during the time between two points. If there are to many points per period, the time becomes very short, and the calculated volume may be calculated as exactly zero, since it's smaller than what the data type can hold.
For your simulation, I would change the data representation to EXT (extended, 64bit floating point) and use... may be 100 to 1000 points per period.
Unfortunately, you did not show your block diagram, so we can't give more advise.
Finally, I'm wondering what the goal of the paper is. I would say: It was not to solve the problem in first place. It was to show that LabVIEW can be used to do simulations like the one which solves the problem...
The problem can be solved analytically, i.e. exact, without simulation, even without integrals.
Upvotes: 1