Abstract

We develop optimal respiratory airflow patterns using a nonlinear multicompartment model for a lung mechanics system. Specifically, we use classical calculus of variations minimization techniques to derive an optimal airflow pattern for inspiratory and expiratory breathing cycles. The physiological interpretation of the optimality criteria used involves the minimization of work of breathing and lung volume acceleration for the inspiratory phase, and the minimization of the elastic potential energy and rapid airflow rate changes for the expiratory phase. Finally, we numerically integrate the resulting nonlinear two-point boundary value problems to determine the optimal airflow patterns over the inspiratory and expiratory breathing cycles.

1. Introduction

Respiratory failure, the inadequate exchange of carbon dioxide and oxygen by the lungs, is a common clinical problem in critical care medicine, and patients with respiratory failure frequently require support with mechanical ventilation while the underlying cause is identified and treated. The goal of mechanical ventilation is to ensure adequate ventilation, which involves a magnitude of gas exchange that leads to the desired blood level of carbon dioxide, and adequate oxygenation, which involves a blood concentration of oxygen that will ensure organ function. Achieving these goals is complicated by the fact that mechanical ventilation can actually cause acute lung injury, either by inflating the lungs to excessive volumes or by using excessive pressures to inflate the lungs. The challenge to mechanical ventilation is to produce the desired blood levels of carbon dioxide and oxygen without causing further acute lung injury.

With the increasing availability of microchip technology, it has been possible to design partially automated mechanical ventilators with control algorithms for providing volume or pressure control [15]. More sophisticated fully automated model reference adaptive control algorithms for mechanical ventilation have also been recently developed [6, 7]. These algorithms require a reference model for identifying a clinically plausible breathing pattern. However, the respiratory lung models that have been presented in the medical and scientific literature have typically assumed homogenous lung function. For example, in analogy to a simple electrical circuit, the most common model has assumed that the lungs can be viewed as a single-compartment characterized by its compliance (the ratio of compartment volume to pressure) and the resistance to air flow into the compartment [810]. While a few investigators have considered two compartment models, reflecting the fact that there are two lungs (right and left), there has been little interest in more detailed models [1113].

Early work on the optimality of respiratory control mechanisms using simple homogenous lung models dealt with the frequency of breathing. In particular, the authors in [1417] predicted the frequency of breathing by using a minimum work-rate criterion. This work involves a static optimization problem and assumes that the airflow pattern is a fixed sinusoidal function. The authors in [17, 18] developed optimality criteria for the prediction of the respiratory airflow pattern with fixed inspiratory and expiratory phases of a breathing cycle. These results were extended in [19] by considering a two-level hierarchical model for the control of breathing, in which the higher-level criterion determines values for the overall control variables of the optimal airflow pattern derived from the lower-level criteria, and the lower-level criteria determine the airflow pattern with the respiratory parameters chosen by minimizing the higher-level criterion.

Although the problem for identifying optimal respiratory patterns has been addressed in the literature (see [14, 1619] and the references therein), the models on which these respiratory control mechanisms have been identified are predicated on a single compartment lung model with constant respiratory parameters. However, the lungs, especially diseased lungs, are heterogeneous, both functionally and anatomically, and are comprised of many subunits, or compartments, that differ in their capacities for gas exchange. Realistic models should take this heterogeneity into account. In addition, the resistance to gas flow and the compliance of the lung units are not constant but rather vary with lung volume. This is particularly true for compliance. While more sophisticated models entail greater complexity, since the models are readily presented in the context of dynamical systems theory, sophisticated mathematical tools can be applied to their analysis. Compartmental lung models are described by a state vector, whose components are the volumes of the individual compartments.

A key question that arises in the consideration of nonlinear multicompartment models is whether or not experimental data support a complex model. This question can be addressed by considering an analogy to pharmacokinetics. Specifically, the earliest pharmacokinetic models were typically one-compartment models. This reflected the challenges of sampling and drug assay. These models were adequate for quantifying drug disposition on a long time scale. For example, simple one-compartment models were adequate in describing the total clearance or volume of distribution. However, for even open-loop control of drug concentrations, the one compartment model was inadequate. More complex models (two- and three-compartment models) were needed that accounted for distribution as well as elimination processes (see [20] and the references therein).

