You are on page 1of 10

Journal of Medical and Biological Engineering, 32(1): 51-60 51

Modeling and Simulation of Respiratory Control with


LabVIEW
Shyan-Lung Lin1,* Nai-Ren Guo2 Chuang-Chien Chiu3
1
Department of Automatic Control Engineering, Feng Chia University, Taichung 407, Taiwan, ROC
2
Department of Electrical Engineering, Far East University, Tainan 744, Taiwan, ROC
3
Department of Automatic Control Engineering, Feng Chia University, Taichung 407, Taiwan, ROC

Received 15 Aug 2010; Accepted 22 Dec 2010; doi: 10.5405/jmbe.829

Abstract
A modeling and simulation process based on the optimal chemical-mechanical respiratory control model, which
has been verified in earlier studies, is implemented on the LabVIEW platform. By utilizing the graphical programming
language of LabVIEW, real-time simulation and signal monitoring of respiratory control with multilayer functional
modules are realized. The fundamental hypothesis of the control model is that a total cost function can be formulated
and optimized to reflect the balance of a combined challenge due to the chemical and mechanical cost of breathing.
Based on the optimal model, the respiratory control simulator is developed as a minimization problem with respect to
the parameters of a neuromuscular pressure profile. The simulator provides monitoring windows to observe the optimal
respiratory waveforms of instantaneous pressure, airflow, and lung volume. Through the use of a virtual instrument, the
optimized breathing pattern, including breathing frequency, tidal volume, arterial CO2 pressure, alveolar minute
ventilation, initial lung volume, and partial pressure of arterial O2, can be monitored. Simulations of respiratory control
are performed under resting conditions, CO2 inhalation, muscular exercise, hypercapnia exercise, and various
mechanical loadings. Model behavior is predicted, examined, and compared with experimental data. The development
of the simulator is valuable for research of respiratory control and beneficial in biomedical engineering education of
respiratory physiology.

Keywords: Simulator, LabVIEW, Signal monitoring, Respiratory waveform, Breathing pattern

shapes under hypercapnic/isocapnic response or loading-


1. Introduction assistance of respiratory mechanics due to its limited number of
parameters.
The respiratory control system is recognized to be highly For respiratory control models [7-11], possible optimality
nonlinear, dynamic, and constantly perturbed by physiologic principle was used in the modeling of respiratory control
and pathologic disturbances [1]. In the past, experiments and [12,13]. The optimal chemical-mechanical control model,
simulations [2-4] of respiratory control were conducted mostly which can predict the ventilatory responses to chemical stimuli
on an off-line basis due to a lack of software tools. To resolve as well as muscular exercise, was proposed and simulated by
this, a simulation tool was implemented in MATLAB [5] under Poon and Lin [2,3,12]. They suggested that it is possible to
the optimal chemical-mechanical respiratory control model. A minimize a combined controller cost that consists of the total
virtual laboratory, RespiLab [6], based on the compilation of chemical challenges and mechanical work that can be
several models described in the literature was designed for the simulated through a neuro-mechanical effector in the form of
analysis and study of the human respiratory system. The an electrical RC model. The basic hypothesis is that all
application was also built using MATLAB/Simulink and Easy respiratory responses, including breathing pattern and
Java Simulations (EJS). Although the virtual laboratory was ventilation, are direct consequences of the optimization of an
designed to understand the operation of the respiratory system instantaneous respiratory neural output. Thus, rather than
under normal conditions and pathological situations, and to assume a hierarchy of control mechanisms for the various
predict respiratory variables at various levels of ventilator levels of the control outputs, the model proposes and verifies
stimuli and conditions, it cannot predict the instantaneous wave the profile of the neuromuscular drive, which relates the
neuro-respiratory output to the resultant mechanical airflow. It
* Corresponding author: Shyan-Lung Lin is assumed that the object of the control is to minimize the
Tel: +886-4-24517308; Fax: +886-4-24517308 overall objective function that reflects the balance of the
E-mail: sllin@fcu.edu.tw
chemical and mechanical cost of breathing. In earlier works
52 J. Med. Biol. Eng., Vol. 32 No. 1 2012

[2,3,5,12], simulation results demonstrated that many mole/l). However, because normoxia and normal acid-base
well-known steady-state in vivo responses in ventilation, conditions are assumed here, only the effects on PaCO2 are
breathing pattern, and wave shapes can be simultaneously considered. The gas exchanger equation describes the
predicted by the model. dependence of the arterial blood gas tension on the total
In the present study, a simulation strategy based on the ventilation and other disturbances:
mathematical modeling of optimal respiratory control is 
863 V
implemented on the LabVIEW platform. The graphical PaCO2  PICO2  CO 2
(1)
 (1 VD )
V E VT
programming language of NI LabVIEW was employed for
control and signal monitoring. With the implemented where PaCO2 is assumed to be identical to the mean alveolar
human-machine interface for the respiratory control simulator, PCO2. Equation (1) describes the steady-state effect of
the normal ventilatory responses to hypoxia and acidosis, ventilation on PaCO2 subject to any disturbances in the inhaled
mechanical loading, as well as breathing pattern responses to and metabolic production of CO2. To account for the changes
chemical and exercise stimulation can be conveniently in anatomic dead space with an airway caliber, the empirical
predicted [12]. Subject to any change in ventilatory stimuli or relation suggested by Gray et al. [14] is employed:
breathing mechanics, the wave shapes of instantaneous profiles
VT
can be observed. The model behavior is compared to VD  0.037  VC(1 ) (2)
8
experimental data and results from previous studies for
validation. where VC is the vital capacity (l) and VT is the tidal volume (l).

