I'm doing a project modelling the human lung. This model considers two compartments - the lung and tissue compartments. In the model, the rate of ventilation is controlled only based on the concentration of CO2 detected by chemoreceptors in the body. The output variables of this model are the partial pressures of carbon dioxide in the lung compartment and the tissue compartment. This model is mostly based on the one given in [1].

Some of the assumptions in this model are that both compartments have homogeneous partial pressures inside them, that at the alveoli the air in the lungs and the arterial blood leaving the lungs are at equilibrium (with respect to CO2 partial pressure), and also that at the tissues- there is equilibrium between co2 in the tissues and the venous blood flow leaving the tissues.

So, according to this model if i had arterial PCO2 and venous PCO2 (real time datasets)- i would get the lung and tissue compartments' PCO2s as well, so i could validate the model.

All i have now is the capnogram signal from here [4]. By referring to [2] and [3], i can see that there is a relation between end tidal CO2 (represented in capnogram) and arterial PCO2, as well as between arterial and venous PCO2. So normally, end tidal PCO2 is 2-5 mmHg lower than arterial PCO2, and the gap between venous and arterial PCO2 is around 6 mmHg (for a certain blood flow rate, CO2 production rate, CO2 dissociation slope). (These differences are between the means of the respective partial pressures). If i use those values and also assume that the waveform of arterial PCO2 and venous PCO2 is similar to the capnogram waveform - and adjust the amplitudes to somewhat fit my model, i get the following plot:

PCO2 at various locations

The waveforms in my model look like this:

Model PCO2 waveforms

Is there a way to more accurately derive the arterial and venous PCO2 waveforms from the capnogram waveform? I am asking because i have assumed the amplitudes of these waveforms just based on my model, i'm not sure if this is how it looks in reality. I only know the means have some given seperation.

Practically i don't think blood gases can be tested for CO2 fast enough to show this waveform, so i don't know how these waveforms can be obtained.


Also the dataset for the respiratory rate during the same time period was given:

measured respiratory rate

This was measured at intervals of ~3-4 seconds. Using this i can get the waveforms i'm looking for. I'll explain how as an answer below.


[1]Vielle, B., & Chauvet, G. (1993). Mathematical study of periodic breathing as an instability of the respiratory system. Mathematical Biosciences, 114(2), 149–172. https://doi.org/10.1016/0025-5564(93)90076-m

[2]Razi, E., Moosavi, G. A., Omidi, K., Saebi, A., & Razi, A. (2012). Correlation of end-tidal carbon dioxide with arterial carbon dioxide in mechanically ventilated patients. Archives of Trauma Research, 1(2), 58–62. https://doi.org/10.5812/atr.6444

[3]Ltaief, Z., Schneider, A. G., & Liaudet, L. (2021). Pathophysiology and clinical implications of the Veno-arterial PCO2 GAP. Critical Care, 25(1). https://doi.org/10.1186/s13054-021-03671-w


  • k, i'll delete that one. Commented Jul 10, 2022 at 15:38
  • As a plus, you seem to keep the points on that site. (I knew about it because I was following it as interesting). Commented Jul 10, 2022 at 15:41
  • oh ya that's true. cool :) Commented Jul 10, 2022 at 15:57
  • i think i got the waveform i want. The problem was i didn't know how to connect the capnogram signal to the variables in my model. Anyway the respiratory rate was given, so i could use that. Commented Jul 10, 2022 at 18:53

1 Answer 1


as i explained earlier, in my model, the rate of ventilation only depends on the concentration of CO2 near the chemoreceptors in the body. Instead of concentration, partial pressure of CO2 is considered.

There are two sets of chemoreceptors we consider. There are the peripheral chemoreceptors in the carotid body (near the aorta), which are sensitive to PCO2 in the arterial blood flow in that region. And there are the central chemoreceptors located in the medulla of the brain, and they are sensitive to PCO2 in the cerebrospinal fluid.

In my model, i assume that PCO2 at the peripheral and central chemoreceptors are equal to the PCO2 in the arterial blood flow originating from the lungs (same as the PCO2 in the lungs - from equilibrium assumption) but delayed by delays Tp and Tb (4s and 8.4s).

This is what my model looks like: model flow chart

The V̇a is the rate of alveolar ventilation, and is given by


here, Vt is the tidal volume and f is the frequency of breaths taken (same as respiratory rate converted from breaths/min to breaths/s). Since i'm given the dataset for respiratory rate for a duration of 500s, i remove the two feedback paths (central and peripheral) and replace V̇a as an input like this:

model using real time data

Then if i solve the differential system for the model, i get this:

pco2 variation using given data

So atleast according to my model this would be what the arterial and venous (same as lung and tissue) PCO2 waveforms would look like.

Some inaccuracies are there in the model:

  • I should probably consider an additional brain compartment, because this what was done in the reference book i referred for the ventilation control equations. But generally peripheral control is supposed to more dominant, so it might not be important.
  • The dataset i got was collected from a 4 year old subject, and i used the parameters for an adult, so that maybe why the CO2 levels are dropping as shown in the plot.


This might not be the right way to validate a model. A better way would be to compare the respiratory rate obtained from my model, and compare it with this respiratory rate.


  • Cardiovascular and Respiratory Systems: Modeling, Analysis, and Control (by Batzel, J.J. et al.; 2007)
  • Does CO2 pass the blood brain barrier efficiently? My recollection is that it doesn't, but H+ from carbonic acid does. Delays can cause issues, like Chayne-Stokes breathing patterns. Commented Jul 10, 2022 at 23:52
  • Here i think i've not considered that transfer of CO2, or accumulation of CO2 due to inefficient CO2 transfer. I've just assumed the chemoreceptors are directly sensitive to the CO2 concentration in the blood (instead of the concentration in the brain fluid). Commented Jul 11, 2022 at 8:47
  • I read about Cheyne-Stokes breathing, that paper i referred also says it's caused by the delays which lead to instability in the system. Can we observe this pattern in the capnogram, if Cheyne-Stokes breathing is happening? Commented Jul 11, 2022 at 8:50
  • 1
    breathing will stop for a while, then start again. If you can see breathing in a capnogram, you will see the pattern. Commented Jul 11, 2022 at 11:21
  • 1
    thanks for the reminder. It is CO2 that diffuses easily, and the receptors inside the barrier that regulate breathing are largely pH sensors, so while the dissociation of carbonic acid is in the pathway, it happens inside the barrier after CO2 diffuses. Commented Jul 13, 2022 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.