A Cardiovascular Simulator for Research 1.0.0

File: <base>/bin/header_def.m (11,749 bytes)
% This function header.m assigns parameter values to the 
% research cardiovascular simulator (simulate.m)
%
% Function arguments: none
%
% Function outputs:
%	theta - 113x1 vector containing parameter value assignments
%

function theta = header

% Integration and sampling parameters

     % Integration/Sampling frequency of signals (Def: 125 Hz)
     % WARNING -- smaller sampling frequency leads to greater
     % integration errors
     Fs = 125;

     % Total integration time (s)
     % Set time: 1000 for cardiac function/venous return curves
     % (Simulator will stop integration as soon as the computation
     % of the curves is complete.)
     time = 300;

% Heart and circulation parameters
%
% These parameters completely characterize the nominal intact
% circulation.  Some of these parameters also characterize 
% the following preparations:
%
% 1) heart-lung unit [HLU]
% 2) systemic circulation [SC]
% 3) left ventricle [LV]
% 4) intact circulation for measuring CIRCULATORY MECHANICS [CM]
% 5) intact circulation with only linear elements [ICL]
% 6) intact circulation with 3rd-order systemic arteries [3SA]
% 7) intact circulation with nonlinear arterial compliance [NSA] 
% 8) intact circulation with 3rd-order systemic arteries
%    and nonlinear large, elastic arterial compliance [3NSA]
% 9) intact circulation with arterial pressure reservoir [APR]
% 10) intact circulation with atria [ATR]
%

	% Left ventricle

		% End-systolic OR differential end-systolic compliance
		% at dead volume (Def: 0.4 ml/mmHg)
		% [HLU,LV,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Cls = 0.4;

		% Diastolic or differential diastolic compliance 
		% at dead volume (Def: 10 ml/mmHg)
		% [HLU,LV,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Cld = 10;

		% Dead volume (Def: 15 ml)
		% [HLU,LV,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Qlo = 15;

		% Maximum volume (Def: 270 ml)
		% [HLU,LV,CM,3SA,NSA,3NSA,APR,ATR]
		Qlmax = 270;

		% Maximum pressure (Def: 260 mmHg)
		% [HLU,LV,CM,3SA,NSA,3NSA,APR,ATR]
		Plmax = 260;

		% Resistance (Def: 0.006 mmHg-s/ml)
		% [HLU,LV,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Rl = 0.006;

	% Systemic arteries

		% Compliance OR differential compliance at Pasp (Def: 1.6 ml/mmHg)
		% [SC,CM,ICL,NSA,ATR]
		Ca = 1.6;

		% Dead volume (Def: 715 ml)
		% [SC,CM,ICL,NSA,ATR]
		Qao = 715;

		% Resistance (Def: 1 mmHg-s/ml)
		% [SC,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Ra = 1;

	% Systemic veins
	
		% Compliance (Def: 100 ml/mmHg)
		% [SC,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Cv = 100;
	
		% Dead volume (Def: 2600 ml)
		% [SC,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Qvo = 2600;

		% Resistance (Def: 0.02 mmHg-s/ml)
		% [HLU,SC,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Rv = 0.02;

		% Chamber pressure -- atmospheric pressure (Def: 0 mmHg)
		% [HLU,SC,CM,3SA,NSA,3NSA,APR,ATR]
		Pvc = 0;

	% Right ventricle

		% End-systolic OR differential end-systolic compliance at
		% dead volume (Def: 1.2 ml/mmHg)
		% [HLU,SC,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Crs = 1.2;

		% Diastolic or differential diastolic compliance at
		% dead volume (Def: 12.5 ml/mmHg)
		% [HLU,SC,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Crd = 12.5;

		% Dead volume (Def: 15 ml)
		% [HLU,SC,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Qro = 15;

		% Maximum volume (Def: 235 ml)
		% [HLU,SC,CM,3SA,NSA,3NSA,APR,ATR]
		Qrmax = 235;

		% Maximum pressure (Def: 70 mmHg)
		% [HLU,SC,CM,3SA,NSA,3NSA,APR,ATR]
		Prmax = 70;

		% Resistance (Def: 0.003 mmHg-s/ml)
		% [HLU,SC,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Rr = 0.003;


	% Pulmonary arteries

		% Compliance (Def: 4.3 ml/mmHg)
		% [HLU,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Cpa = 4.3;

		% Dead volume (Def: 90 ml)
		% [HLU,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Qpao = 90;

		% Resistance (Def: 0.09 mmHg-s/ml)
		% [HLU,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Rpa = 0.09;

		% Chamber pressure -- alveolar pressure (Def: 0 mmHg)
		% [HLU,CM,3SA,NSA,3NSA,APR,ATR]
		Ppac = 0;

	% Pulmonary veins

		% Compliance (Def: 8.4 ml/mmHg)
		% [HLU,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Cpv = 8.4;
	
		% Dead volume (Def: 490 ml)
		% [HLU,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Qpvo = 490;

		% Resistance (Def: 0.01 mmHg-s/ml)
		% [HLU,LV,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Rpv = 0.01;

	% System parameters

		% Total blood volume (Def: 5000 ml)
		% [CM,ICL,3SA,NSA,3NSA,ATR]
		Qtot = 5000;

		% Mean heart rate frequency (Def: 1.2 Hz)
		% [HLU,SC,LV,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		F = 1.2;

		% Intrathoracic pressure (Def: -4 mmHg)
		% [HLU,SC,LV,CM,ICL,3SA,NSA,3NSA,APR,ATR]
		Pth = -4;

% Additional HLU parameters

	% Systemic arterial constant pressure reservoir (Def: 100 mmHg)
	% [LV,APR]
	Pa = 100;

	% Systemic venous constant pressure reservoir (Def: 5 mmHg) 
	Pv = 5;

	% Step in Pa (Def: 1000 mmHg for cardiac output curve) 
	%            (Def: 30 for cardiac output versus arterial pressure)
	% If Pas <= Plmax-Pas-10, then Pa is stepped up 
	% as follows: 30:Pas:Plmax-10.  Else, Pa is assigned
	% the scalar value above.
	Pas = 1000;

	% Step in Pv (Def: 2 mmHg for cardiac output curve)
	%            (Def: 100 mmHg for cardiac output versus arterial pressure)
	% If Pvs <= round((Qrmax-Qro-20)/Crd)+3-1, then 
	% Pv is stepped down as follows: 
	% [round((Qrmax-Qro-20)/Crd)+3:-Pvs:0, Pth+1].  Else, Pv
	% is assigned the scalar value above.
	Pvs = 2; 

% Additional SC parameters

	% Pulmonary arterial constant pressure reservoir (Def: 24 mmHg)
	Ppa = 24;

	% Mean systemic pressure (mmHg)
	Pms = 6.777;

	% Step in Crd (Def: 5 ml/mmHg for venous return curve)
	%	      (Def: 100 ml/mmHg for constant Crd)
	% If Crds <= 60-Crs, then Crd is stepped up as follows:
	% Crs:Crds:60.  Else, Crd is assigned the scalar value
	% above.
	Crds = 5;

% Additional LV parameters

	% Pulmonary venous constant pressure reservoir (Def: 3 mmHg)
	Ppv = 3;

	% See also Pa in additional HLU parameters

% Additional CM parameters

	% Beat number of last ventricular ejection (Def: 50 beats)
	nve = 50;

% Additional 3SA and 3NSA parameters

	% Compliance of central, elastic arteries OR
	% differential compliance at Pasp (Def: 1.45 ml/mmHg)
	Ce = 1.45;

	% Compliance of peripheral, muscular arteries (Def: 0.15 ml/mmHg)
	Cm = 0.15;

	% Dead volume of central, elastic arteries (ml)
	Qeo = (Ce/(Ce+Cm))*Qao;

	% Dead volume of peripheral, muscular arteries (ml)
	Qmo = (Cm/(Ce+Cm))*Qao;

	% Inductance of arteries (Def: 0.025 g/cm^4)
	La = 0.025;

% Additional NSA parameters

	% Volume at Pasp for nonlinear arterial compliance (ml)
	% Defined below

	% Curvature at Pasp (Def: -0.01 ml/mmHg^2)
	% K must be less than 0
	% [3NSA]
	K = -0.01;

% Additional 3NSA parameters only

	% Volume of central, elastic arteries at Pasp 
	% for nonlinear arterial compliance (ml)
	% Defined below

	% See also K in additional NSA parameters

% Additional APR parameters

	% See Pa in additional HLU parameters

% Additional ATR parameters

	% Left atrium

	        % End-systolic compliance (Def: 1.25 ml/mmHg)
	        Clas = 1.25;

		% End-diastolic compliance (Def: 2.5 ml/mmHg)
		Clad = 2.5;

		% Dead volume (Def: 5 ml)
		Qlao = 5;

		% Resistance (Def: 0.003 mmHg-s/ml)
		Rla = 0.003;

	% Right atrium

	        % End-systolic compliance (Def: 2 ml/mmHg)
	        Cras = 2;

		% End-diastolic compliance (Def: 4 ml/mmHg)
		Crad = 4;

		% Dead volume (Def: 5 ml)
		Qrao = 5;

		% Resistance (Def: 0.003 mmHg-s/ml)
		Rra = 0.003;

% Short-term regulatory system parameters

	% Static gain control of the beta-sympathetic 
	% nervous system (Def: 1 unitless)
	bgain = 1;

	% Static gain control of the alpha-sympathetic 
	% nervous system (Def: 1 unitless)
	again = 1;

	% Static gain control of the parasympathetic 
	% nervous system (Def: 1 unitless)
	pgain = 1;

	% Arterial baroreflex

		% Setpoint pressure (Def: 94 mmHg) 
		Pasp = 94;

		% Saturation factor (Def: 18 mmHg)
		Sa = 18; % (if Sa == 9999, then no saturation)

		% Static gain control of F parasympathetic baroreflex
		% (Def: 12 unitless)
		againfp = 12;

		% Static gain control of F beta-sympathetic baroreflex
		% (Def: 12 unitless)
		againfs = 12;

		% Static gain control of Cls, Crs beta-sympathetic
		% baroreflex (Def: 12 unitless)
		againc = 12;

		% Static gain control of Ra alpha-sympathetic
		% baroreflex (Def: 9 unitless)
		againr = 9; 

		% Static gain control of Qvo alpha-sympathetic
		% baroreflex (Def: 9 unitless)
		againq = 9;

		% Delay in Ra alpha-sympathetic baroreflex (Def: 2 s)
		% Maximum of 10 s
		adelayr = 2;

		% Delay in Qvo alpha-sympathetic baroreflex (Def: 2 s)
		% Maximum of 10 s
		adelayq = 2;

	% Cardiopulmonary baroreflex

		% Setpoint pressure (Def: 6.6 mmHg)
		Pratrsp = 6.6;

		% Saturation factor (Def: 5 mmHg)
		Sc = 5; % (if Sc == 9999, then no saturation)

		% Static gain control of F parasympathetic
		% baroreflex (Def: 0 unitless)
		cgainfp = 0;

		% Static gain control of F beta-sympathetic
		% baroreflex (Def: 0 unitless)
		cgainfs = 0;

		% Static gain control of Cls, Crs beta-sympathetic
		% baroreflex (Def: 0 unitless)
		cgainc = 0;

		% Static gain control of Ra alpha-sympathetic
		% baroreflex (Def: 9 unitless)
		cgainr = 9;

		% Static gain control of Qvo alpha-sympathetic
		% baroreflex (Def: 9 unitless)
		cgainq = 9;

		% Delay in Ra alpha-sympathetic baroreflex (Def: 2 s)
		% Maximum of 10 s
		cdelayr = 2;

		% Delay in Qvo alpha-sympathetic baroreflex (Def: 2 s)
		% Maximum of 10 s
		cdelayq = 2;

	% Direct neural coupling mechanism between respiration and F

		% Static gain control of parasympathetic limb (Def: 1 unitless)
		dgainp = 1;

		% Static gain control of beta-sympathetic limb (Def: 1 unitless)
		dgains = 1;

% Resting physiologic perturbations parameters

	% Respiration

		% Functional reserve volume (Def: 2200 ml)
		Qfr = 2200;

		% Tidal volume (Def: 500 ml)
		Qt = 500;

		% Respiratory cycle period for fixed-rate breathing (Def: 5s)
		Tr = 5;

		% Dead space of airways (Def: 150 ml)
		Qds = 150;

		% Airway resistance (Def: 0.0026 mmHg-s/ml)
		Rair = 0.0026;

		% Lung compliance (Def: 252.5 ml/mmHg)
		Clu = 252.5;

		% Dead volume in lungs (Def: 1190 ml)
		Qluo = 1190;

		% Height/area of step/impulse input of Qlu (Def: 250 ml)
		Qfrs = 250;

		% Time of step/impulse of Qlu (Def: 300 s)
		Qfrt = 300;

	% Three types of disturbances to Ra 
	% 
	% Bandlimited [BL]
	% 1/f [F]
	% Sinusoidal [S]

		% Frequency cutoff (Def: 0.1 Hz)
		% [BL]
		fco = 0.1;

		% Standard deviation of white noise (Def: 0.16 (mmHg-s/ml)/Hz^{1/2})
		% [BL,F]
		stdwr = 0.16;

		% Amplitude (Def: 0.05 (mmHg-s/ml)/Hz^{1/2})
		% [S]
		ar = 0.05;

		% Frequency (Def: 0.05 Hz)
		% [S]
		fr = 0.05;

	% 1/f disturbance to F

		% Square root of spectral height (Def: 0.0035 ((bps)/Hz^{1/2}))
		stdwf = 0.0035;

		% Alpha exponent (Def: 1 unitless)
		% (for disturbance to Ra as well)
		alpha = 1;

	% Bandlimited disturbance to Qvo

		% Frequency cutoff (Def: 0.1 Hz)
		fcoq = 0.1;

		% Standard deviation of white noise (Def: 0.00016 (ml)/Hz^{1/2})
		stdwq = 0.00016;

	% Sinusoidal disturbance to Pasp

		% Amplitude (Def: 6 mmHg)
		ap = 6;

		% Frequency (Def: 0.05 Hz)
		fp = 0.05;

%%% DO NOT EDIT BELOW THIS LINE %%%

Qnac = Qao+Ca*Pasp;
Qnec = Qeo+Ce*Pasp;
free1 = 0;
free2 = 0;
free3 = 0;
free4 = 0;
step = 1;

theta = [Cls*((Plmax)/(Qlmax-Qlo)) Cld*((Plmax)/(Qlmax-Qlo)) Ca Cv Crs*((Prmax)/(Qrmax-Qro)) Crd*((Prmax)/(Qrmax-Qro)) Cpa Cpv Qlo Qao Qvo Qro Qpao Qpvo Rl Ra Rv Rr Rpa Rpv Qtot F Pth 1/F Ppac Qlmax Qrmax Ppa Pa Pv Plmax Prmax Pms Ppv free1 Qfrs againr bgain pgain Pasp Pratrsp Tr nve fco adelayr Sa stdwr stdwf adelayq cdelayr cdelayq dgainp dgains againq cgainr cgainq free2 cgainfp alpha Sc ar fr ap fp fcoq stdwq free3 0 La K Qnac Ce Cm Qeo Qmo Qnec Qt step free4 Clas Clad Qlao Rla Cras Crad Qrao Rra Pvs]';

theta = [theta; Crds; Pas; Pvc; again; againc; cgainc; againfs; cgainfs; againfp; Qfr; Qds; Rair; Clu; Qluo; Qfrt];

theta = [theta; zeros(2,1); time*Fs; zeros(6,1); Fs];