Similarly, for adaptive control of mechanical ventilation, that is, more advanced controller architectures than simple volume- or pressure-controlled ventilation, more elaborate models are needed, especially when accounting for nonlinear compliance and resistance and lung heterogeneity [6]. In the case of pharmacokinetics, the control algorithm can only be as complex as the data supports. This is also true for control of mechanical ventilation. Flow and pressure patterns in the airway are not simple waveforms, although clinicians to date have modeled them as such. There is considerable information embedded in these waveforms. The purpose of our work in this paper is to provide a mathematically rigorous and general framework developing optimal determination of respiratory airflow patterns using a nonlinear multicompartment model for a lung mechanics system. It is a an easy task to simplify this framework to be congruent with the granularity of the data. The reverse process, however, is not possible without the development of a general framework.

In this paper, we extend the work of [17, 18] to develop optimal respiratory airflow patterns using a nonlinear multicompartment model for a lung mechanics system. (The usage of the word optimal throughout the paper refers to an optimal solution of the calculus of variations problems addressed in the paper and not an optimal breathing pattern in the sense of respiratory physiology.) First, we extend the linear multicompartment lung model given in [6] to address system model nonlinearities. Then, we extend the performance functionals developed in [17, 18] for the inspiratory and expiratory breathing cycles to derive an optimal airflow pattern using classical calculus of variations techniques. In particular, the physiological interpretation of the optimality criteria involves the minimization of work of breathing and lung volume acceleration for the inspiratory breathing phase, and the minimization of the elastic potential energy and rapid airflow rate changes for the expiratory breathing phase. Finally, we numerically integrate the resulting nonlinear two-point boundary value problems to determine the optimal airflow patterns over the inspiratory and expiratory breathing cycles.

The notation used in this paper is fairly standard. Specifically, denotes the set of real column vectors, and , denotes the set of real matrices. For we write (resp., ) to indicate that every component of is nonnegative (resp., positive). In this case, we say that is nonnegative or positive, respectively. Likewise, is nonnegative or positive if every entry of is nonnegative or positive. (In this paper, it is important to distinguish between a square nonnegative (resp., positive) matrix and a nonnegative-definite (resp., positive-definite) matrix.) Furthermore, and denote the nonnegative and positive orthants of , that is, if , then and are equivalent, respectively, to and . Finally, we write to denote transpose, to denote Frèchet derivative, and to denote the first variation of the function .

2. A Nonlinear Multicompartment Modelfor Respiratory Dynamics

In this section, we extend the linear multicompartment lung model of [6] to develop a nonlinear model for the dynamic behavior of a multicompartment respiratory system in response to an arbitrary applied inspiratory pressure. Here, we assume that the bronchial tree has a dichotomy architecture [21]; that is, in every generation each airway unit branches into two airway units of the subsequent generation. In addition, we assume that the lung compliance is a nonlinear function of lung volume.

First, for simplicity of exposition, we consider a single-compartment lung model as shown in Figure 1. In this model, the lungs are represented as a single lung unit with nonlinear compliance connected to a pressure source by an airway unit with resistance (to airflow) of . At time , a driving pressure is applied to the opening of the parent airway, where is generated by the respiratory muscles or a mechanical ventilator. This pressure is applied over the time interval , which is the inspiratory part of the breathing cycle. At time , the applied airway pressure is released and expiration takes place passively, that is, the external pressure is only the atmospheric pressure during the time interval , where is the duration of expiration.

The state equation for inspiration (inflation of lung) is given by where , , is the lung volume, is the resistance to airflow during the inspiration period, is a nonlinear function defining the lung compliance at inspiration, and is the lung volume at the start of the inspiration and serves as the system initial condition. Equation (1) is simply a pressure balance equation where the driving pressure , applied to the compartment is proportional to the volume of the compartment via the compliance and the rate of change of the compartmental volume via the resistance. We assume that expiration is passive due to the elastic stretch of the lung unit. During the expiration process, the state equation is given by where , , is the lung volume, is the resistance to air flow during the expiration period, is a nonlinear function defining the lung compliance at expiration, and is the lung volume at the start of expiration.

Next, we develop the state equations for inspiration and expiration for a -compartment model, where . In this model, the lungs are represented as lung units which are connected to the pressure source by generations of airway units, where each airway is divided into two airways of the subsequent generation leading to compartments (see Figure 2 for a four-compartment model).