2.2 Chemoreceptors
2. Methods: mathematical modeling
As shown in Fig. 1, the feedback loop of the control model
The mathematical modeling of the optimal chemical- consists of two chemosensory structures, known as the central
mechanical respiratory control model is illustrated in the block and peripheral chemoreceptors, respectively. The total
diagram of Fig. 1, where the controller is driven by both chemical stimulation level of the controller (IO, impulses/s), the
chemical and neuro-mechanical feedback signals. This is sum of the central (IC, impulses/s) and peripheral
demonstrated by the coupling of chemical cost JC and chemoreceptor stimulus (IP, impulses/s), is assumed to be a
mechanical cost JM, which are represented by the quadratic linear function of PaCO2 [15]:
coupler of the chemical feedback signal and the logarithm IO  IC  IP    (PaCO2  ) (3)
coupler of the work rate, respectively. The fundamental
hypothesis of the model is that a total cost function can be where  is the sensitivity of the chemoreceptors and  is the
formulated to reflect the balance of a combined challenge due threshold of the chemoreceptor (impulses/s), which is set
to the chemical and mechanical cost of breathing [12]. empirically. In addition to the chemical feedback, the optimal
Respiratory control is modeled as a closed-loop feedback controller also assumes that certain mechanical feedback
system comprising four major functional blocks: the plant, the signals may also influence the control of ventilation. Although
feedback path, the controller, and the effector. The the mechanical feedback signals may be mediated by various
mathematical descriptions of the four functional blocks are mechanoreceptors in the respiratory system or by corollary
detailed in previous studies [2,3] and are outlined briefly discharge from respiratory motoneurons, a fundamental
below. assumption in the model is that they may also influence the
control of ventilation by way of an optimal controller that
Logarithmic Work Rate integrates the chemical and mechanical feedbacks. However,
Coupler Index
the effects are implicit in the optimization criterion, which
Optimal Neuro-Mechanical Gas
includes a mechanical component.
Σ Controller Effector Exchanger
2.3 Neuro-mechanical effector
Quadratic
Coupler
Chemoreceptors
From the viewpoint of physiology, it is well known that
the instantaneous airflow is controlled by the neural impulses
Figure 1. Mathematical model of the optimal chemical-mechanical
from the respiratory center (controller). The neuro-mechanical
respiratory control.
effector, which relates the neural respiratory output to the
2.1 Gas exchanger resultant mechanical airflow, is required to optimize the neural
input to the respiratory muscles for the optimization of the
The role of the plant can be taken by the lung, where gas ventilatory airflow ( V ˙ (t), l/min). Such effector can be described
exchange occurs, in the human respiratory system. The plant by the electrical RC model of Fig. 2 based on a
describes the events of the pulmonary exchange subject to the lumped-parameter model proposed by Younes and Riddle
control signal V  (total ventilation in one minute, l/min),
E
[16,17] for the relation between respiratory neural and
disturbances in the inhaled and metabolic CO2 and O2 mechanical outputs. In this model, the equation of motion is
(PICO2/PIO2, Torr, V CO2 /V O2 , l/min), and lactic acidosis. The given by the following dynamic equation:
system's outputs are the pressures of arterial CO2 and O2 ˙ (t) R  V(t) E
P(t)  V (4)
(PaCO2/PaO2 , Torr), and [H+]a (arterial H-ion concentration, rs rs
Simulation of Respiratory Control 53

assumed to be an explicit function of the respiratory neural


drive and can be parameterized by the mechanical constraints
of the respiratory system.

2.5 Work rate index

The optimization equation of Eqs. (7)~(9) requires an


explicit description of respiratory power. Several mechanical
indexes have been previously developed for respiratory
Figure 2. RC model of neuro-mechanical effector.
optimization. In the proposed simulator, the mechanical work
rates of inspiration and expiration are evaluated to predict the
The parameters Rrs (cm-H2Ol-1s) and Ers
inspiratory wave shape and ventilatory responses to various
( = 1/Crs, cm-H2O/l) represent the total flow-resistive and
types of system input.
volume-elastic components, respectively. These include the
˙ W
W ˙ W ˙ (10)
passive resistance and elastance of the lung, chest wall, and I E

airways. The isometric pressure wave shape (P(t), cm-H2O) is ˙ (t)


˙ 1 
P(t) V
Ti
W dt
modeled into an inspiratory and expiratory phase in the model I
T o 1  n2
n

(Fig. 3). The inspiratory pressure is approximated by a  P(t) (11)


  1
quadratic function and the expiratory pressure is represented by  1 Pmax
 ˙
an exponential discharge function of the form:   1 P(t)


2 ˙
Pmax
P(t)  a0  a1t  a2t 2 0  t  t1 (5)

˙ 1 
T
tt1 W ˙ (t) dt
P(t) V
 E (12)
P(t)  P(t1 ) e 
t1  t  t1 +t2 (6) T Ti

In Eq. (10), the total mechanical index is assumed to be a


where the parameters a0 and a1 in Eq. (5) represent the net
weighted sum of the inspiratory and expiratory indexes with a
driving pressure and its rate of rise at the onset of the neural
weighting parameter , and W,  W , and W  represent the total
inspiratory phase, and the parameter a2 describes the shape of I E
respiratory, inspiratory, and expiratory work rates (kgm/s),
the wave; t1 (s) and t2 (s) represent the neural inspiratory and
respectively. The efficiency factors 1 and 2 of Eq. (11)
expiratory durations, respectively. In Eq. (6), P(t1) is the peak
account for the effects of the respiratory-mechanical limitation
inspiratory pressure (cm-H2O) at the end of inspiration (t1), and
and the decrease in neuromechanical efficiency with increasing
 denotes the rate of decline of inspiratory activity.
effort. The overall efficiency depends on two factors: the
2.4 Optimal controller maximum isometric pressure (Pmax, cm-H2O) and the maximum
rate of rise of the isometric pressure ( P max , cm-H2O-s-1). The
The respiratory controller, which is located in the medulla respiratory period of a breathing cycle (T = t1+t2, s) accounts
oblongata of the brain, is not only a major integrating station for the inspiratory (t1) and expiratory (t2) durations of neural
for neural activities coming from the chemical and mechanical activity, and the parameter TI describes the mechanical
feedback paths, but also generates intermittent discharges. In inspiratory duration where the airflow flows into the lung for
Fig. 1, the control model employed for proposed simulator inspiratory work of breathing.
includes two distinct controllers, namely the optimal controller
and the neural network controller, which can be operated 2.6 Mathematical derivation and optimization
independently subject to simulation need.
With the mathematical description of Eqs. (4)~(6) over a
Poon et al. [12] verified that an optimal controller might
complete respiratory cycle, T = t1+t2, the analytical solution for
balance the metabolic needs and the energetic needs of the
the time profile of the lung volume (V(t), l) over the functional
body; the resulting compromise determines the ventilatory
residual capacity (FRC, l) and airflow ( V(t) , l/s) within a
response. The fundamental hypothesis of the optimal controller
breath can be obtained.
is that a total cost function (J) can be formulated to reflect the
0  t  t1 :
balance of a combined challenge due to the chemical (JC) and
 rs  2   t  t
mechanical (JM) cost of breathing. 
V(t)  A1t  A2 t  A 3   V0  e  rs
1 e  rs 
  (13)
J  JC  JM (7) R rs 
  

J C   2 (PaCO2 )2 (8)  t  t
   rs  2A t  A  A 3  e rs   V0  e rs
 
V(t) (14)
R rs   
1 2

J M  ln W (9)  rs  rs
The optimal control output is determined by the minimum t1  t  t1+ t2 :
of J, which consists of the square law for chemical feedback
P(t1 )   1  rs 
t-t1 t-t
and the logarithmic law for mechanical feedback, conforming t-t  1
V(t)   e  e   V(t1 ) e  rs (15)
to Steven's law and the Weber-Fechner law of sensory R rs  ( 1rs - 1 )  

reception, respectively. The respiratory work rate W  , is
54 J. Med. Biol. Eng., Vol. 32 No. 1 2012

The implementation of the respiratory control simulator


P(t1 )  1   rs 1  1  V(t1 )  rs
t-t1 t-t t-t1
 
V(t)   e   e   e (16) becomes an optimization problem of minimizing Eq. (27) with
R rs  ( 1rs - 1 )  rs  
 rs
respect to the parameters of the pressure profile of Fig. 3.
 A1  a2

 A2  a1  2a2  rs (17)

 A3  a0  a1  rs  2a2  rs2
  rs  Rrs  Crs

V0  V(0)  V(t1  t2 ) (18)


By taking Eq. (18) as the boundary condition for the lung
volume (V(t)) that must be satisfied in the ideal steady state on
a breath-to-breath basis, the initial volume (V0, l) can be
derived by substituting t = 0 into Eq. (13) and t = t1+ t2 into
Eq. (15):
   t2  t2  
 P(t1 ) e   e rs  
     t1 
 
t2
1    rs  2 
V0  t1 +t 2   A1t  A 2 t  A 3 1 e  rs   e rs  (19)
 R rs  ( rs -  ) R rs  
1 1

 rs  
1 e  
 
Figure 3. Isometric pressure wave shape over a complete respiratory
Based on the optimized pressure profile, the lung volume cycle.
and airflow wave shape can then be derived by applying Eqs.
(13)~(16). For any given respiratory resistance and elastance, 3. Results: Human-Machine Interface of the
the breathing pattern, including tidal volume (VT, l), breathing Simulator
frequency (f, BPM), total (minute) ventilation (VE, l/min), and
 , l/min) can be respectively obtained
