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:
The waveforms in my model look like this:
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.
EDIT:
Also the dataset for the respiratory rate during the same time period was given:
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.
References:
[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
[4]https://borealisdata.ca/dataset.xhtml?persistentId=doi:10.5683/SP2/NLB8IT