Let , denote the lung volume in the th compartment, let , , denote the compliance at inspiration (resp., expiration) of each compartment as a nonlinear function of the volume of th compartment, and let (resp., ), , denote the resistance (to air flow) of the th airway in the th generation during the inspiration (resp., expiration) period with (resp., ) denoting the inspiration (resp., expiration) of the parent (i.e., generation) airway.

As in the single-compartment model, we assume that a pressure of , is generated (by the inspiratory muscles) or applied (by a mechanical ventilator) during inspiration. Now, the state equations for inspiration are given by where , are nonlinear functions of , , given by [22] where , , and , , are model parameters with and , , , are volume ranges wherein the compliance is constant, denotes tidal volume, and where denotes the floor function which gives the largest integer less than or equal to the positive number . Figure 3 shows a typical piecewise linear compliance function for inspiration. A similar compliance representation holds for expiration and is also shown in Figure 3.

To further elucidate the inspiration state equation for a -compartment model, consider the four-compartment model shown in Figure 2 corresponding to a two-generation lung model. Let , denote the compartmental volumes. Now, the pressure due to the compliance in th compartment will be equal to the difference between the driving pressure and the resistance to air flow at every airway in the path leading from the pressure source to the th compartment. In particular, for (see Figure 2),

or, equivalently,

Next, we consider the state equation for the expiration process. As in the single-compartment model, we assume that the expiration process is passive and the external pressure applied is . Following an identical procedure as in the inspiration case, we obtain the state equation for expiration as where, , and , , are model parameters with and , , , are volume ranges wherein the compliance is constant, and is given by (5).

Next, we provide a smooth (i.e., ) characterization of the nonlinear compliance using sigmoidal functions [23]. Specifically, for inspiration, can be approximated as where , , , , with , and is an approximation parameter. Figure 4 shows the smoothed approximation of the piecewise linear compliance function . A similar approximation holds for and is also shown in Figure 4.

Finally, we rewrite the state equations (3) and (8) for inspiration and expiration, respectively, in vector-matrix state space form. Specifically, define the state vector , where denotes the lung volume of the th compartment. Now, the state equations (3) for inspiration can be rewritten as where denotes the one vector of order , is a diagonal matrix function given by where is such that the th element of is 1 for all = , , , and zero elsewhere.

Similarly, the state equation (8) for expiration can be rewritten as where Finally, it follows from [6, Proposition 4.1] that and are positive definite and, hence, and are invertible matrices.

3. Optimal Determination of Inspiratory and Expiratory Airflow in Breathing

In this section, we use the respiratory dynamical system characterized by (11) and (14) to develop an optimal model for predicting airflow patterns in breathing. The optimization criteria used allows for the minimization of oxygen expenditure of the respiratory muscles as well as rapid changes in the lung volume flow rate. The oxygen consumption of the lung muscles is mainly due to the work carried out by the respiratory muscles to overcome the resistive forces and stretch the lung and chest wall. In [24], this work is defined as , where is the pressure driving inflation and is the lung unit volume. The efficiency of gas exchange in the lungs is related to the volume acceleration, since rapid changes in lung volume can cause discomfort and inefficacy of muscular contraction and control. Moreover, high-volume acceleration can result in overexpansion of the lung resulting in lung tissue rupture as well as excessive work of breathing with subsequent ventilatory muscle fatigue.

In the ensuing discussion, we assume that the inspiration process starts from a given initial state and is followed by the expiration process where its initial state will be the final state of the inspiration. An inspiration followed by an expiration is called a single breathing cycle. Furthermore, we assume that each breathing cycle is followed by another breathing cycle where the initial condition for the latter breathing cycle is the final state of the former breathing cycle. Since the respiratory process is periodic, we need only focus on one breathing cycle.

The next result gives the optimal solution , for the inspiratory airflow breathing pattern using classical calculus of variations techniques.

Theorem 1. Consider the nonlinear system model for inspiration given by (11). Let the optimal air volume , be given by the solution to the minimization problem subject to the natural boundary conditions where is the end expiratory volume and is the tidal volume. If , then , is given by and if , then where , , , and are constant vectors determined by the boundary conditions (18) and (19), and denotes the (unique) positive-definite square root of .

