Biomedical Simulation User-Guide-Release-3.0
Biomedical Simulation User-Guide-Release-3.0
Getting Started
Thank you for trying out PNEUMA and its modularized component models. Before using
PNEUMA, please take a moment to read the Release Agreement first. To download the
associated files or their updates, please go to bmsr.usc.edu and click on Software. Before
you begin to use PNEUMA or its individual model components, please take a moment to
make sure that you have downloaded the most recent files that you will be using. In
Appendix I, there is a full list of files that are included in zipped format on the BMSR-
PNEUMA web site. After you unzip the downloaded file, please refer to the appendix
and check that you have the correct files.
Individual Sub-Models
PNEUMA is implemented using Simulink and Matlab version R2007b or higher (© The
Mathworks Inc., Natick, MA), which provides a graphical programming environment that
promotes modularization of the overall model into hierarchically smaller subsystems.
This allows the user to customize parts of the overall model in accordance to his/her
simulations needs. Alternatively, the user may also choose to focus on a specific
PNEUMA block and use it to study the corresponding mechanism of interest. Therefore,
depending on the user’s interest and needs, individual component blocks may be
downloaded and used.
Please refer to the reference and the “.m” file for variable names and values of each
compartment. Some of the components are difficult to decompose into smaller modules
and therefore may not be suitable for your application. If you have suggestions or would
like to request modifications to PNEUMA components that would better suit your
simulation needs, please feel free to send us feedback. Contact information is provided in
the Support and Contact section of this manual.
References
Roy, A., and Parker, R. S. (2006). Dynamic modeling of free fatty acid, glucose, and
insulin: an extended “Minimal Model”. Diabetes Technol. Ther. 8, 617–626.
Using Pneuma
To begin using Pneuma, unzip the “PneumaRelease3.zip” file and check that you have
all the necessary files. For the list of files in “PneumaRelease3.zip” file, please refer to
“Getting Started” section. After you have unzipped the file and you are ready to run the
program in the MATLAB environment, make sure that you are in the directory where the
unzipped files are located. To Open Pneuma, in the Matlab command prompt, type
“PNEUMA_MAIN_CONTROL_PANEL”.
If you are running Pneuma using a version of Matlab higher than Matlab75 (version
2007b), a series of warnings may appear due to compatibility issues, but these warnings
should disappear after the first time you open PNEUMA.
4
The Control Panel graphic user interface (GUI) will appear, as shown below.
5
The “Run” and “Stop” buttons allow the user to run and terminate the simulation.
Currently, the Real Time Workshop allows the simulation to run using the accelerated
mode even with standard Matlab Simulink package. So the “Run” operation will run in
accelerated mode that allows the simulation to run faster. If the user prefers to execute
the model in normal mode, it will have to be run under Simulink model itself rather than
using that GUI button (see options under Simulation tab in Simulink model window). If
you decide to stop the simulation before the End Time that you have specified, some
data will be stored to files (Saved Sample Time option) and all the variables are in the
workspace which can be saved later. The “Reset” button will reset all variable values to
their defaults.
Under “Open” menu, the user has three options. “Open Pneuma Model Ctrl+O” will
show the Pneuma model in Simulink. User can explore the modules in Pneuma and
incorporate other blocks if needed. “Open Display Panel Ctrl+D” allows the user to see
the output from some of the more common measurements such as arterial blood pressure,
heart rate and so on. Having achieved some familiarity with PNEUMA, the user may
want to add more inputs to the display panel or create new displays. “Open Program
Status Ctrl+P” will show the Pneuma Progress module in Simulink, that displays the
total duration of simulation, current simulation time and percentage of simulation
completed, based on total duration of simulation and current simulation time.
If the user wants to load or save the simulation workspace, click under “File” menu and
two selections will show up. “Load Data Ctrl+L” opens the standard Matlab open file
window, which allows the user to specify the data file and load the data into workspace.
“Save Data Ctrl+S” opens the standard Matlab save file window, which allows saving
the workspace data to the directory of user's choice.
6
Constant Parameters
When the user clicks on “CONSTANT PARAMETERS” button, another graphical
interface will appear, as shown below:
These are the constant parameters used in the model. The values may be changed before
the simulation, if desired. It is recommended that these parameters be left at their default
values. Each model subsystem is listed along with the constant parameter in that
compartment. Each title button gives user the opportunity to open the Simulink
implementation of that particular subsystem.
7
If the mouse cursor is placed and held at a particular box with number, the help text for
the corresponding parameter will appear so that the user will know what physiological
entity that parameter represents, as shown below:
8
Adjustable Parameters
This panel allows the user to vary parameters before or during the simulation. Click on
“ADJUSTABLE PARAMETERS” button and the following panel will appear:
The user can adjust the value either by using the slider bar or by typing directly into the
box. Both the “min” and the “max” values are shown for each slider bar. These values
can be changed as well. But the values that fall within the default spans indicated are
recommended, since these are consistent with physiologically feasible ranges.
9
The above panel shows the parameters that may be altered in value while the simulation
is being executed. Since the model is continually being revised, the actual parameters that
can be adjusted may be different in different versions of the program.
External Interventions
Here, the user is permitted to apply a variety of external interventions to the model.
Click on “EXTERNAL INTERVENTIONS” and the graphical panel opens up, shown
below:
The panel shows the interventions that have been included in the model at the present
time. Before you run each intervention, please click “Reset” button on “Control Panel” to
reload the original parameter set, then enter your new start/stop time and other parameters
on the Control Panel, then go back to the External Interventions. Again, as this software
gets updated, other interventions will be added.
D. Normal Sleep. To simulate normal sleep, simply click on check box “Sleep Enable”,
then go back to Control Panel and click on “Run” button. You can change the
parameter set for sleep to simulation different interventions. For overnight sleep,
make sure your “End Time” in Control Panel is longer than 3600*8+200 seconds (>8
hrs) , shown below:
E. OSA Sleep. To simulate obstructive sleep apnea (OSA) sleep, first click on check box
“Sleep Enable”, then drag the slider button in “Upper Airway Mechanism” or directly
enter value into “Pcrit” such as -2.66 which will simulate a moderate OSA, then go
back to Control Panel and click on “Run” button. For overnight sleep, make sure your
12
“End Time” in Control Panel is longer than 3600*9+200 seconds (>9 hrs) , shown
below:
F. CPAP with OSA Sleep. To simulate continuous positive airway pressure (CPAP),
first set up OSA sleep as the above example in OSA Sleep. Then click on check box
“CPAP”, enter values into “Start Time” and “Duration”, give values for the positive
pressure such as 15 cmH2O, then go back to Control Panel and click on “Run”
button. You can try 1 hour CPAP shown as below or overnight CPAP for OSA Sleep.
In our model, the default mode is to repeat CPAP every night if the CPAP duration is
longer than 1 day. For example, if the simulation runs for 30-day OSA sleep with 10-
day CPAP, on in the middle of the 30-day run time simulation, then the CPAP “Start
Time” could be 3600*24*10-1800 sec (which is 0.5 hour short than 10 days) and
“Duration Time” could be 3600*24*10+3600*2 sec (which is 2 hours longer than 10
days).
13
H. CSR-CHF Sleep. To simulate central sleep apnea (CSA characterized with Cheney-
Stokes Respiration CSR) with congestive heart failure (CHF), first activate Sleep
as in Normal Sleep. Then to change heart contractility, go to “Adjustable
Parameters”, enter value such as “0.475*0.3” or drag the slider bar for
14
“Gain_Emaxlv” and enter value such as “2392*0.3” or drag the slider bar for
“Basal_Emaxlv” in “Heart Contractility” area, then increase chemoreflex gain such as
increase “Peripheral Chemo-Gain” by directly entering value as “0.0063*6” (example
value) or dragging the slider bar, then increase “Lung-Chemo Volume” by directly
entering value as “0.588*1.5” (example value) or dragging the slider bar. Lastly, go
back to Control Panel and click on the “Run” button, as shown below:
These are brief descriptions to help the user get started using our package. Please feel free
to explore the model. Since this is an open source environment, contribution of newer
code or model will also help us to improve our implementation and to better suit the
needs of other users as well.
15
Block Description
For the complete descriptions of all the individual Simulink model blocks, please refer to
the “Blocks Reference” section.
The whole model and its modularized components will be updated from time to time. So,
please check the website for newer update or if you wish to join the mailing list,
notification will be sent to you regarding our progress on the update.
FAQ will be set up as we get more questions and comments. In the meantime, please
send all your valuable comments and feedbacks to [email protected]. Once we
have the solution, then we will post it in the forum so that other users can benefit from it.
The PNEUMA project is supported by the USC Biomedical Simulations Resource (NIH
Grant P41-EB001978). Comments and feedback on all aspects of this software are
welcome.
16
Blocks Reference
17
PNEUMA V.3.0
Description
General References:
1. Cheng, L., and Khoo, M. C. K. Modeling the autonomic and metabolic effects of
obstructive sleep apnea: a simulation study. Front Physiol 2:111, 2012. doi:
10.3389/fphys.2011.00111.
2. Cheng, L., Ivanova, O., Fan, H., and Khoo, M. C. K. An integrative model of
respiratory and cardiovascular control in sleep-disordered breathing. Respiratory
Physiology and Neurobiology 174, 4-28, 2010.
18
Display
Maneuvers 200 Progress
Panel
t_stop
Double Click
to load Initial Conditions
Tidal Volume Vt
RespMus Drive
Sleep/Awake
PbCO2
ftas _v
ftbs
ftp
AI -Arousal Index
PaCO2
CaO2
Ppl
REM
Respiratory System
19
Reflexes (Reflex_Ursino.mdl)
Description
The reflexes model includes the key cardiorespiratory reflexes: baroreflex, chemoreflex
and lung stretch receptor influences on respiration and heart-rate control.
Reflexes
ABP
Carotid fcs
Dstate Baroreceptors
PCO2
Chemoreflex fchemo
PO2
Carotid Baroreceptors
This block represents the pressor receptors that are located in the carotid sinus. In
response to arterial blood pressure changes, it produces both parasympathetic and the
sympathetic neural activity changes. During sleep, baro-sensitivity is assumed to
increase slightly. The input for this compartment is the arterial blood pressure, ABP, and
the output is the carotid sinus firing frequency, fcs.
P Pn Pn
f cs, min f cs,maxexp( )
k cs k cs
f cs
P Pn Pn
1 exp( )
k cs k cs
Pn Pn _ sleep (1 AI ) SI
kcs Kcs _ sleep (1 AI ) SI
Chemoreflex
Description
The inputs to the chemoreflexes are Oxygen (O2) and Carbon Dioxide (CO2) levels in
the arterial blood. This reflex affects both the heart rate and the peripheral vasculatures.
Inputs for this block are the oxygen and carbon dioxide partial pressure, PaO2 and
PaCO2. Output is the chemoreceptors firing, fac.
Chemoreflex Equations:
_____
PaO PaO
fchemo,min fchemo,max exp 2 2
kchemo
chemo PaO2 , PaCO2 K ln PaCO2
______ f
_____
Pa
PaO PaO CO2
1 exp 2 2
kchemo
where
K H if Pa O 2 80
Pa O2 80
K K H 1.2
if 40 Pa O 2 80
30
K 1.6 if Pa O 2 40
H
df chemo
1
f chemo chemo
dt chemo
Lung inflation or deflation can produce changes in heart rate through the lung stretch
receptors. The input for this block is the tidal volume, Vt. The output is the lung stretch
receptor activity, fls.
lung GlungVT
df lung
dt
1
lung
f lung lung
Offsets Equations
theta _sa_n
1 f(u) 1
PaO 2 1/tao _isc s 1
theta _O2_sa
Wsa_Fcn Offset _Resistance
1/tao _isc
2
PaCO 2 -K- 1
1/tao _cc
s theta _CO2_sa
-C- Gain 2
1/tao _cc
PaCO 2_n
-C-
theta _sp_n
f(u) 1
1/tao _isc s 2
theta _O2_sp
Wsp_Fcn1 Offset _veins
1/tao _isc1
-K- 1
1/tao _cc
s theta _CO2_sp
Gain 1
1/tao _cc1
-C-
theta _sb_n
f(u) 1
1/tao _isc s 3
theta _O2_sb
Wsb_Fcn2 Offset _heart
1/tao _isc2
gcc _sb 1
1/tao _cc
s theta _CO2_sb
Gain 3
1/tao _cc2
27
Description
Influences from the central respiratory control (RSA), baroreflexes, chemoreflexes and
lung stretch receptors reflexes are integrated in this compartment and these inputs
determine the total -sympathetic, -sympathetic and parasympathetic influences on
heart rate and peripheral resistance. The inputs for this compartment are the central
respiratory drive, Nt, chemoreflex, fchemo, lung stretch receptors reflex, fls, carotid
baroreceptors firing, fcs, and CNS response, Offsets. The outputs are the -sympathetic
response, ftas, -sympathetic response, ftbs and parasympathetic response, ftp. The models
shown below is in PNEUMA.mdl, but the submodel is referred to Autonomic.mdl.
Autonomic Control
Autonomic Integration
Nt
Central Respiratory Control ftas
fchemo Chemoreflex
fls Lung Stretch Receptors ftbs
Reflex
fcs ftp
Baroreflex
Offsets
CNS Response
exp ks Gbaro,as f cs Gchemo,as f chemo Glung ,as f lung GRSA,as N t Offsetres ,vein
exp ks Gbaro,bs f cs Gchemo,bs f chemo Glung ,bs f lung GRSA,bs N t Offsetheart
28
fcs fcs , 0
f para ,0 f para , exp
kp
f tp Gchemo , p f chemo Glung , p f lung GRSA, p N t Offset para _ n
fcs fcs , 0
1 exp
kp
4 0 1 1
noise
Total Alpha-Symp
Band-Limited Gain2 Gain3 ftas_blocker (ftas_res)
White Noise
4 0.4
Nt Central Respiratory G_CRSA
Neural Drive 0.34
G_lung_asymp
4 f(u) fs
(u<=60)*u+(u>60)*u
fas
G_chemo_asymp Alpha-Sympathetic
Response
5 1
Offset_Alpha-symp1 1 2
G_offset_asymp1 Alpha-Symp Total Alpha-Symp
f(u) f(u) ftas_blocker1
6 1
Integration (ftas_vein)
Offset_Alpha-symp2 Alpha-Sympathetic
1 G_offset_asymp2
Response1
lung feedback
0.24
G_lung_bsymp
2.8 f(u) (u<=60)*u+(u>60)*u 1 3
fbs fs
G_chemo_bsymp Total Beta-Symp
Beta-Sympathetic ftbs_blocker (ftbs)
Response
2 1
7 1
Chemoreflex G_chemo Offset_Beta-symp
G_offset_bsymp Beta-Symp
Integration
0.24
G_lung_para
0.03 (u>=0)*u 1 4
G_chemo_para Total Parasymp
3 1 f(u) ftp_blocker
(ftp)
fcs fp
Carotid Sinus G_fcs
-C- Parasympathetic 1
BaroResponse
theta_para_n G_offset_para Parasymp
Integration
29
SA Node (SA_Node_Ursino.mdl)
Description
SA Node
ftbs
-sympathetic
SI Response
HPbs
ftp
parasympathetic HPp HP
SI Response
Basal Heart
Period HPbasal
SA Node Equation:
3
Gbs(SI )
1 1
ln -0.13
ftbs toux (7).s+1
Transport
Delay Saturation Math Gain _HPbs Transfer Fcn
Function
ftbs_min
HP _basal 1
Constant
HP
Constant 1
2 1
ftp 0.09
Transport toux (8).s+1
Delay41 Gain _HPpara Transfer Fcn 1
Gps(SI )
-Sympathetic Control
Description
This response is modeled assuming first-order dynamics. The time-constant and delay
associated with the -sympathetic effect on the heart period is longer than that of the
parasympathetic response. There is slight decrease in -sympathetic response in sleep.
The input for this compartment is the -sympathetic firing frequency, ftbs and the output
is the corresponding component of heart period change, HPbs.
Gbs Gbs ( SI ) ln[ f tbs (t Dbs ) f tbs min 1], f tbs f tbs min
bs (t )
0, f tbs f tbs min
Gbs ( SI ) 1 SI (1 AI ) Gbs _ sleep
d
HPbs
1
HPbs (t ) bs (t )
dt bs
Parasympathetic Response
Description
The vagal effect on heart rate is modeled assuming first-order dynamics. During sleep,
parasympathetic activity increases, and this is partially responsible for the decrease in the
heart rate. The input for this compartment is the parasympathetic firing frequency, ftp
and the output is the corresponding component of heart period change, HPp.
Gps
ps (t ) f tp (t Dps )
Gps ( SI )
d
HPp
1
ΔHPp(t) σp(t)
dt τ para
Gps ( SI ) 1 SI (1 AI ) G para _ sleep
Description
This block models -sympathetic control of peripheral vascular resistance, using a first-
order dynamic system as in the case of the -sympathetic component. During sleep in
normals, the accompanying decrease in -sympathetic activity contributes substantially
to a decrease in blood pressure. The inputs are the total -sympathetic firing frequency,
ftas and the state/sleep drive, Dstate. The output is the proportional change in the
peripheral resistance, TPR.
{Rsp}
1 fes
Rsp
Rsp
Alpha Symp Gas(SI)
fes
Vumv {Vumv }
Gas(SI) Vumv
Venous Circ Vumv
Description
The variable breathing period is controlled from the central neural control system by the
total chemoreflex drive [52]. The inspiratory and expiratory periods of a single breath are
set to be of equal duration. The ventilatory drive is controlled by central and peripheral
chemoreflexes. The combination of ventilatory drive and breathing period determines the
neuromuscular drive.
Breathing_Enable_Signal
Breathing_Frequency
Breathing Frequency
(breaths/minute)
F_breathing
RESPIRATORY RHYTHM
VBP Variable Breathing Period Respiratory Rhythm 1
Respiratory Rhythm_Generator
39
Description
The variable heart period module is modulated by the major reflexes and
cardiorespiratory interactions in a closed loop mode. The sinoatrial node is modeled as a
simple pacemaker, regulated by the parasympathetic and the beta-sympathetic inputs. The
variable heart period is generated from continuous SA output using an
integration/saturation mechanism. The beta-sympathetic branch affects the heart rate
contractility, thus modulating the systolic period. Greater beta-sympathetic tone increases
myocardial elastance and shortens ventricular systole. Each active atria-ventricular
compartment is characterized by a time-varying nonlinear elastance function, describing
the changes in ventricular elastance due to the beta-sympathetic tone input. The diastolic
filling time is the difference between the heart period and systolic period and is thus
controlled indirectly. The activation of the right and left hearts is fully synchronized and
occurs simultaneously.
Reference: Dempsey, J.A., Smith, C.A., Eastwood, P.R., Wilson, C.R., Khoo, M.C.K.
Sleep induced respiratory instabilities. In: Pack, A.I. (Ed.), Sleep Apnea Pathogenesis,
Diagnosis and Treatment. Dekker M., New York. 2002.
41
1
Threshold Integrated HP
1
1
u u1 if (u1 <0)
HP_SAnode 1 HPin 1
s If Heart_Period
Integrator
1
1 if { }
Time Constant In 1 Out1 du/dt |u|
s HPout Heart Period
If Action
Subsystem
Integrator 1
Enable signal
Memory
42
Description
The cardiovascular subsystem is capable of simulating the pulsatile nature of the heart
and blood flow through the pulmonary and systemic circulations. Included in the model
are descriptions of atria-ventricular mechanics, hemodynamics of the systemic and
pulmonary circulations, SA node, change of total peripheral resistance and baroreflex.
The inputs for this combined subsystem are the α-sympathetic firing rates, ftas_res,vein,
β-sympathetic firing rates, ftbs, parasympathetic firing rate, ftp, arterial PaCO2, CaO2,
arousal index, AI, sleep-wake state index, SI, and the pleural pressure, Ppl. To
incorporate the effects of pleural pressure changes on the circulatory system we modulate
basal blood pressure values for systemic and pulmonary components in thoracic cavity
and heart. The output is the arterial blood pressure, ABP, heart period, HP, cardiac
output, CO, and blood flow to lung for gas exchange.
Cardiovascular System
LPA pLA
CLA
R SV R SP
C SV CSP
R LA
QRV CPA
pLV
R EV R EP CLV
C EV CEP
R RV RLV
QMP QLV
CRV
RRA R MV R MP
C MV CMP
C SA
LSA
QBP
pRA
CRA R BV R BP
CBV C BP
RSA
Systemic
QHP pSP Circulation
R VC R HV R HP
CHV C HP
C VC
43
Reference:
Carotid
3 Beta-Symp (ftbs)
Baroreceptor {Rmpn } {Vusv} {Vuev } {Vumv }
ftbs HP HP HP
4 Parasymp (ftp) {Gbp } {Rhp } {Rmp } {Rsp}
ftp
Arousal _CardIC {Rep } {Vsa} {Psp} {Pvc }
1
Qrv Blood Flow to Lung
PULMONARY CIRCULATORY SYSTEM for Gas Exchange
Qla
Vusa
2 f tbs
{Emaxlv} {Emaxrv}
Emaxlv {Emaxlv}
Vusp Beta-Symp (ftbs) Gbs(SI)
Heart Emaxlv
Vuep
Heart Beat
f tbs
[Vusv] Emaxrv {Emaxrv} Right Ventricle
Gbs(SI)
phi Pmaxrv {RHeart}
[Vuev] Heart Emaxrv
Right Ventricle
Vupv
f tbs Heart Beat
Vupa
Left Ventricle
3 f tp
Vupp HP HP phi phi Pmaxlv {LHeart}
{Vu}
Parasymp Gbs(SI)
Vula (ftp) Gps(SI)
phi Left Ventricle
Vura SA Node
Vump
4 1-u
Vubp Gbs_sleep
Arousal_CardIC HP_SAnode Heart_Period 1
Vuhp
1 HP
1
Vubv SI Sleep Wake State Index
RR Interval
Vuhv Gpara_sleep
[Vumv] 1
Qilv
1
1/Rla s SV
[ABP]
mitral
Plv [LHeart]
valve
[HP] -K- CO
Pmaxlv
ml/sec
Pmax to l/min
P
Flow 1
Vulv Qolv
[ABP] Pmaxlv--Psa
Qlv
aortic
_ ----------------------
valve
1 Out {Vlv} Rlv
+
s
Qolv {Wlv}
46
CHF Gain1
1/Rra 1
Qirv [Ppa]
Prv
tricuspid Pmaxrv
[RHeart]
valve
Switch2
Pmaxrv Pmax
P
Flow 1
Vurv
Qrv
[Ppa] Pmaxrv--Ppa
_ pulmonary
----------------------
Qirv Out {Vrv} valve
Rrv
1 +
s
{Wrv}
Product
Qpa 1
1/Lpa
s
{Vpp}
Vupp
Qpa _
1 Out 1/Cpp
+ Ppp
Qpp s
1
Ppp
-K- 1/Rpp
Qpv
2 1/Rpv Pla
Qpv [Pla]
Qla
CaO2
PaCO2
7 Qhp Rhp {Rhp}
Qhp Gsleep Coronary Peripheral
Coronary Circulation Resistance
Regulation
1 1-u
AI (arousal Index)
-K-
2
1 Gas(SI)
SI (Sleep Index) Gas_sleep
48
Description
Inspiratory muscular activity is produced by neural drive arising from the respiratory
centers. The muscles have to overcome the resistive and elastic forces of the lungs and
chestwall to generate the airflow. The muscular drive is modulated by the
autorhythmicity, chemical and state drives. In the case of the mechanical assisted
ventilation, the internal neural activity will diminish with a period of time. The inputs for
this compartment are the chemical drive, Dchemo, external pressure, Dext and the state-
related drive, Dstate. The output is the neuromuscular drive, Nt.
Neuromuscular Drive
Respiratory Autorhythmicity
Nt
T
I Dtotaldt 0 t TI
N (t ) 0
0 TI t TT
49
Resp_Rhythm_Generator
Demux on_off_rhythm_test Mux
Nt Save block 1
RespMus_blocker G_RespMus
Mechanial
1 1 20 Resp Neural Profile Resp_sig Mux Ventilation
RespMus Drive
2
Chemical S_wake State Total Drive
Drive drive
3 0.3 2
Mux f(u)
Description
During the breathing process, the respiratory muscles have to overcome the resistive and
the elastic forces of the respiratory system. By equating the force generated from the
respiratory muscles with the pressure from the respiratory system, the airflow pattern can
be obtained using a simple mechanics model, and tidal volume can be computed from
the flow. During normal breathing, expiratory muscular activity is minimum. The inputs
are the neural signals, Nt, the upper airway conductance, Condua, the expiratory pressure,
Pexp and the external pressure, Pao. The outputs are the airflow, Flow, tidal volume, Vt
and the muscular pressure, Pmus.
Pexp Pao
Inspiratory
Nt Muscular
Pressure
Respiratory
Condua Resistive,
Elastic Force
.
Pisom e Vt / 0.28VC (bVt 0.25 Vt )
Pmus .
(Vt bVt )
.
PPL RCW Vt ECWVt Pmus
.
Palv RLT Vt ELTVt PPL
. (0.25GP(t )e Vt / 0.28VC bV GVt E GPE GPAO ) 2 4bV (GP(t )e Vt / 0.28VC GVt E GPE GPAO )
Vt
2
Vt / 0.28VC v
0.25GP(t )e b GVt E GPE GPAO
2
Reference: Younes, M. and Riddle W. A model for the relation between respiratory
neural and mechanical outputs. II. Methods. Journal of Applied Physiology, 51(4): 979-
989, 1981.
Pleural Pressure(Pleural_Schuessler.mdl)
Description
Pleural pressure influences the arterial blood pressure by increasing the venous return and
decreasing the cardiac output. The combination of the respiratory muscle force and the
static chest wall pressure yields pleural pressure. The inputs are airflow, Flow, muscular
pressure, Pmus and external pressure, Pao. The output is the pleural pressure, Ppl.
Pleural Pressure
Flow
Pleural
Pmus Pressure Ppl
Pao Mechanisms
.
. . PVt (bVt 0.25 Vt )
PPL PAO K1, AW K 2, AW Vt Vt
.
(Vt bVt )
.
PE RCW Vt ECW Vt
Reference: Schuessler, T.F., Gottfried, S.B. and Bates, J.H.T. A model of the
spontaneously breathing patient: applications to intrinsic PEEP and work of breathing.
Journal of Applied Physiology, 82(5): 1694-1703, 1997.
54
Description
This subsystem models gas transport through the dead space, CO2 and O2 exchange in the
alveoli, the CO2 and O2 dissociation curves, and the transport of CO2 and O2 in the blood
to the chemoreceptors along with vascular mixing. Also included in this module are CO2
exchange in the brain compartment, gas exchange in the body tissues, conversion of
blood gases into respiratory drive by the chemoreflexes, and chemoreflex effects on
peripheral vascular resistance. The inputs are airflow, Flow, tidal volume, Vt and cardiac
output, CO (in this case, it is synonymous with blood flow, Q. The output is the
chemoreflex-related ventilatory drive, Dchem and chemoreflex modulation of total
peripheral resistance, TPRchemo.
PbCO2
Flow Central Chemoreceptors
Vt Dead
Space
Q
Brain Region Dc
Dchemo
Dp
PdCO2 PdO2 PaCO2
2
CaCO2 SI Sleep Wake State Index
CVCO 2
PACO2
Pd5CO2 PACO2
Pd5O2
CaCO2
Flow PACO2 SAO2 SI Sleep Wake State Index
1 Vt - Tidal Volume CvCO 2
SAO 2 3
Vt - Tidal Volume CaCO2
Q SAO 2
PAO2 PAO2
PAO2 CaO2 CaO2
CVO2
CvO 2
CaO2
5 Qt
Dissociation
CaO 2
GAS EXCHANGE BODY TISSUES
IN THE LUNGS COMPARTMENT
Blood Flow to Tissues
0.85
4
Blood Flow
57
Description
We assume that no gas exchange with blood occurs in the dead space. The inputs are
airflow, Flow, tidal volume, Vt and blood flow, Q. The outputs are the CO2, PdCO2 and
the O2, PdO2 partial pressure for the dead space.
Dead Space
Flow
PdCO2
Vt Dead Space
CO For CO2 and O2 PdO2
Simulink Model: Entire Dead Space Dead Space Compartments for CO2
subsystem
Note: Dead Space Compartments for CO2 and O2 designs are the same. Only Part of
CO2 implementations are shown as examples.
59
CO2 and the O2 exchange in the lungs are both modeled assuming first-order dynamics.
The rate of exchange is affected by the gas concentration in the blood, the gas partial
pressure and the blood flow rate. The CO2 storage space is larger than that for O2 to
account for the larger capacity of lung tissue and lung water for CO2. The inputs are the
CO2, PdCO2 and O2, PdO2 partial pressure for dead space, arterial CO2, CaCO2 and O2, CaO2
concentration, venous CO2, CvCO2 and O2, CvO2 concentration, tidal volume, Vt, airflow,
Flow and blood flow, Q. The outputs are alveolar CO2, PACO2 and O2, PAO2 partial
pressure.
Q
PdO2, CaO2 O2 exchange in
the Lungs PAO2
CvO2
Inspiration
. . .
Vco2 P Aco2 [863 Q(Cvco2 Caco2 ) V A ( Pd (5)co2 PAco2 )]
. . .
Vo2 P Ao2 [863 Q(Cvo2 Cao2 ) V A ( Pd (5)o2 PAo2 )]
Expiration
. .
Vco2 P Aco2 [863 Q(Cvco2 Caco2 )]
. .
Vo2 P Ao2 [863 Q(Cvo2 Cao2 )]
Simulink Model: Gas Simulink Model: Gas Exchange in the Lungs for CO2
Exchange in the Lungs
Note: O2 compartment is the same implementation as CO2 and it is not shown here.
Dissociation CaCO2
Dissociation CaO2
.. 1 .
P aCO2 [ PACO2 (t Ta ) (T1 T 2) P aCO2 PaCO2 ]
(T1 * T 2)
.. 1 .
P ao2 [ PAo2 (t Ta ) (T1 T 2) P ao2 Pao2 ]
(T1* T 2)
Reference: Lange, R.L., Horgan, J.D., Botticelli, J.T., Tsagaris, T, Carlisle, R.P., and
Kuida.H., Pulmonary to arterial circulatory transfer function: importance in respiratory
control. Journal of Applied Physiology, 21(4):1281-1291, 1966.
63
4 PaCO2
1
Q
Q PaCO 2
1 Lung-Chemoreceptor Delay Volume
Lung -Chemoreceptor Delay Volume
Q
3 PAO2 PaO2 2
PAO2 PaO 2
Lung-Chemoreceptor Delay Volume
O2 Cardiovascular
Mixing and Convection
Effects
T 1+T2
1
1 1 PaCO 2
1/(T1*T2)
s s
PaCO 2firstIC
PACO2
1
PACO2 delay
3
Lung -Chemoreceptor Delay Volume To
2 Product 1
Q
PACO2_delayIC
Dissociation Equations:
1 / a1
_ FO
CO 2 C O 2 2
1 / a1
1 FO
2
1 / a2
_ FCO
CCO2 C CO2 2
1/ a
1 FCO 2
2
PAO (1 1 PACO )
FO2 2 2
K1 (1 1 PACO )
2
PACO (1 2 PAO )
FCO2 2 2
K 2 (1 2 PAO )
2
Reference: Spencer, J.L., Firouztale, E., and Mellins, R.B. “Computational Expressions
For Blood Oxygen and Carbon Dioxide Concentrations”, Annals of Biomedical
Engineering, Vol 7, pp. 59-66, 1979.
Description
Cerebral flow is highly sensitive to changes of the CO2 tension in the brain. The brain
CO2 tension is controlled by the metabolic rate and the blood flow rate. The inputs for
this compartment are the arterial CO2 partial pressure, PaCO2 and blood flow in the brain
region, Qb. The output is the brain arterial CO2 partial pressure, PbCO2.
Reference: Read, D.J.C. and Leigh, J. Blood-brain tissue Pco2 relationships and
ventilation during rebreathing. Journal of Applied Physiology, 23(1):53-70, 1967.
Description
Gas exchange that occurs outside of the lungs and the brain is modeled as taking place in
a single compartment. The rates of O2 consumption and CO2 production are dependent on
the metabolic rate of the body tissues. The inputs are the arterial O2 and CO2
concentrations, CaO2 and CaCO2. The outputs are the venous O2 and CO2 concentrations,
CvO2 and CvCO2.
Body Tissues
CaCO2 CvCO2
Body tissues exchange
CaO2 for O2 and CO2 CvO2
. .
Vt CO2 C VCO2 [ MRCO2 Q(C aCO2 CVCO2 )]
. .
Vt O2 C VO2 [ MRO2 Q(CaO2 CVO2 )]
Simulink Model: Body Tissues Simulink Model: Body Tissues for CO2
69
Description
The chemical driven ventilatory response is determined from the central and the
peripheral chemoresponses during sleep-wake state. The central response is driven
primarily by CO2 while the peripheral response is modulated both by oxygen and carbon
dioxide. The inputs for this compartment are the brain CO2 partial pressure, PbCO2,
arterial CO2 partial pressure, PaCO2 and oxygen saturation, SAO2. The output is the
chemical drive for ventilation, Dchem.
Ventilatory Response
PbCO2
PaCO2 Chemical drive DTotal
for ventilation
SAO2
SI
Y, TH L Y TH H
DTotal
0, OW
z p 0 t
Y X / 2 X / 2 [ z p0 e u(t )]
2 /(1 e
5 DTotal _ O
) 1, DTotal _ O 0
X
0, DTotal _ O 0
(b) For sleep-disordered breathing,
DTotal DTotal _ O
where
SI
2 1
0.075 1 (u>0)*u
PbCO2 Ic
Gc_blocker
Gc 0.3
S_wake
6 Mux f(u)
PaCO2 IpCO 2 4
1 1
Sleep /Awake 5
D_Total
1 for up
0.0063 1 (u>0)*u AI Dchemo 0 for ground
IpO 2 Gp Gp_blocker Switch
3
SAO2 In1 Out1
Dynamic Drive
Description
Upper airway muscle tone decreases from wakefulness to sleep. This introduces the
possibility of upper airway collapse under certain conditions. The simple model of upper
airway mechanics employed here assumes that upper airway conductance (= reciprocal of
resistance) is directly proportional to the "wakefulness" (or state-related ventilatory)
drive.
Awake / Sleep
State Change SI
Mechanism
SSWA SI
Saw/sleep AI
Upper Airway
Description
Upper airway model is driven by pleural pressure, Ppl, total respiratory flow, Qtotal in the
airways, lower airway resistance, Rla and sleep-wakefulness state drive, SD. During the
obstruction, the upper airway is narrowed, therefore the upper airway resistance to the
airflow increases. Because the upper airway is entirely blocked during full obstruction,
and its resistance becomes infinitely large, for modeling purposes we prefer to use the
upper airway conductance, Yua which is the inverse of resistance. We model upper
airway conductance as a function of upper airway opening surface area, A. It is a known
fact that in patients with Obstructive Sleep Apnea the upper airway muscle tone is
reduced and more prone to collapse. Therefore, the upper airway opening surface area
depends on the airway pressure and upper airway compliance, Cua that is in turn a
function of upper airway sensitivity, sua and also depends on the sleep-wakefulness state
drive SD. The upper airway muscle tone is represented by the upper airway sensitivity. In
wakefulness, the sensitivity remains low, but with the sleep onset the sensitivity
increases. The net effect is to impose an additional load on respiratory effort.
All these mechanisms are inter-dependent on each other and connected to lower
respiratory airways as well in a closed loop mode.
ao
Pua Y ua V V ua
Pcrit ( SI )
bua
Pua V ua dt V ua Ruaw
0, Pua Pcrit
Yua ( SI ) kua Aua , where Aua A0ua (1 Pua / Pcrit ( SI )), Pcrit Pua 0
A , Pua 0
0ua
Enable
Q_total
75
Sleep Mechanism
Process C:
Process S:
1 REM
REM
0 NREM
SWA
SSWA 1.2
S
1, AI 0
SSWAcombined
0, AI 1
0.9
Circadian _High
Process Circadian H
f(u)
S
Process Circadian L
Mux f(u)
0.15
1
Circadian _Low SI Sleep Wake State Index
Sleep Index
Saturation
-0.0005
Process S u1 if (u1 > 0)
If
u1
Step _Size 1/200
f(u) Mux
f(u) Mux
u2 2.1 2 1
u1
Fcn2 s
Mux xo
f(u)
In1 Out1
Fcn4
if { }
In1 Out1 t0
u2 fcn y Triggered
If Action REM
Subsystem
Subsystem t
Clock
1-u
t0
u2 fcn y Fcn1
Diet 5
t
Diet
Process Circadian H
4 u2
Process Circadian L REM S So
REM
Process S Sleep Awake
3 SWA_scaled Sleep/Awake 2
Circadian _Process Mux REM
SWA/S
SWA Airway Cond
Saturation 1 SWA AI - Arousal Index 1
AI - Arousal Index
3
SWA
1
s f(u)
2
SWA_scaled
-gc
1 1.2 u>=1
2
s
Sleep /Awake xo Product 1 Gain
1
So
1
u<1
S
rc fc
1
Product 8
4
S/SWA Combined
1-u u<1
Product 10
Product 11
1-u Fcn3
REM
4
Gain 3
1 0.2 3
AI - Arousal Index
Gain 6
Product 7 Gain 2
Band -Limited
White Noise
Description
Metabolic Control
dI (t )
(G (t TDi ) Gh )t n( I (t ) I b ) p5u1 (t )
dt
dX (t )
p2 ( X (t ) X b ) p3 ( I (t ) I b )
dt
dY (t )
pF 2 (Y (t ) Yb ) pF 3 ( I (t ) I b )
dt
dF (t ) k u (t ) u3ex t (t )
p7 F (t ) p7 Fb p8Y (t ) F (t ) p8Yb Fb p9GG (t ) F (t ) p9GGb Fb EF 3int
dt VolF
dZ (t )
k2 ( Z (t ) Z b ) k1 ( F (t ) Fb )
dt
where p9G 0.00021e0.0055G
Epinephrine Regulation:
( E (t ) E (0))2
Vx,i Vxo,i 1.0 xE,i E
x,i ( E (t ) E (0))2
where subscript x = “heart”, “muscle”, “gastrointestinal tract”, “adipose tissue” or “other
tissues”; subscript i = “glucose” (assuming the metabolic pathway: GLC
G6PGLY) or “FFA” (assuming the metabolic pathway: TGL FFA ACoA).
u2int (t ) Vx ,i (t )
x
u3int (t ) Vx ,i (t )
x
ftas W ( I ) [1 exp(t / I )]
81
Reference:
1. Kim, J., Saidel, G. M., and Cabrera, M. E. Multi-scale computational model of
fuel homeostasis during exercise: effect of hormonal control. An Biomed Eng
35(1): 69-90, 2006.
2. Roy, A., and Parker, R. S. Dynamic modeling of free fatty acid, glucose, and
insulin: an extended “Minimal Model”. Diabetes Tech Therapeu 8(6): 617-626,
2006.
InsPump _in(t)
G(t) 2*Fcn+2
Remote
I(t) 2
Insulin 1 u 1(t) Plasma Insulin
In1
X (t) 4
u1(t) Concn , I(t) W_alphaSYMP
Insulin Dynamics _ B&P
X(t)
Remote FFA
Z(t)
Z(t)
I(t)
Remote
Ins_FFA
pF3 / (s + pF2)
Y(t)
F(t)
G(t)
F(t) Y (t)
u3(t) 3
FFA Dynamics_LC u3(t)
3
Plasma FFA
Concn , F(t)
82
p1 Gb
1 -K-
u2(t) 1/VolG 1
p6*Gb *Zb
1
s G(t)
G(t)
p4*Xb *Gb
p6
2
Z(t)
p4
3
X(t)
Threshold Glucose
Ti
Concentration (h)
Variable 1
Random Time Delay s
Product Thresholding
Number 1 I(t)
Operator 2 Sum 3 Int 1
1
Int 2
s
n Ib
1 Insulin Destruction Sum 1
Constant Gain , Nu = 0.36
2 p5
u1(t)
83
2
Y(t)
p8
Gb*Fb
Orinally Design
Yb=0.01 *Xb
p7
1
p7*Fb 1
s F(t)
F(t)
3 -K-
u3(t)
1/VolF
p8*0.1*Xb *Fb
1
1
s
Ce (t)
Integrator
Gain
1/tao _e
Sum 1
1
Ftas_r f(u) 9
2 Terminator f(u )
Ftas_REM _Sleeo ABS Fcn
SI REM factor = 0.4 Ftas_Ce0*(1-SI*Gas_SleepM )
Ftas,r0_metabolic
Gas factor _M f(u)
Ftas_Ce0*(1-SI )
f(u)
Ftas_Ce 0
2
f(u)
W_alphaSYMP
Ftas_metabolic
f(u)
3
Ftas_REM _Sleep Fcn Saturation
REM
REM factor = 0.4 Ce_0
f(u) Ftas,r0_metabolic
Gas factor _M
Ftas_r0_metabolic
Neg Power
-C-
2
Epi on Heart (Sum )
f(u) Add
-C-
Fcn2
Heart : FFA_to_ACoA
f(u)
-C-
Fcn3
Heart : TGL _to_FFA
85
1
Ce(t) f(u)
-C-
Fcn
Muscle : GLC _to_G6P
1
Epi on Muscle (Fluxes )
f(u)
-C-
Fcn1
Muscle : GLY _to_G6P
2
Epi on Muscle (Sum )
f(u) Add
-C-
Fcn2
Muscle : FFA_to_ACoA
f(u)
-C-
Fcn4
Muscle : PYR_to_ALA
f(u)
-C-
Fcn3
Muscle : TGL _to_FFA
The interactions between autonomic and metabolic control include the circadian
regulation of epinephrine secretion, epinephrine regulation on dynamic fluctuations in
glucose and free-fatty acid in plasma, metabolic coupling among tissues and organs
provided by insulin and epinephrine, as well as the effect of insulin on peripheral
vascular sympathetic activity.
These model simulations provide insight into the relative importance of the various
mechanisms that determine the acute and chronic physiological effects of sleep-
disordered breathing. The model can also be used to investigate the effects of a variety of
interventions, such as different glucose clamps, the intravenous glucose tolerance test and
the application of continuous positive airway pressure on obstructive sleep apnea
subjects. incorporates several key cardiorespiratory reflexes and interactions. The
schematic diagram below shows the overall scheme in which these interactions have been
incorporated.
87
Here are all the files for either the whole Pneuma or its individual modules. Please check
to make sure that you have downloaded all those files you need.
PneumaRelease3.zip
FILES
PNEUMA.mdl
pneuma_acc.dll
PNEUMA_MAIN_CONTROL_PANEL.fig
PNEUMA_MAIN_CONTROL_PANEL.m
pneuma_variables.m
pneuma_gains.m
constant_parameters_6.fig
constant_parameters_6.m
adjustable_inputs_6.fig
adjustable_inputs_6.m
About.fig
About.m
directory_list.fig
directory_list.m
directory_list_load.m
directory_list_load.fig
directory_list_save.fig
directory_list_save.m
acquire_data.m
acquire_data_save.m
interventions.fig
interventions.m
cond_check.m
release_note.pdf
modaldlg.fig
modaldlg.m
CNS.bmp
cpap2.bmp
CV_pic.bmp
IC_pic.bmp
Metabolic2.bmp
Respiratory_System.bmp
PNEUMARelease3_MANUAL.pdf
Individual Modules:
Cardiovascular System:
Cardiovascular Cardiovascular.mdl
Cardiovascular_IC.m
89
Autonomic Control:
Autonomic Autonomic.mdl
Autonomic_IC.m
SA Node:
SA_Ursino SA_Node_Ursino.mdl
SA_Node_Ursino_IC.m
Respiratory System:
Respiratory Respiratory.mdl
Respiratory_IC.m
NeuroMuscular Profile:
NeuroMuscular NeuroMuscular.mdl
NeuroMuscular_IC.m
Lungs_Khoo Lungs_Khoo.mdl
Lungs_Khoo_IC.m
Cardio_Mix_Lange Cardio_Mix_Lange.mdl
Cardio_Mix_Lange_IC.m
Dissociation_Spencer Dissociation_Spencer.mdl
Dissociation_Spencer_IC.m
90
Brain_Khoo Brain_Khoo.mdl
Brain_Khoo_IC.m
Body_Khoo Body_Khoo.mdl
Body_Khoo_IC.m
Vent_Drive_Khoo Vent_Drive_Khoo.mdl
Vent_Drive_Khoo_IC.m
Reflex_Ursino Reflex_Ursino.mdl
Reflex_Ursino.IC
State_UA_Khoo_Borbely State_UA_Khoo_Borbely.mdl
State_UA_Khoo_Borbely_IC
91
Then, click “Run” to save all the “data” in the workspace when the simulation is stopped
at 1000 sec by using “Save Data” in “File” menu. To load these data for the purpose of
resuming the simulation run from t=1000 sec, modify the configuration as below by
checking the box “Initial State” and change its name into “yinitial1000”; to save the final
state, modify the configuration as below by checking the box “Final States” and change
its name into “yFianl2000” shown as below:
93
To continuously save/load the states, be sure to provide different names for the initial and
final states. Please note that this feature is only available when using PNEUMA V.3.0 in
Matlab® versions higher than R2009a.
94
Cardiovascular System
Resistances
RPA Pulmonary arterial flow resistance 0.023 mmHg*s/mL
RPP Pulmonary peripheral flow resistance 0.0894 mmHg*s/mL
RPV Pulmonary venous flow resistance 0.0056 mmHg*s/mL
RSA Systemic arterial flow resistance 0.06 mmHg*s/mL
RSP Splanchnic peripheral flow resistance 3.307 mmHg*s/mL
REP Extra-splanchnic peripheral resistance 3.52 mmHg*s/mL
RMPN Skeletal muscle peripheral flow resistance 4.48 mmHg*s/mL
RBPN Cerebral peripheral flow resistance 6.57 mmHg*s/mL
RHPN Coronary peripheral flow resistance 19.71 mmHg*s/mL
RSV Splanchnic venous flow resistance 0.038 mmHg*s/mL
REV Extra-splanchnic venous resistance 0.04 mmHg*s/mL
RMV Skeletal muscle venous flow resistance 0.05 mmHg*s/mL
RBV Cerebral venous flow resistance 0.075 mmHg*s/mL
RHV Coronary venous flow resistance 0.224 mmHg*s/mL
RVC_0 Nominal vena cava flow resistance 0.025 mmHg*s/mL
RLA Left atrial flow resistance 0.0025 mmHg*s/mL
RRA Right atrial flow resistance 0.0025 mmHg*s/mL
Compliances
CPA Pulmonary arterial compliances 0.76 mL/mmHg
CPP Pulmonary peripheral compliances 5.8 mL/mmHg
CPV Pulmonary venous compliances 25.37 mL/mmHg
CSA Systemic arterial compliances 0.28 mL/mmHg
CSP Splanchnic peripheral compliances 2.05 mL/mmHg
CEP Extra-splanchnic peripheral compliances 0.668 mL/mmHg
CMP Skeletal muscle peripheral compliances 0.525 mL/mmHg
95
Carotid Baroreceptors