alveolar ventilation ( V The simulation process, as shown in Fig. 4, is
A
as: implemented on the LabVIEW platform by calling the
   1  
t
 2 
t optimization subprograms from the IMSL subroutine. The
1  rs  2
VT  V(t1 )  V0  t +t
 A1t  A 2 t  A 3 1 e  rs   1 e  rs  (20) human-machine interface of the simulator is constructed with a
1 2
 rs
R rs     
1 e multilayer structure from the main panel for modular design
and expandability. The main panel of the human respiratory
1 1
f  (21) control, as shown in Fig. 5 (left), includes eight modules:
T t1  t 2
1. Input-Parameters
˙ V f
V (22) 2. Controller-Optimization
E T
3. Controller-Neural Network
 
 1 VD 
 V
V (23) 4. Signal Monitoring-Current Simulation Panel
A E
 VT  5. Signal Monitoring-Previous Saved Simulation
6. Signal Monitoring-Comparisons
By substituting the derivations of Eqs. (13)~(19) into Eqs.
7. Output Listings
(10)~(12), the mechanical cost function can be expressed as an
8. Exit
explicit function of the isometric pressure profile. The chemical
From the MAIN panel of Fig. 5, the simulation process of
cost can be expressed as an explicit function of the ventilatory
Fig. 4 can be initiated through the INPUT panel to setup the
pattern with the use of Eqs. (1)~(3) and Eqs. (20)~(23).  (metabolic rate of CO ),
respiratory parameters, including V CO2 2
J  JC  JM (24) PICO2 (inhaled CO2 partial pressure), Rin (inspiratory airway
J C   2  (PaCO2  )2 resistance), Rex (expiratory airway resistance), Ers (lung
(25) elastance of breathing mechanics), and external dead space.
 )
 J C (VT , f: PICO2 , VCO 2
Once the respiratory parameters have been saved, the user can
 proceed to the MAIN panel for simulation.
J M  ln W (26) The user has to select the controller from two alternatives,
 J M (a0 , a1 , a2 , , t1 , t2 )
OPTIMIZATION for employing the optimal control model to
Since Eq. (20) and Eq. (21) show that VT and f are optimize the respiratory waveforms and breathing pattern, or
completely determined by the pressure profile, the pressure P(t) NEURAL NETWORK for utilizing both a back-propagation
may be regarded as the primary control variable that determines neural network and a forward model to obtain simulation
both the chemical and mechanical costs of breathing. Hence, results without going through the time-consuming process of
the total cost can be expressed as: optimization. If OPTIMIZATION of the main panel is chosen,
J  J(a0 , a1, a2 , , t1, t2 : PICO , V CO ) 2
(27)
2
the user is requested to setup the initial parameters for
optimization. The optimization proceeds until the numerical
Simulation of Respiratory Control 55

calculation is completed and the optimum is reached. The proceeds based on the predetermined weightings of the neural
optimized variables, a0, a1, a2, t1, t2, and , are displayed in the network.
middle of the window when “Display Optimized Results” is The simulation results can be observed through the
clicked. The obtained optimized parameters can then be applied SIGNAL MONITORING OF CURRENT SIMULATION
to compose the isometric pressure profile. The resultant panel. Three respiratory waveforms, including neuromuscular
instantaneous waveforms of airflow and lung volume can also  , and lung volume V(t), and
driving pressure P(t), airflow V(t)
be derived based on Eqs. (13)~(16). respiratory pattern, including f, PaCO2, VT, PaO2, V CO , V O , VO,
2 2

TI, TE, and TI/T, are shown and monitored in real-time through
the use of virtual instruments of LabVIEW. Based on the
derived pattern, some well-known ventilation responses can be
composed for further analysis with the experimental data.

Figure 6. Window of comparisons panel in the human respiratory


control simulator.

It is useful to perform comparisons between two distinct


simulations. In this case, the signal variations of instantaneous
profiles and percentage changes of respiratory patterns are
located in the COMPARISONS panel of Fig. 6. Comparisons
Figure 4. Simulation process of the human respiratory control simulator.
can be performed by restoring two previously saved
simulations, or by comparing the current simulation with rest
condition. The rest condition is defined to have a respiratory
environment of V CO  0.2 (l/min) and PICO2 = 0%, with the
2

respiratory resistance and elastance remaining under normal


load (Rrs = 3.02 cm-H2Ol-1s and Ers = 21.9 cm-H2O/l). In
Fig. 6, the “Compare Current Simulation with Rest” function
enables the profiles and breathing pattern to be compared with
those of the rest condition. The bar chart comparison window
in the upper right of Fig. 6 illustrates the percentage changes in
the overall breathing pattern of the current simulation relative
to the control data (rest). The optimized signal profiles and
breathing pattern variables of each simulation can be saved to a
designated file in numerical format using OUTPUT
LISTINGS. The “Compare any Two Previous Simulations”
function in Fig. 6 can be performed to restore two previously
Figure 5. Main panel in the human respiratory control simulator.
saved simulation files. The second selected file is automatically
The NEURAL NETWORK controller for the human designated as the control data for further comparisons.
respiratory system is implemented and simulated based on the The function of OUTPUT LISTINGS in MAIN prepares
hypothesized optimal chemical-mechanical model. The tabulated data of simulation parameters and results, including
adaptive neural controller scheme, consisting of both a the predestinated breathing environment, controller
back-propagation neural network and a forward model, is information, breathing pattern, and numerical information of
proposed to overcome the nonlinearity of the system and signal profiles. The results of the current simulation can be
optimization process that might be encountered under certain listed and compared with data from an arbitrary file.
circumstances of the optimization process. The simulation In comparison with an earlier simulator of Matlab version,
LabVIEW appears more convenient and effective for
56 J. Med. Biol. Eng., Vol. 32 No. 1 2012

developing human-machine interface. The expandable Plug-ins further inspect the exercise response to varying degrees of
and GUI interface also enable the simulator to be implemented hypercapnia and eucapnia (PaCO2 = 40 Torr and higher,
on web-base manner. When the signal acquisition and respectively) [12-19].
processing become major concern as the simulator develops The simulation of CO2 inhalation can be performed with
into a controller for mechanical ventilation device, less effort is various levels of CO2 concentration. In the resting state, PICO2 is
needed with embedded systems. However, compatibility set to be 0%. The inhaled gas can be regulated to a higher
problems have also been encountered as to integrate various concentration of CO2 (e.g., PICO2 = 3%, 5%, or 7%).
software tools into a newly released version of LabVIEW.

4. Discussion

The Human Respiratory Control Simulator is constructed


on a hierarchical basis with virtual instruments under the
LabVIEW environment. Figure 4 summarizes the operation
methodology described in the previous section.
By using the simulator with specified breathing
environment and parameters, the respiratory pattern variables
can be derived from the optimized driving pressure, airflow,
and lung profiles. In the CURRENT SIMULATION panel and
PREVIOUS SAVED SIMULATION panel, various respiratory
pattern variables, including breathing frequency (F), partial
pressure of arterial CO2/O2, (PaCO2/PaO2), tidal volume (VT),
total/arterial ventilation ( V E V A ), initial lung volume (V0), and
duty cycle (Ti/T), are monitored through the virtual instruments
of LabVIEW. To compare the predicted effects of mechanical
loadings on breathing pattern with experimental data are
helpful to further examine the model behavior.

4.1 Simulations of Muscular Exercise and CO2 Inhalation

The INPUT is used to setup the respiratory parameters,


including the chemical stimuli of respiration and mechanics of
breathing. The hypercapnia and isocapnia responses can be
simulated by respectively increasing PICO2 and V˙ CO 2 to higher
levels from rest condition, where PICO2 = 0% and V CO  0.2 2

(l/min). The system response to moderate muscular exercise  ,


Figure 7. Instantaneous driving pressure (P(t), top), airflow rate ( V(t)
can be achieved by varying V˙ CO 2 in the range of 0.2~2.0 l/min. middle), and lung volume (V(t), bottom) over a complete
breathing cycle at various levels of exercise CO2 output (left)
To examine the significance of the model under study, one can
and inhaled CO2 (right).
Table 1. Experimental data for spirometric and driving pressure variables under resistive and elastic loaded breathing.
VT TI TE TI/T F ˙
V A A0.5
E Ref.
l sec sec %T bpm l/min cmH2O %A
Control 0.66  0.05 1.69  0.12 2.75  0.27 0.38* 14.1  1.3 8.97  0.44 12.28  0.99
IRA 0.67  0.04 1.48  0.07 2.77  0.26 0.35* 14.6  1.3 9.57  0.42 10.98  0.93 [20]
%change 1.52* -12.43* 0.73* -8.51* 3.55* 6.69* -10.59*
Control 0.78  0.21 1.7  0.6 3.0  1.1 0.36* 14.5  4.0 10.2  1.8
L6 CRL 0.82  0.25 2.0  0.7 3.0  1.2 0.40* 13.8  3.7 10.2  2.3 [27]
%change 5.13* 17.65* 0.00* 10.59* -4.83* 0.00*
Control 0.71  0.19 2.06  1.02 3.35  1.34 0.38* 12.24  3.04 8.10  1.05 12.17  5.31 63.0  12.4
IRL 0.77  0.18 2.93  0.97 3.55  1.37 0.45* 10.15  2.98 7.31  0.96 15.00  3.12 80.4  14.0 [23]
%change 8.45* 42.23* 5.97* 18.75* -17.08* -9.75* 23.25* 27.62*
Control 0.597  0.09 1.78  0.60 3.26  0.66 0.35* 12.40  2.6 7.26  0.87 11.20  2.0 49.5  6.4
ERL 6.77  0.87 [22]
%change 12.8  8.2 12.2  6.9 25.0  10.1 -14.0 -6.75  2.88 16.60  10.2
Control 0.79  0.14 15.00  1.3 11.70  1.6
CEL 0.70  0.17 17.70  1.6 12.30  1.9 [28]
%change -11.39* 18.00* 5.13*
˙ , minute ventilation; A, amplitude
VT, tidal volume; TI and TE, duration of mechanical inspiration and expiration, respectively; TI/T, duty cycle; F, respiratory frequency; V
E
of driving pressure at end inspiration; A0.5, amplitude of driving pressure at 50% TI.
* Data was not directly available in reference, but mean value can be derived based on related parameters.
Simulation of Respiratory Control 57

The resultant waveforms can further be simulated and Table 2. Simulation results under resistive and elastic loaded breathing.
monitored at varying levels of CO2 inhalation and exercise. VT TI TE TI/T F ˙
V E
A A0.5
Figure 7 shows three instantaneous waveforms, pressure P(t), l sec sec %T bpm l/min cmH2O %A
airflow rate V(t)  , and volume V(t), from top to bottom,
Control 0.60 0.035 0.043 0.46 12.76 7.60 14.38 54.74
respectively, at various levels of exercise CO2 output IRL 0.66 0.046 0.047 0.51 10.78 7.12 15.91 68.73
( V˙ CO = 0.2, 0.6, 1.0) and inhale4d CO2 (PICO2 = 2, 3, 5, 7%). %change 10.95 30.79 8.14 11.43 -15.54 -6.30 10.65 25.56
2
ERL 0.70 0.046 0.058 0.45 9.671 6.81 16.72 58.14
The hypercapnic ventilatory response to CO2 inhalation %change 18.16 29.66 33.95 -2.13 -24.23 -10.47 16.27 6.20
and isocapnic response during exercise can be fulfilled with the CEL 0.58 0.043 0.032 0.58 13.47 7.77 19.67 51.02
data stored through the output listings panel of the simulator. %change -3.19 20.62 -26.74 26.12 5.60 2.23 36.79 -6.80
VT, tidal volume; TI and TE, duration of mechanical inspiration and expiration,
Figure 8 shows four well-recognized ventilatory responses ˙ , minute ventilation; A,
respectively; TI/T, duty cycle; F, respiratory frequency; VE
based on the simulation results from the simulator with amplitude of driving pressure at end inspiration; A0.5, amplitude of driving
increased CO2 and exercise input. The relationships of V ˙ V pressure at 50% TI.
E T
(lower left of Fig. 8) are approximately linear with slightly
˙  T T (lower right of (1) Inspiratory Resistive Assistance (IRA): Respiratory-
different slopes. The relationships of V E i
mechanical factors [20] have been postulated to provide a
Fig. 8) which predict an increase in the duty cycle with
further source of control for ventilatory response to
ventilation are inconsistent with experimental data, where the
moderate exercise. Experimental studies on the influence of
duty cycle is often quite variable and tends to vary between 0.4
inspiratory assistance on respiratory control have been
and 0.6 over a similar range of ventilation levels [12,14,18,19].
conducted [20,21]. To examine the role of the normal
inspiratory resistive load in the regulation of respiratory
motor output in resting conscious humans, six healthy men
ranging from 20 to 31 years of age were studied in [20].
The inspiratory resistive assistance with a magnitude of
R = -3 cm-H2Ol-1s was performed through an
experimental device to make the mouth pressure
proportional to inspiratory flow. The simulation of IRA can
be performed by decreasing Rin of the respiratory
parameters from no load (NL), which was set to be
3.02 cm-H2Ol-1s [22].
(2) Inspiratory Resistive Loading (IRL): Although there are
numerous experimental reports on respiratory responses to
mechanical loads [20-22], the modeling of this aspect of
breathing has received relatively little attention. To identify
the neural changes responsible for ventilatory
compensation, Im Hof et al. [23] calculated the respiratory
driving pressure waveform during steady-state unloaded
and loaded breathing (R = 8.5 cm-H2Ol-1s) in eight
conscious normal subjects. A closed breathing system was
utilized in the experiment of [23] with a resistance of
unloaded breathing of <1 cm-H2Ol-1s. By manual control,
Figure 8. Predicted total ventilation V E versus arterial CO2 pressure
a nonlinear resistance of ~8.5 cm-H2Ol-1s was added to the
PaCO2 (upper left), breathing frequency F (upper right), tidal
volume VT (lower left), and duty cycle Ti/T (lower right) inspiratory phase of breathing for experiments. The
during CO2 inhalation (PICO2 = 0, 2~7%) and exercise simulation of IRL can be performed by increasing Rin
( V CO = 0.2~1.0).
2 ( = 8.00 cm-H2Ol-1s) [24] from control (NL).
(3) Expiratory Resistive Loading (ERL): The simulations of
4.2 Simulations of Respiratory Mechanical Assistance/Loading
ERL are performed by increasing Rex ( = 8.00 cm-H2Ol-1s)
It is assumed that the parameters Rrs and Ers represent the from control (NL) with Rin at no load [22,25,26]. Poon et
active resistance and active elastance, respectively, which al. [22] examined the steady-state effects of expiratory
include the effective impedance of the respiratory muscles. resistive loading (ERL: R = 8.00 cm-H2Ol-1s) on the time
Under the resting condition, the inspiratory and expiratory course of inspiratory and postinspiratory muscle activities
resistances (Rin and Rex) can be adjusted from the no load and ventilatory pattern during quiet breathing from five
condition to the intended values independently. The effect of conscious human subjects. The experimental data of [22]
continuous elastic loading can be determined by changing the are summarized in Table 1 for comparison with simulation
lung elastance (Ers) from the resting mechanics. To further results. The data of loaded breathing are not directly
examine the simulation results (Table 2), experimental data on available in [22] except for minute ventilation. However,
spirometric and driving pressure variables under resistive and the percentage changes in patterns during ERL relative to
elastic loaded breathing are shown in Table 1. the mean control can be used for comparisons.
58 J. Med. Biol. Eng., Vol. 32 No. 1 2012

(4) Continuous Resistive Loading (CRL): To perform (simulated). The shape index A0.5 represents the percent of
continuous resistive loading, the inspiratory and expiratory maximum amplitude of inspiratory pressure reached at 50% of
airway resistances (Rin and Rex) are increased to the TI. Thus, a value of > 50 indicates that the rising phase is
intended levels of loading [27]. To examine the effect of concave to the time axis. In comparison with those of NL, it was
continuous resistive loading on variational activity of also found that the absolute rate of decline in pressure was faster
breathing, Brack et al. [27] studied 18 healthy subjects (upper left of Fig. 9) since the amplitude at the onset of decline
breathing at rest and with continuous inspiratory resistive (A) was higher during IRL. During the expiratory phase, both
loads of 3 and 6 cm-H2Ol-1s applied randomly for 1 hour the pressure and airflow profiles for IRL are similar to those
each through flow resistors (Model 7100R; Hans Rudolph, under no load (NL). With the ERL, the effects of airflow rate
Inc., Kansas City, MO). Values of the breath components and lung volume on shapes of the rising phase and declining
during rest and loaded breathing are partly summarized in phase of driving pressure are not significant. The effects of CEL
Table 1. on driving pressure are different from those of resistive loading
(5) Continuous Elastic Loading (CEL): The elastic loading in that the rate of inspiratory activity is increased, and
simulation can be employed to evaluate the effects of consequently a higher peak (A) is attained. It was also found
abnormal respiratory mechanics and neuromuscular drive that the airflow profile during the inspiratory phase becomes
on the various components of elastic load compensation. rectangular in shape, in contrast to the descending waveforms
The nominal parameter value for the total (active) elastance for IRL and ERL. The resultant profiles of various mechanical
was set to 21.9 cm-H2O/l for no load [22] and loads are mostly consistent with experimental data.
31.9 cm-H2O/l for loaded [28-30]. For comparison with
experimental data, the ventilatory responses with and
without elastic loading (E = 14.0 cm-H2O/l) measured in
eight healthy subjects [28] are listed in Table 1. The elastic
load was provided by an 80-liter metal drum, filled with
polystyrene chips to ensure isothermal conditions in the
contained gas. The experiments in [28] were performed
under progressive cycle exercise on a Bodyguard cycle
ergometer. However, only the ventilatory and gas exchange
data at rest (mean V˙ CO = 0.3  0.07 for control, and
2

0.36  0.08 for loaded) are shown in Table 1.


Table 1 summarizes the experimental data on spirometric
and driving pressure variables under resistive and elastic loaded
breathing [20,22,23,27,28]. For further comparisons, the
simulation data of loaded breathing are shown in Table 2. The
simulated instantaneous profiles of respiratory signals under
various mechanical loadings provide valuable information on
the behavior of the optimal respiratory control model. The
optimized waveforms can further be studied and tested by
comparing them to analytically predicted patterns [23] and to  ,
Figure 9. Instantaneous driving pressure (P(t), top), airflow rate ( V(t)
experimentally measured patterns reported in the literature. middle), and lung volume (V(t), bottom) under various levels
From the comparison panel in Fig. 6, the optimal instantaneous of mechanical loads at rest. Rrs = 3.02 cm-H2Ol-1s and Ers
waveforms under two distinct respiratory mechanics (either = 21.9 cm-H2O/l for NL, Rrs = 8 cm-H2Ol-1s and Ers =
resistance or elastance) can be compared and observed through 31.9 cm-H2O/l for loaded breathing. Left column:
comparisons of inspiratory resistive load with no load. Middle
the signal window. As shown in the upper right of the column: comparisons of expiratory resistive load with no load.
comparison window of Fig 6, the optimized breathing pattern, Right column: comparisons of continuous elastic load with no
including Amp (peak amplitude of pressure), VT (tidal volume), load.
Ti/T (duty cycle), F (breathing frequency), TI (inspiratory
time), and TE (expiratory time), can also be compared under Since the earlier breathing experiments on IRA [20], CRL
distinct levels of mechanics. [27], IRL [23], ERL [22], and CEL [28] were performed on
Further comparisons and analysis can be conducted human subjects with different respiratory basis and distinctive
off-line, as illustrated in Figs. 9-10. In Fig. 9, the effects of IRL loading levels, Fig. 10 only evaluates the simulation results of
(left), ERL (middle), and CEL (right) on driving pressure (top), changes in respiratory breathing pattern under mechanical loads.
airflow rate (middle), and lung volume (bottom) profiles are The relative percent changes of corresponding pattern variables
illustrated (dashed line) and compared with those of no load in Table 1 can be compared with those of Fig. 10 and
(solid line). The shape of the rising phase during resistance Table 2 for verification of model behavior. As shown in Table 2,
breathing of IRL was found to be more concave upward [23], all mechanical loadings result in an increase in TI (IRL: 30.79%;
and this can further be verified by comparing the corresponding ERL: 29.66%; CEL: 20.62%), which is consistent with the
A0.5 (IRL) values in Table 1 (experimental) and Table 2 experimental data for IRL (42.23%) and ERL (12.2  6.9 %) in
Simulation of Respiratory Control 59

Table 1. The increases of TE for IRL are not significant in either FORTRAN, and IMSL) into a newly released version of
simulation (8.14%) or experimental data (5.97%). However, TE LabVIEW.
for ERL exhibits a more substantial increase in both Table 1 and The model behavior of human respiratory control can be
Table 2. Both IRL and ERL cause increases in VT (IRL: verified using the proposed real-time simulator and signal
10.95%; ERL: 18.16%), but CEL causes a slight decrease monitoring system. With the use of the simulator, the optimal
(-3.19%) in VT. The variations of VT in Table 2 are also chemical-mechanical respiratory control model, which is the
consistent with the experimental data shown in hypothetical basis of the simulator, can be further explored and
Table 1. All mechanical loadings result in an increase in TI, and improved:
all but CEL result in increases in VT and TE, and a (1) In addition to some basic test conditions examined here
corresponding decrease in f. These results are consistent with (exercise, inhaled CO2 responses, and loaded breathings),
the values in Table 2. simulations can also be performed subject to certain respiratory
conditions, such as hypercapnic exercise, external dead space,
and loaded breathing in hypercapnia and exercise. The
simulation results can be employed to verify a model that
agrees with some respiratory phenomena such as exercise
hypernea, post-inspiratory (post-inflow) inspiratory activity for
mechanical loading, respiratory muscle fatigue, and muscle
weakness [23,29-37].
(2) In the modeling of the respiratory control employed in the
simulator, the respiratory mechanics, including airway
resistance and lung elastance, were defined to be linear and
were set as 3.02 cm-H2Ol-1s and 21.9 cm-H2O/l [22],
respectively. The inclusion of nonlinearities in Rrs and Ers may
further improve the performance of the model [13].
Figure 10. Changes in respiratory breathing pattern under various types
(3) Several performance indices were previously proposed to
of mechanical load relative to control (no load). VT: tidal
volume; TI , TE: inspiratory time, and expiratory time; Ti/T: either optimize the respiratory patterns or optimize the airflow
duty cycle; F: breathing frequency; V  : minute ventilation; profile. Some common indices include the respiratory work
E
A: peak amplitude of pressure; A0.5, amplitude of driving rate, the inspiratory pressure-time integral, and volume
pressure at 50% TI. acceleration. The inclusion of a term corresponding to the
volume acceleration to prevent lung rupture may be helpful to
5. Conclusions fine tune the optimal airflow predicted by the model.
(4) In the current model, the inspiratory activity of the pressure
In the optimal chemical-mechanical respiratory model, the profile was modeled as a quadratic function. It can further be
key hypothesis interprets the respiratory controller in a generalized by several linear and nonlinear functions such as
different way. A unified prediction of exercise and chemical cubic and power functions. The expiratory phase was modeled
responses was shown entirely in terms of conventional as an exponential fall from the peak amplitude at the end of
feedback-mechanisms instead of a separate stimulus signal, inspiration. No expiratory muscle activity was included. It is
which has never been clearly demonstrated. Based on this expected that inclusion of expiratory drive may improve the
model, a simulation process was constructed and a human accuracy of model predictions. The optimized pressure profile
respiratory control simulator was implemented on the can be obtained through the simulation and the results can be
LabVIEW platform. By utilizing the graphical programming compared with experimental data for further model
language of LabVIEW, the control strategy and signal modifications.
monitoring can be observed in real-time. The simulator was With the help of the implemented simulator, a
designed to have functional modules with an expandable comparative study of respiratory control models can be
human-machine interface. In comparison with an earlier conducted [38]. The proposed model and simulator can be
version implemented on Matlab platform, the virtual applied to the simulation of a mechanical ventilation device. It
instrumentation of LabVIEW appears more convenient and is also possible to establish a mechanical ventilation system
effective for developing human-machine interface of the with the optimized respiratory waveforms and breathing pattern
simulator. The expandable Plug-ins and GUI interface also obtained from the simulator. The clinical application of the
enable the simulator to further be implemented on web-base control model and simulator to human respiratory care is the
manner for e-learning without the need of installing LabVIEW ultimate goal of this study.
on user end. When the signal acquisition and processing
become major concern as the simulator develops into a Acknowledgements
controller for mechanical ventilation device, less effort would
be spent in LabVIEW platform with available embedded This study was supported by the National Science
systems. Nevertheless, compatibility problems have also been Council, Taiwan, under grant NSC 97-2511-S-035-002.
encountered as to integrate various software tools (C,
60 J. Med. Biol. Eng., Vol. 32 No. 1 2012

[19] F. M. Bennett and W. E. Fordyce, “Regulation of PaCO2 during


References rest and exercise: a modeling study,” Ann. Biomed. Eng., 21:
545-555, 1993.
[20] C. S. Poon, S. A. Ward and B. J. Whipp, “Influence of
[1] C. S. Poon, “Respiratory Models and Control,” in: J. D.
inspiratory assistance on ventilatory control during moderate
Bronzine (Ed.), The Biomedical Engineering Handbook, Boca
exercise,” J. Appl. Physiol., 62: 551-560, 1987.
Raton: CRC Press, 2404-2421, 1995.
[21] C. G. Gallagher, R. Sanii and M. Younes, “Response of normal
[2] C. S. Poon, S. L. Lin and O. B. Knudson, “Optimization
subjects to inspiratory resistive unloading,” J. Appl. Physiol., 66:
character of inspiratory neural drive,” J. Appl. Physiol., 59:
1113-1119, 1989.
2005-2017, 1992.
[22] C. S. Poon, M. Younes and C. G. Gallagher, “Effects of
[3] S. L. Lin and C. C. Chiu, “Optimizing the neuro-mechanical
expiratory resistive load on respiratory motor output in
drive for human respiratory system,” Biomed. Eng. Appl. Basis
conscious humans,” J. Appl. Physiol., 63: 1837-1845, 1987.
Comm., 6: 95-103, 1994.
[23] V. I. Hof, P. West and M. Younes, “Steady-state response of
[4] F. T. Tehrani, “Mathematical analysis and computer simulation
normal subjects to inspiratory resistive load,” J. Appl. Physiol.,
of the respiratory system in the newborn infant,” IEEE Trans.
60: 1471-1481, 1986.
Biomed. Eng., 40: 475-481, 1993.
[24] C. S. Poon, “Effects of inspiratory resistive load on respiratory
[5] S. L. Lin, C. R. Pai, C. H. Yang and C. C. Chiu, “MATLAB
control in hypercapnia and exercise,” J. Appl. Physiol., 66:
based real-time signal simulator and monitor for human
2391-2399, 1989.
respiratory system,” Proc. 2nd Med. Eng. Week of the World,
[25] L. Fee, R. M. Smith and M. B. English, “Enhanced ventilatory
181-181, 1996.
and exercise performance in athletes with slight expiratory
[6] A. M. Hernandez, M. A. Maanas and R. Costa-Castello,
resistive loading,” J. Appl. Physiol., 83: 503-510, 1997.
“Learning respiratory system function in BME studies by means
[26] W. H. Thompson, P. Carvalho, J. P. Souza and N. B. Charan,
of a virtual laboratory: RespiLab,” IEEE Trans. on Education,
“Effect of expiratory resistive loading on the noninvasive
51: 24-34, 2008.
tension-time index in COPD,” J. Appl. Physiol., 89: 2007-2014,
[7] M. C. Khoo, R. E. Kronauer, K. P. Strohl and A. S. Slutsky,
2000.
“Factors inducing periodic breathing in humans: a general
[27] T. Brack, A. Jubran and M. J. Tobin, “Effect of resistive loading
model,” J. Appl. Physiol., 53: 644-659, 1982.
on variational activity of breathing,” Am. J. Respir. Crit. Care
[8] A. Rybak, M. Pottmann, B. A. Ogunnaike and J. S. Schwaber,
Med., 157: 1756-1763, 1998.
“A closed-loop model of the respiratory control system,” Proc.
[28] A. D. D’Urzo, K. R. Chapman and A. S. Rebuck, “Effect of
Am. Control Conf., 275-279, 1995.
elastic loading on ventilatory pattern during progressive
[9] M. Modarreszadeh and E. N. Bruce, “Ventilatory variability
exercise,” J. Appl. Physiol., 59: 34-38, 1985.
induced by spontaneous variations of PaCO2 in humans,” J. Appl.
[29] G. F. Rafferty and W. N. Gardner, “Control of the respiratory
Physiol., 76: 2765-2775, 1994.
cycle in conscious humans,” J. Appl. Physiol., 81: 1744-1753,
[10] S. Mesic, R. Babuska, H. C. Hoogsteden and A. F. M. Verbraak,
1996.
“Computer-controlled mechanical simulation of the artificially
[30] G. Gallagher, E. Brown and M. Younes, “Breathing pattern
ventilated human respiratory system,” IEEE Trans. Biomed.
during maximal exercise and during submaximal exercise with
Eng., 50: 731-743, 2003.
hypercapnia,” J. Appl. Physiol., 63: 238-244, 1987.
[11] G. D. Mitsis, “Nonlinear, data-driven modeling of
[31] S. Jacobi, V. I. Iyawe, C. P. Patil, R. C. Cummin and K. B.
cerebrovascular and respiratory control mechanisms,” Proc. Int.
Saunders, “Ventilatory responses to inhaled carbon dioxide at
Conf. on Information Technology and Applications in
rest and during exercise in man,” Clin. Sci., 74: 177-182, 1987.
Biomedicine (ITAB), 1-4, 2009.
[32] J. H. Eisele, B. Wuyam, G. Savourey, J. Eterradossi, J. H. Bittel
[12] C. S. Poon, “Ventilatory control in hypercapnia and exercise:
and G. Benchetrit, “Individuality of breathing patterns during
optimization hypothesis,” J. Appl. Physiol., 62: 2447-2459,
hypoxia and exercise,” J. Appl. Physiol., 72: 2446-2453, 1992.
1987.
[33] H. Becker, O. Polo, S. G. McNamara, M. Berthon-Jones and C.
[13] H. Hirayama, Y. Shimizu and Y. Fukuyama, “Optimal control of
E. Sullivan, “Ventilatory response to isocapnic hyperoxia,” J.
nonlinear respiratory system with performance function
Appl. Physiol., 78: 696-701, 1995.
involving non linear terms,” Proc. SICE Annu. Conf., 1229-1234,
[34] N. Bruce and J. A. Daubenspeck, “Mechanisms and analysis of
2005.
ventilatory stability,” in: J. A. Dempsey and A. I. Pack (Eds.),
[14] S. Gray, F. S. Groadins and E. T. Carter, “Alveolar and total
Lung Biology in Health and Disease, New York: Marcel Dekker,
ventilation and the dead space problem,” J. Appl. Physiol., 9:
285-313, 1995.
307-320, 1956.
[35] A. Jubran, B. J. B. Grant and M. J. Tobin, “Effect of
[15] P. G. Guyenet, R. L. Stornetta, S. B. G. Abbott, S. D. Depuy, M.
hyperoxichy-hpercapnia on variational activity of breathing,”
G. Fortuna and R. Kanbar, “Central CO2 chemoreception and
Am. J. Respir. Crit. Care Med., 156: 1129-1139, 1997.
integrated neural mechanisms of cardiovascular and respiratory
[36] J. Teppema and A. Dahan, “The ventilatory response to hypoxia
control,” J. Appl. Physiol., 108: 995-1002, 2010.
in mammals: mechanisms, measurement, and analysis,” Physiol.
[16] M. Younes and W. Riddle, “A model for the relation between
Rev., 90: 675-754, 2010.
respiratory neural and mechanical outputs, I. Theory,” J. Appl.
[37] W. Patrick, K. Webster, A. Puddy, R. Sanii and M. Younes,
Physiol., 51: 963-977, 1981.
“Respiratory response to CO2 in the hypocapnic range in awake
[17] M. Younes and W. Riddle, “A model for the relation between
humans,” J. Appl. Physiol., 79: 2058-2068, 1995.
respiratory neural and mechanical outputs, II. Methods,” J. Appl.
[38] A. Mananas, S. Romero and P. Caminal, “A comparative study
Physiol., 51: 979-989, 1981.
of respiratory models in control of ventilation,” Proc. Conf.
[18] F. T. Tehrani, “Optimal control of respiration in exercise,” Proc.
IEEE Eng. Med. Biol. Soc., 3: 1601-1604, 2000.
Conf. IEEE Eng. Med. Biol. Soc., 20: 3211-3214, 1998.

You might also like