Proof. First, note that , in (17) can be eliminated using the state equation (11). Thus, the integrand of the performance criterion (17) can be written as The first variation of the performance criterion is given by Using the boundary conditions (18) and (19), it follows that . Now, since is fixed, it follows from the fundamental theorem of the calculus of variations that the variation of must vanish on ; that is, the extremals optimizing the performance criterion satisfy the Euler-Lagrange equation
Next, using given by (12), where and . Thus, (24) yields the fourth-order differential equation where , with boundary conditions given in (18) and (19). Now, using standard analysis techniques, the solution , to (26) satisfies (20) if and (21) if .

Remark 2. The vectors , , , and d4 in Theorem 1 can be uniquely determined using the four boundary conditions given by (18) and (19). Specifically, if , it can be shown that , , , and . Hence, in this case, = = , , which implies that the solution , to (26) is increasing during inspiration, and hence, , where and are the th components of , and , respectively. A similar result holds for the case where .
Next, we give the optimal solution , for the expiratory airflow breathing pattern.

Theorem 3. Consider the nonlinear system model for expiration given by (14). Let the optimal solution , be given by the solution to the minimization problem subject to the natural boundary conditions If , then , satisfies where and , and if , then where , , , and are constant vectors determined by the four boundary conditions (28) and (29).

Proof. Using (14), the integrand of the performance criterion (27) can be written as Thus, the variation of on an extremal solution gives Using the boundary conditions (28) and (29), it follows that . Hence, the extremals optimizing the performance criterion satisfy the Euler-Lagrange equation
Now, using given by (15), which yields (30). Finally, in the case where , (30) collapses to , which satisfies (31).

Remark 4. In the case where , the vectors , , , and in Theorem 3 can be uniquely determined using the four boundary conditions (28) and (29). In particular, = , = , = , and , where . Hence, , , which implies that the solution , is decreasing during expiration, and hence, , . The case where involves the solution to (30), and hence, we have been unable to show that , is decreasing during expiration analytically. However, this has been verified numerically.

Remark 5. If optimal solutions to Theorems 1 and 3 exist, then the optimal respiratory airflow patterns and their corresponding driving pressures can be computed using the lung mechanics model developed in Section 2. The input signal to this model can then be used as the driving pressure of a mechanical ventilator needed to achieve the optimal respiratory airflow pattern.
The physiological interpretations of the performance criteria for inspiration and expiration used in Theorems 1 and 3 are slightly different. In particular, the inspiratory criterion involves a weighted sum of squares of the lung volume acceleration and the mechanical work performed by the inspiratory muscles. Alternatively, during the expiratory phase, the respiratory muscles remain active in the beginning of expiration since they continue their action by opposing expiration and hence consume oxygen thereby performing negative work. Thus, mechanical work alone is not a satisfactory criterion for describing control of breathing at rest. As in [25], we assume that oxygen consumption of expiration correlates with the integral square of the driving pressure. This assumption is supported in [26] which shows that an index of average respiratory pressure can predict the total oxygen cost of breathing. Hence, instead of mechanical work, we use the integral square of the applied pressure in the expiratory criterion , which corresponds to minimizing the mean standard potential energy in the lung.
It can be seen that the optimal solutions , depend on the variables , , , and through the boundary conditions. Moreover, the nonlinearities in (30) are due to nonlinearities in the lung compliance , which make analytical solutions to (30) difficult to obtain. It is interesting to note that although the optimal solutions , to (30) during the expiration phase depend on the nonlinear compliance of , the optimal solutions , to (26) during the inspiration phase are independent of the nonlinear system compliance . In the case where (i.e., a single-lung-compartment model), , , and are constants, (30) reduces to This case is extensively discussed in [25] wherein the authors characterize four different solutions to (36) corresponding to , , , and .

4. Numerical Determination of Optimal Volume Trajectories

The optimal volume trajectories formulated in Section 3 result in two-point nonlinear boundary-value problems. Numerical methods for solving such problems include shooting methods [27] and steepest descent methods [28]. In this section, we use the collocation method implemented by bvp4c in [29] to numerically integrate the differential equations (26) and (30) to obtain the optimal volume trajectory .

For our simulations, we first consider a two-compartment lung model and use the values for the lung compliance found in [22]. In particular, we set /cm , , /cm , /cm , , , , /cm , , /cm , /cm , , , , and . Here, we assume that the bronchial tree has a dichotomy structure (see Section 2). The airway resistance varies with the branch generation, and typical values can be found in [30]. Furthermore, the expiratory resistance will be higher than the inspiratory resistance by a factor 2 to 3. Here, we assume that the factor is 2.5.

