Model of respiratory mechanics
1. Respiratory mechanics: fundamental equations
Let us consider the respiratory mechanics model described in the following figure. It is a fairly
complete model, which includes all the major respiratory airways present from the mouth to the
alveoli. The pressure drops are represented through hydraulic resistances, while the air volumes are
contained in hydraulic capacities: for simplicity, we will assume that the pressure-volume and
pressure-flow relationships are linear, so we will consider constant capacities and resistances.
The meaning of the symbols in the figure is as follows: m: mouth, l: larynx, t: trachea, b: bronchi, A:
alveoli, pl: pleura, cw: chest wall, mus: respiratory muscles , vent: artificial ventilator (if present).
An important element to keep in mind when writing the model equations (and more generally the
equations of a hydraulic system like the one in the figure) is that:
i) The flow on the resistances depends on the pressure drop, considering the pressure inside the
respiratory duct (or inside the vessel, in the case of cardiovascular models);
ii) The volume variation on the capacities depends on the variations of the transmural pressure,
defined as the difference between the internal pressure and the external pressure of the duct (or
vessel).
The problem is delicate in the case of the respiratory system in the figure, because the larynx presents
atmospheric pressure as external pressure (represented in the figure as a mass), the trachea, bronchi
and alveoli have pleural pressure as external pressure, whereas the external pressure of the rib cage
is the pressure produced by the respiratory muscles.
Figure 1 – Electric analog of respiratory mechanics
1
It should also be remembered that, in the diagram of the figure (since there are no inertial phenomena)
the state variables are only the transmural pressures at the ends of the five capacities. In the following,
to avoid errors, these transmural pressures will be indicated with the variables Pi (with i = 1, 2,…, 5),
while we will use the pressures inside the ducts as auxiliary variables. In the case of the larynx, the
two pressures (transmural and internal) coincide (the atmospheric pressure being assumed as zero by
convention), but we will maintain this distinction, at least formally, in any case.
We can then write the following five differential equations
dp1 (t ) pm (t ) pl (t ) pl (t ) pt (t )
Cl (1)
dt Rml Rlt
dp2 (t ) pl (t ) pt (t ) pt (t ) pb (t )
Ct (2)
dt Rlt Rtb
dp3 (t ) pt (t ) pb (t ) pb (t ) p A (t )
Cb (3)
dt Rtb RbA
dp4 (t ) pb (t ) p A (t )
CA (4)
dt RbA
dp5 (t ) pl (t ) pt (t )
CCW (5)
dt Rblt
The previous five equations define five state variables (p1, p2, p3, p4 and p5). However, in the right-
hand side of the equations there are as many auxiliary variables (pl, pt, pb, pA and ppl) while we
consider the pressure at the mouth (Pm) and the pressure induced by the respiratory muscles (pmus) as
external inputs (the expression for this quantities is given below).
The expressions of the auxiliary variables, in function of the state variables and of the inputs, are the
following (immediately obtainable from the expressions of the transmural pressures):
pl (t ) p1 (t ) (6)
p pl (t ) p5 (t ) pmus (t ) (7)
pt (t ) p2 (t ) p pl (t ) p2 (t ) p5 (t ) pmus (t ) (8)
pb (t ) p3 (t ) p pl (t ) p3 (t ) p5 (t ) p mus (t ) (9)
p A (t ) p4 (t ) p pl (t ) p4 (t ) p5 (t ) pmus (t ) (10)
Substituting (6) - (10) in (1) - (5) we obtain the system of differential equations in canonical form. In
case of numerical simulation, of course, it is sufficient to calculate the equations (6) - (10) at the step
k of the numerical algorithm, and use them inside the derivatives (1) - (5) to calculate the state
variables at step k + 1.
2
Finally, it is important to define some output quantities, which characterize the behavior of the model.
We define the Instant Alveolar Ventilation, VA , as the instantaneous air flow through the alveoli.
The following equation holds
p (t ) p A (t )
VA (t ) b (11)
RbA
which is equal to the right hand member of Equation (4). Instead, we define the Instant Total
Ventilation, V as the air flow through the nose and mouth, i.e.,
p (t ) pl (t )
V (t ) m (12)
Rbml
which is equal to the first term in the right hand member of Eq. (1).
However, what is really interesting in physiology is the amount of air that enters the alveoli per unit
time. This value, called alveolar ventilation, cannot be obtained by calculating the average value of
(11), because this value, in the presence of a periodic input is obviously equal to zero (In the following
paragraphs will assume a periodic respiration, as it happens when a stationary amount of air enters
and exits in the unit of time). Therefore, in order to calculate the alveolar ventilation, we will consider
only the amount of air entering into the alveoli per unit time (therefore only the inhalation) assuming
that the same amount of air will come out per unit time with the exhalation.
Alveolar ventilation will therefore be calculated as the difference between the maximum and
minimum value of the alveolar volume during a whole breath (equal to the volume of air entered with
inspiration), divided by the duration of a respiratory cycle.
The alveolar volume has the following expression:
VA (t ) C A p4 (t ) C A p A (t ) p pl (t ) (13)
Having named T the respiratory period, ti the instant at which inspiration begins, and ti +T the instant
of end of expiration, we can calculate the alveolar ventilation (expressed in L / min) as follows:
VA max V A (t ) min V A (t )
60
(14)
ttt ti T ttt ti T T
Note that expression (14) is no longer dependent on the current instant of time, t, but assumes a single
value for each respiratory cycle.
The alveolar volume differs from the entire volume of air due to the presence of the dead space. This
is represented, in our model, by the volume of air contained in the larynx, trachea, bronchi: this
volume contributes to total ventilation (i.e. to the entire flow entering through the mouth + nose) but
does not contribute (if not negligibly) to the of gas exchange between blood and air. We will then
define the instantaneous dead space as the following volume
VD (t ) Cl p1 (t ) Ct p2 (t ) Cb p3 (t ) (15)
while the total air volume is given by the following quantity
Vtot (t ) VD (t ) VA (t ) (16)
3
The term Minute Ventilation is often used in physiology to indicate the total volume of air inspired
(or exhaled) by the lungs during one minute (hence, it has the dimension of a flow, volume per unit
time), and will be calculated from the total volume according to the following equation
Vtot max Vtot (t ) min Vtot (t )
60
(17)
ttt ti T ttt ti T T
Finally, the difference between Eq. (17) and Eq. (14) represents the so-called dead space ventilation.
2. Simulation with sinusoidal inputs: the natural breathing
Let's consider a first example in which the inputs to the model (pm and pmus) have a sinusoidal shape.
Obviously, this is a strong simplification of reality, but very useful for understanding the temporal
trend of the different quantities involved.
For the simulations, we will refer to the value of the parameters reported in the following table, taken
from Albanese et al. (2016):
Note that, in the table, the pressures are expressed in cmH2O, the volumes in L and the flows in L / s.
Suppose, first, that we simulate natural breathing. For this purpose, let's imagine that the pressure at
the mouth is equal to the atmospheric pressure (0 cmH2O) and that the pressure pmus has a sinusoidal
trend with a respiratory rate of 12 cycles / min (and therefore a respiratory period equal to 5 s). To
define pmus it will also be necessary to imagine the amplitude of the breath. Physiological values can
be obtained assuming that, at the end of exhalation, the muscles are released and the pressure outside
the rib cage is equal to 0 cmH2O, while at the end of inspiration the muscle activity has produced a
depression equal to - 6 cmH2O. Note that this depression draws a flow of air from the mouth to the
alveoli. We will therefore use the following expressions:
pmus (t ) Amus cos2t / T 1
(18)
pm (t ) 0
4
where we take Amus = 3 cmH2O, T = 5 s, and the instant t = 0 represents the end of exhalation. Note
that, due to our simplified assumption that the pressure waveform is sinusoidal, the durations of
inspiration (from 0 to 2.5 s) and of expiration (from 2.5 to 5 s) is equal. This simplification will be
removed in the next exercise.
Finally, an initial value must be assigned to the state variables. In calculating the initial state, let us
assume that the pleural pressure ppl at the end of expiration is - 5 cmH2O, and that the alveolar volume
at the end of expiration is equal to 2.3 liters (the latter information is used to calculate the alveolar
pressure pA at the end of expiration). For the other state variables, since the volume is very low, as
can be seen from the previous table (indeed, the relative capacities are very low) we can assume a
value at the end of expiration equal to 0 cmH2O. This value is incorrect, but will be automatically
adjusted by the numerical simulation: at the end of a transient period, all the state variables will reach
the correct value at the end of exhalation. In other words, a small part of the volume at the end of the
exhalation, which we initially inserted entirely in the alveoli, will be distributed in the other
compartments to reach the correct distribution.
Finally, note that, since the capacitance Cl is extremely small (and therefore the relative time constant
is extremely small) we need to use a very low integration step. Also note that the total volume of each
compartment is calculated as the sum of an unstressed volume and a filling volume. However, in
writing Eqs. (13) - (17) only the filling volume was considered. This is permissible, having assumed
that the unstressed volume is constant (and therefore does not influence the calculation of Eqs. (14)
and (17)).
The following simulations are performed with Euler's method, using an integration step dt = 0.0002
5
Figure 2 – Simulation of the natural breathing, assuming a sinusoidal pattern of pressure for the respiratory
muscles, and constant zero pressure (i.e. atmospheric) at the mouth.
Note from the figures that the alveolar volume undergoes a small initial decrease, compared to the assigned
value, which corresponds to a small increase in the volume of the dead space, to fill the various compartments.
Also note how the alveolar pressure becomes negative during inspiration (thus drawing a flow of air into the
alveoli and increasing the alveolar volume up to about 2.8 L), while it reaches a positive value during
exhalation, causing air to flow out from the lungs. An approximate calculation of alveolar ventilation can be
made by calculating the difference between the last maximum (2.8738 L) and the last minimum (2.2549 L)
(assuming the steady-state model) and multiplying it by the breathing rate. We obtain the value 0.1238 L / s
= 7.426 L / min. Physiological values of alveolar ventilation for normal adults are in fact around 7 - 8 L / min.
3. Simulation with sinusoidal inputs: the artificial ventilation
Let us consider, as a second example, the case in which the subject is under artificial ventilation,
without any natural breathing. In this situation we will have pmus = 0 (respiratory muscles completely
released), and the breath will be induced by a pressure at the mouth pm, which we again assume as
having a sinusoidal shape. Moreover, we still assume that the amplitude of the respiratory sinusoid is
equal to 6 cmH2O, and that the alveolar volume at the end of expiration equal to 2.3 L, but this time
the amplitude of the pressure waveform (at the mouth) must vary between 0 and + 6 cmH2O, assuming
0 the value at the end of exhalation. In fact, a positive pressure in the mouth is necessary to induce a
positive inflow of air during inspiration and, consequently, to fill the alveoli. We will therefore use
the following expressions:
pmus (t ) 0
(19)
pm (t ) Aven cos2t / T 1
where Aven represents the amplitude of breathing induced by the ventilator, and we assume Aven = - 3
cmH2O to have a pressure at the mouth at the end of inspiration as high as + 6 cmH2O.
6
Figure 3 – Simulation of artificial ventilation (i.e., forced ventilation) with a sinusoidal pattern of pressure at
the mouth, induced by the ventilator.
As can be seen from the previous figure, the results are completely similar to those obtained with
natural breathing, as regards the flows and volumes, but they are different as regards the values of the
pressures inside the ducts. In fact, while during natural ventilation a depression is created inside the
lungs, which draws air in, during forced ventilation a positive pressure is created. The important thing,
however, is to maintain a trend as physiological as possible, and this achieved by maintaining the
same values for the transmural pressure (and consequently the trend of the volumes) as in the previous
case. In fact, the transmural pressure is the force that is experienced by the walls of the ducts (trachea,
7
bronchi, alveoli, etc.) and which must be kept at physiological values, in order to avoid unnatural
conditions.
The model presented so far is linear. Hence, we could also write its solution using the theoretical
expression of the forced motion of a linear system: this has not been not done here, since this solution
involves the use of a 5x5 matrix and 5 eigenvalues: hence the consequent integral expression of the
forced motion is quite complex. The exercise is left to the reader.
Finally, let's consider the case, very important in clinical practice, in which a patient begins to
ventilate freely, but his/her natural ventilation is still insufficient, and therefore the contribution of
the ventilator is also necessary (mixed ventilation). In this situation, ventilation depends on the
difference between the pressure at the mouth pm(t) and the pressure of the respiratory muscles pmus(t).
The ideal situation is the one in which the two terms (assuming still a sinusoidal shape for the
moment) are in phase opposition, so that their contributions add up (remember that p acts with the
sign +, pmus with the sign -). This is the optimal situation for the patient. Conversely, if the two terms
are in phase, whenever there is an increase in pm (t) (i.e. the ventilator tries to induce an inspiration)
pmus(t) increases too (and so the patient exhales): it is then said that the patient "fights the ventilator".
Similarly, the situation can become very complex if the respiratory periods (of the ventilator and of
the patient) were not coincident.
As an example, the following figures show the temporal pattern of the alveolar volume, assuming the
presence of both terms Pm(t) e Pmus(t) with equal period T, that is:
pmus (t ) Amus cos2t / T 1
(20)
pm (t ) Aven cos2t / T 1
Figure 4 – Instantaneous pattern of alveolar ventilation obtained using the inputs shown in Eq. (20) and
assigning the values 0 (left upper panel, we have VA 9.901 L / min ) , / 2 (right upper panel, we
have VA 6.996 L / min ), 3 / 4 (left bottom panel, we have VA 3.782 L / min ), and (right
bottom panel, we have VA 0 L / min ).
8
We asumed Aven = ‒2, Amus = +2, while represents the phase difference. The condition of maximal
ventilation occurs when = 0. The condition of minimal ventilation occurs when .
As can be seen from the figure, when the displacement between ventilator and breath is not optimal,
the variations in alveolar ventilatory volume decrease drastically, to arrive at the case of practically
zero breathing in the event of phase opposition.
The reader is invited to prove the case in which the expressions of pm(t) and pmus(t) have different
periods.
3. Simulation with a natural input: free respiration
The previous simulations were performed by imagining sinusoidal inputs, to simplify the analysis of
the results (in particular, for what concerns the phase shift between the ventilator waveform and the
patient's breathing). In normal conditions, however, inspiration and exhalation have different
duration, and the pressure trend caused by the respiratory muscles can be better approximated by a
function of the following type (taken from Albanese et al., 2016):
Pmus , min Pmus , min T
T T t2 t se t 0, TI
I E TI TE
Pmus (t ) P t T I E
T (21)
mus , minTE e e se t TI , T
1 e
where TI , TE e T denote the inpiratory period, the expiratory period, and the total respiratory period,
respectively. In the following we are using a ratio TI /T = 0.4 with = TE/5, while, as in the initial
simulation, Pmus ,min = ‒ 6 cmH2O and T = 5s. Of course, expression (21) refers to a single respiratory
period, assuming that this wave repeats itself periodically.
The results obtained, in the absence of ventilatory forcing (Pm(t) = 0) are shown in the following
figures, where now the pressure and flow waves are much closer to the real physiological ones. The
alveolar ventilation, still calculated with the formula (14), is equal to 7.2972 L/min. As can be seen
from the instantaneous trend of total ventilation, the initial phase of inspiration and the initial phase
of exhalation are much more rapid and accentuated, compared to the sinusoidal case.
9
Figure 5 – Simulation of the natural breathing, assuming a more physiological pattern for pressure of the
respiratory muscles, obtained with equation (21).
10