For our simulation, we assume that the inspiration time sec and the expiration time sec. The two weighting parameters and differ from person to person. Nominal values for the weighting parameters are and , which correspond to spontaneous breathing at rest [25]. Figure 5 shows the optimal air volume , and the optimal airflow rate , given by the two-point nonlinear boundary-value problems (24) and (34). Note that the airflow curve for inspiration is symmetric, since the nonlinearities in do not appear in (26). However, , obtained using (30) during expiration involves , and hence, the airflow curve is asymmetric.

Figure 6 shows the sensitivity of the optimal volume and airflow rate patterns to changes in the parameters and . As can be seen from the figure, the inspiratory airflow rate is symmetric and the maximum value of the airflow rate decreases as a function of increasing . Furthermore, the asymmetric pattern of the expiratory airflow rate reflects the fact that the minimum value becomes steeper with increasing . Specifically, if we set the weighting parameter , it follows from (30) that the airflow curve for the expiration is given by a parabolic arc. The airflow patterns in Figure 6 exhibit typical respiratory characteristics observed in spontaneous breathing, that is, the inspiratory airflow rate curve is relatively flat and the expiratory airflow rate waveform is asymmetric with an initial trough, and quite similar to “real” airflow signals [31].

Figure 7 shows the driving pressure generated by the respiratory muscles using the optimal air volume . Figure 8 compares the optimal air volume trajectory , with a nonoptimal air volume trajectory , generated by the linear pressure cm , , and cm , , [6]. Note that , switches between the end expiratory level and the tidal volume . Figure 9 shows the phase portrait of the optimal trajectories and and suboptimal trajectories and . Note that both sets of trajectories asymptotically converge to a limit cycle, with the optimal solutions satisfying the boundary conditions given in (18), (19), (28), and (29). Figure 10 compares the value of the total performance criterion generated by the optimal air volume with the value of the total performance criterion generated by the nonoptimal air volume.

Finally, Figure 11 shows the optimal air volume trajectories for a four-compartment model with each air volume trajectory satisfying the boundary conditions given in (18), (19), (28), and (29). For this simulation, the compliance parameters are taken to be identical to those used for the two-compartment model with , and the values for airway resistances are generated using the results of [30].

5. Conclusion and Directions for Future Work

In this paper, we developed an optimal respiratory air flow pattern using a nonlinear multicompartment model for a lung mechanics system. The determination of the optimal air volume trajectories is derived using classical calculus of variations techniques and involves optimization criteria that account for oxygen expenditure of the respiratory lung muscles, lung volume acceleration, and elastic potential energy of the lung. Future work will include the development of multivariable and adaptive control algorithms that will utilize these models within a model reference control architecture for fully automating mechanical ventilation to ensure adequate ventilation and oxygenation for critical care patients in intensive care units.

Since sedation in intensive care units is often administered to prevent the patient from fighting the ventilator, it seems plausible to use respiratory parameters as a performance variable for closed-loop control. Calculation of patient work of breathing requires measurement of a patient-generated pressure/volume loop or work of breathing. Since work of breathing can be measured using a commercially available esophageal balloon [32], work of breathing can serve as a performance variable for closed-loop control of sedation. Furthermore, patient-ventilator dyssynchrony can be identified by analysis of pressure/flow wave forms [33].

Closed-loop control algorithms can use either work of breathing as measured by an esophageal balloon or patient respiratory rate as a performance variable for closed-loop control of sedation. The need for optimal control algorithms is necessary for achieving a target performance value while satisfying certain constraints. For example, we could seek to design a control algorithm that seeks to minimize the patient respiratory rate (above the set ventilator rate) but which does not result in hypotension. This requires the development of a constrained optimal control framework that seeks to minimize a given performance measure (e.g., patient respiratory rate) within a class of fixed-architecture controllers satisfying internal controller constraints (e.g., controller order, control signal nonnegativity, etc.) as well as system constraints (e.g., blood pressure, system state nonnegativity, etc.). The results in the present paper can serve as a starting point for developing multivariable controllers for mechanical ventilation of critically ill patients.

Acknowledgments

This research was supported in part by the US Army Medical Research and Material Command under Grant 08108002 and the QNRF under NPRP Grant 4-187-2-060.